I have this Masm code but i want to use it in Tasm:
error2 db "Error",0
wpmerror db "Break found on WriteProcessMemory !",0
kernel db "kernel32.dll", 0
wpm db "WriteProcessMemory",0
invoke GetModuleHandle,ADDR kernel
invoke GetProcAddress, eax, ADDR wpm
cmp byte ptr ,0cch
jz breakfound
breakfound:
invoke MessageBox,0,addr wpmerror,addr error2,MB_OK
invoke ExitProcess,0
Does anyone think this translating is wrong:
Call GetModuleHandle,0
Push offset kernel
Call GetProcAddress, eax
Push offset wpm
Cmp eax,0cch
Jz @breakfound
@breakfound proc
push 0
push offset error2
push offset wpmerror
push _hwind
call messageboxa
call Exitprocess,0
ret
@breakfound endp
Thansk for any reply.
error2 db "Error",0
wpmerror db "Break found on WriteProcessMemory !",0
kernel db "kernel32.dll", 0
wpm db "WriteProcessMemory",0
invoke GetModuleHandle,ADDR kernel
invoke GetProcAddress, eax, ADDR wpm
cmp byte ptr ,0cch
jz breakfound
breakfound:
invoke MessageBox,0,addr wpmerror,addr error2,MB_OK
invoke ExitProcess,0
Does anyone think this translating is wrong:
Call GetModuleHandle,0
Push offset kernel
Call GetProcAddress, eax
Push offset wpm
Cmp eax,0cch
Jz @breakfound
@breakfound proc
push 0
push offset error2
push offset wpmerror
push _hwind
call messageboxa
call Exitprocess,0
ret
@breakfound endp
Thansk for any reply.
replace all occurences of 'invoke' by 'call' (no need to manually push the values) and 'addr' by 'offset' and you should be fine.
I don't know TASM but I dont think you can jump to a proc but you'll have
to call it. Actually I believe this is common for most assemblers.
Why don't you just run the code ?
to call it. Actually I believe this is common for most assemblers.
Why don't you just run the code ?
Thanks for the reply.
no need to manually push the values (tola)
************************************
why?
shouldn't I push the parameters before calling the function?
************************************
why?
shouldn't I push the parameters before calling the function?
replace all occurences of 'invoke' by 'call' (tola)
*************************************
Do you only read half of the sentence ???????? :tongue:
*************************************
Do you only read half of the sentence ???????? :tongue:
goofee ...
aren't we supposed to push the parameters when using call insted of invoke?
aren't we supposed to push the parameters when using call insted of invoke?
goofee ...
aren't we supposed to push the parameters when using call insted of invoke?
when using tasm? no. :)
code1101,
I didn't know either but it sounded like Tola knew what he was talking about :grin:
I didn't know either but it sounded like Tola knew what he was talking about :grin: