flat assembler
Message board for the users of flat assembler.
Index
> Windows > SetDlgItemText fails. |
Author |
|
revolution 28 Jul 2011, 11:05
Your code is incomplete. At least give us something that we can compile and test for you.
Anyhow: what is this line? Code: cmp [wParam],ATTACK |
|||
28 Jul 2011, 11:05 |
|
Overflowz 28 Jul 2011, 11:17
revolution
How many times should I say I'm not writing malwares ? I'm working to make some patch for game, to patch it in memory. I don't know what else should I write there and choosed "ATTACK". P.S also, I don't think that GUI version malware would be nice. Now about code, here's true example. Code: section '.code' code readable executable entry $ invoke GetModuleHandle,0 mov [hInstance],eax invoke DialogBoxParam,eax,D_MAIN,0,dlg_proc,0 invoke ExitProcess,0 proc dlg_proc, hWnd, uMsg, wParam, lParam cmp [uMsg],WM_CLOSE jne @F .end_dlg: invoke EndDialog,[hWnd],0 .exit_true: mov eax,TRUE ret @@: cmp [uMsg],WM_COMMAND jne .exit_false cmp [wParam],ATTACK jne @F invoke GetDlgItemText,[hWnd],EDIT_1,var1,0x100 invoke SetDlgItemText,[hWnd],EDIT_2,var1 jmp .exit_true @@: .exit_false: xor eax,eax ret endp section '.data' data readable writeable var1 rb 0x100 EDIT_1 and EDIT_2 are EDIT boxes. after I'm working with GetDlgItemText, it saves first input successful to var1, and after SetDlgItemText to another dialog, it says OK but nothing is happening.. I wrote same variables but in second edit box it should write information like: Opening Process.. Finding Offset.. and so on.. but none of them work. Any other informations ? Last edited by Overflowz on 28 Jul 2011, 11:23; edited 1 time in total |
|||
28 Jul 2011, 11:17 |
|
revolution 28 Jul 2011, 11:22
Overflowz wrote: Any other informations ? |
|||
28 Jul 2011, 11:22 |
|
Overflowz 28 Jul 2011, 11:42
Found solution! I had infinite loop that was freezing program and thats the reason why it don't worked.. Thank you anyway for help!
|
|||
28 Jul 2011, 11:42 |
|
vid 28 Jul 2011, 11:45
Overflowz wrote: How many times should I say I'm not writing malwares ? I'm working to make some patch for game, to patch it in memory. I don't know what else should I write there and choosed "ATTACK". Fair point. But weren't you writing anti-malware last time I asked? |
|||
28 Jul 2011, 11:45 |
|
revolution 28 Jul 2011, 11:45
Overflowz wrote: Found solution! I had infinite loop that was freezing program and thats the reason why it don't worked.. |
|||
28 Jul 2011, 11:45 |
|
Overflowz 28 Jul 2011, 12:05
vid
Yes, I'm also learning malware techniques what they does and so on to prevent their actions. I've asked this because I'm studying about memory patching and prevent some functions etc.. I need to study much before I'll start anti-malware things I can beat "easy malwares" but not hard ones.. I just don't have any other idea what should I write and just working with them because they're a lot revolution I don't understand, you need the code ? P.S also, I was using bad window handle when calling another procedure.. I missed that CALL instruction pushes return address to stack and hWnd was lost + infinite loop did it's job, program was freezing and no results were shown. In debugger, after calling SetDlgItemText, it does not set text because of it's freezed I guess.. GUI applications have different style to work IMO. |
|||
28 Jul 2011, 12:05 |
|
revolution 28 Jul 2011, 12:11
Overflowz wrote: I don't understand, you need the code ? |
|||
28 Jul 2011, 12:11 |
|
Overflowz 28 Jul 2011, 12:15
revolution
I though it was enough)) Sorry. Next time, I'll post full code. Thanks! Solved now. |
|||
28 Jul 2011, 12:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.