View Full Version : assembler
Hello,
I'm trying to turn a program into a keygen (to show the right code in the message box) and I have the right code in edx+1. The problem is that when I do mov eax, edx+00000001 (before I did this eax hold the bad message after this instruction) I don't get the code in the message box, but in Sice if I do d edx+1 I have the code there. Since I'm a newbie in assembler language I donīt know what I'm doing wrong. Can anyone help me? Thanks in advanced.
JClif
May 22nd, 2001, 12:46
Hello
As I understood your problem you want to display the right code in a funky messagebox.
And I guess your inserted code looks like this:
mov eax,edx+1
push 00 ;ok button
push eax ;caption
push eax ;text
push 00 ;handle
call dword ptr [x??x??x??x] ;the call to MessageBoxA
Well, you have to use the Address/Offset to the real number to display it inside the box.
So use a push 004X2345 where the serial is in memory or replace your mov with a lea.
That should work.
Jim
Thanks for the fast answer, but it's not exactly this. I pasted the original code here (with my comments). The correct code is at edx+1
:0045E891 B201 mov dl, 01 --> call the icon in the messagebox
* Possible StringData Ref from Code Obj ->"The Registration Key is incorrect."
|
:0045E893 B888E94500 mov eax, 0045E988 --> 0045E988 is the bad message
:0045E898 E84F6CFDFF call 004354EC --> call the messagebox
If at 45E898 I do 'd eax' I can see the bad message. So in Sice I decided to change the code at 45E893 to 'mov eax, edx+1' but the result is the same as doing 'mov eax, edx' (why?), which not holds the correct code. If I do mov eax,[edx+01] I will get in eax the 4 first digits (in inverse order) in hexadecimal of the correct serial. This is very confusing to me !!! Can you see what am I doing wrong?
mo k
May 22nd, 2001, 16:15
>If at 45E898 I do 'd eax' I can see the bad
> message. So in Sice I decided to change the
> code at 45E893 to 'mov eax, edx+1' but the
> result is the same as doing 'mov eax, edx'
> (why?)
They are not the same =P
what is in edx is a pointer to a string. display
it, and you will see the entire string. now when
you increment it, you are forwading the pointer
and you will see the exact string, missing the first
letter.
if you don't see any difference, then the first letter
was not an alphabet letter, it must have been an
space, and caused your "visual" confussion.
> If I do mov eax,[edx+01] I will get in eax the
> 4 first digits (in inverse order) in hexadecimal
> of the correct serial. This is very confusing
> to me !!! Can you see what am I doing
> wrong?
first note this
edx+1 increments a pointer
[edx+1] increments a value
The fact that values are stored in hex or in reverse
doesn't do much, any algorithm can do comparison
however its author likes it.
But the fact that the "value" of the serial is also
the "pointer" to the error message raises a suspicion.
first: the author is an asm coder, who did indeed
manually patch his application and/or tweak
his linker/library.
this is bad!
second: the author is a dumbass, since he cann't
place the error message, wherever the generated
serial hashes to.
I think the serial is hardcoded, derive your own
conclussions!
Please name the app, or post the comparsion
algo, i think someone hit jack pot ;P
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.