Twistedfate Expert Cheater
Reputation: 1
Joined: 11 Mar 2016 Posts: 231
|
Posted: Fri Apr 10, 2020 3:21 pm Post subject: How to allocated Function then calling that function |
|
|
Caller
| Code: |
push eax
mov eax,[skill_id]
call is_target_skill
cmp eax,1
pop eax
je code
..
... |
callee
| Code: |
alloc(is_target_skill,2048)
registersymbol(is_target_skill)
is_target_skill:
cmp eax,#1100
jne next1
mov eax,1
ret
next1:
cmp eax,#30000
jne next2
mov eax,1
ret
//upper code is replaced with no reason
next2:
cmp eax,442
jne next3
mov eax,1
ret
next3:
cmp eax,#1095
jne not_found
mov eax,1
ret
not_found:
mov eax,0
ret |
is that a good practice to call a Function ?
when I do this game Crash some times
and I found some of my allocating memory is released or written with another code .
the entry point of my functions is replaced with garbage code .
I have many Questions :
why some of my function got written ?
is that proper way for calling function or I'm doing big mistake?
labels named nex1,next2 ... could I Create label for each one like label(next1) ?
| Description: |
|
| Filesize: |
34.97 KB |
| Viewed: |
1297 Time(s) |

|
|
|