CLEO Help a little question

CLEO related
Status
Not open for further replies.

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
[shcode=cpp]
                {REMOVING "-" FROM NUMBER}
                0AF5: write_string 25@v to_ini_file "cleo\Copy_Chat.ini" section "SectionName" key "Organizer.Number"
                0AC8: 16@ = allocate_memory_size 600
                0AF4: 16@ = read_string_from_ini_file "cleo\Copy_Chat.ini" section "SectionName" key "Organizer.Number"
                if  
                    0AD4: 31@ = scan_string 16@ format "%d-%d" 4@ 5@
                then         
                    0AC8: 7@ = allocate_memory_size 600
                    0AD3: 7@ = format "%d-0%d" 4@ 5@
                    if  
                        0C29: 31@ = stristr string1 16@ string2 7@
                    then
                        0AC8: 6@ = allocate_memory_size 600
                        0AD3: 6@ = format "%d0%d" 4@ 5@
                        0AF5: write_string 6@ to_ini_file "cleo\Copy_Chat.ini" section "SectionName" key "Organizer.Number"
                        0AC9: free_allocated_memory 6@ 
                    else
                        0AC8: 7@ = allocate_memory_size 600
                        0AD3: 7@ = format "%d-00%d" 4@ 5@
                        if
                            0C29: 31@ = stristr string1 16@ string2 7@
                        then
                            0AC8: 6@ = allocate_memory_size 600
                            0AD3: 6@ = format "%d00%d" 4@ 5@
                            0AF5: write_string 6@ to_ini_file "cleo\Copy_Chat.ini" section "SectionName" key "Organizer.Number"
                            0AC9: free_allocated_memory 6@ 
                        else               
                            0AC8: 7@ = allocate_memory_size 600
                            0AD3: 7@ = format "%d-000%d" 4@ 5@
                            if
                                0C29: 31@ = stristr string1 16@ string2 7@
                            then
                                0AC8: 6@ = allocate_memory_size 600
                                0AD3: 6@ = format "%d000%d" 4@ 5@
                                0AF5: write_string 6@ to_ini_file "cleo\Copy_Chat.ini" section "SectionName" key "Organizer.Number"
                                0AC9: free_allocated_memory 6@ 
                            else
                                0AC8: 6@ = allocate_memory_size 600
                                0AD3: 6@ = format "%d%d" 4@ 5@
                                0AF5: write_string 6@ to_ini_file "cleo\Copy_Chat.ini" section "SectionName" key "Organizer.Number"
                                0AC9: free_allocated_memory 6@
                            end
                            0AC9: free_allocated_memory 7@
                        end 
                        0AC9: free_allocated_memory 7@
                    end
                    0AC9: free_allocated_memory 7@ 
                end 
[/shcode]

Look at

[shcode=cpp]
0AC9: free_allocated_memory 7@
end 
0AC9: free_allocated_memory 7@
end
0AC9: free_allocated_memory 7@ 
end 
[/shcode]

Is there any problem if I use 0AC9 two times or three times when var x@ is already out of memory? In game I dont see any problem but i'd like to know if i did it well or not xD
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Allocations like this will lead you to the memory leakage, cuz afaik in cleo allocating another chunk of memory on the same variable (pointer) will leave previous chunk of memory unfreed
Better restructure it, so you'll allocate & free it once in a function, or even once when the script is loaded\unloaded, rather than be so exact and do it when your conditions is true
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
supahdupahnubah said:
Allocations like this will lead you to the memory leakage, cuz afaik in cleo allocating another chunk of memory on the same variable (pointer) will leave previous chunk of memory unfreed
Better restructure it, so you'll allocate & free it once in a function,  or even once when the script is loaded\unloaded, rather than be so exact and do it when your conditions is true

[shcode=cpp]
alloc 18@ sum
alloc 19@ sum
if or
    cond 1
    cond 2
then
      script
      free 18@
      free 19@
end
[/shcode]

1. if the cond is false, then vars wont get free
2. if var 18 and 19 got alloc and i didn't free it cause of cond is not true, script will alloc mem to that vars till the cond is true?

i thinks this is like
[shcode=cpp]
1@ += 1
if 
     1@ > 999
then
      script
end
[/shcode]

1@ will increase till cond is true, is it the same thing with allocating memory?
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Yea, you can make a quick script that will allocate a shit ton of a memory in loop, then just watch your ram being slowly eaten by a simple script
I may be wrong tho, I currently have no access to my PC just to check if it's true, so I'm telling you what exactly will happen in unmanaged C++ code
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
supahdupahnubah said:
Yea, you can make a quick script that will allocate a shit ton of a memory in loop, then just watch your ram being slowly eaten by a simple script
I may be wrong tho, I currently have no access to my PC  just to check if it's true, so I'm telling you what exactly will happen in unmanaged C++ code

good to know ^^
have you any idea how to use Slonoboyko Cleo Cryptor cracked by NarutoUA ?
every crypted file by this program is crashing my game
or if you know another cleo cryptor / another method to hide your source and unable to edit it ...

nvm,found other methods how to
 
Status
Not open for further replies.
Top