flat assembler
Message board for the users of flat assembler.
Index
> Windows > new to FASM, need a little bit of help. |
Author |
|
smoke 13 Oct 2007, 08:19
you can do it like this:
Code: format PE GUI 4.0 include 'win32a.inc' invoke FindWindow, NULL, gameWindow test eax,eax jne @f invoke MessageBox,0, message, caption, MB_OK @@: invoke GetWindowThreadProcessId, eax, gamePID invoke OpenProcess, PROCESS_ALL_ACCESS, FALSE, gamePID mov dword[gameProcess],eax invoke WriteProcessMemory, gameProcess, startAddress, patch, 6, NULL invoke WriteProcessMemory, gameProcess, startAddress, injection, 18, NULL exit: invoke ExitProcess, 0 gameWindow db 'Minesweeper', 0 gamePID db ? gameProcess db ? message db 'failed', 0 caption db 'test', 0 although you still need the import table |
|||
13 Oct 2007, 08:19 |
|
sinsi 13 Oct 2007, 08:52
smoke wrote:
Speaking as a long-time MASM/ML user this was one of the harder things to get used to, but once you get it then no worries. I'm still exploring the win32*.inc files, but the level of control is 'sweet, mate' I am for sure a convert to FASM, especially FASMW. (seeya hutch...) As for the trainer part, Code: invoke GetWindowThreadProcessId, eax, gamePID invoke OpenProcess, PROCESS_ALL_ACCESS, FALSE, gamePID ... gamePID db ? needs to be Code: invoke GetWindowThreadProcessId, eax, gamePID ;<<<<<gamePID here is the address of a DWORD invoke OpenProcess, PROCESS_ALL_ACCESS, FALSE, [gamePID] ;<<<<<<brackets denote contents not address ... gamePID dd ? ; <<<<<< dword not byte Brackets/OFFSET was another hurdle for MASM->FASM |
|||
13 Oct 2007, 08:52 |
|
slovach 13 Oct 2007, 16:15
smoke wrote: although you still need the import table Yeah I forgot to include that in my post since it was so late, but I had one. I got everything working all dandy now, thanks fellas! |
|||
13 Oct 2007, 16:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.