Log in

View Full Version : Help doing inline keygenning....


EJ12N
May 5th, 2004, 19:36
Hi im doing a keygenME and the algo of it is too long but i mean LONG...(maybe 200+ lines) uhmm anyways i know how to make it so it displays the correct serial on the error msgbox but i what i did is add a new editbox (txtbox) with resource editor and i now what i want is how to make that edit box display the correct serial instead of doing it in the message box

well that's all

THank you!

Regards,

ZaiRoN
May 6th, 2004, 03:13
Hi EJ12N,
there are some functions you can use in order to solve your problem: SetDlgItemText, SetWindowText, SendMessage(wm_settext). Choose one of these and use it...

EJ12N
May 6th, 2004, 03:55
uhmm i know that... but the thing is how to do it... ? i dont have the source for the program so i gotta inline patch it to do that but how ?
Thank you

ZaiRoN
May 6th, 2004, 04:12
Quote:
i dont have the source for the program
Sorry but, what does it mean? Why do you need the source of the program !?!

zai

Aimless
May 6th, 2004, 05:32
Quote:
[Originally Posted by EJ12N]uhmm i know that... but the thing is how to do it... ? i dont have the source for the program so i gotta inline patch it to do that but how ?
Thank you


You may try to search on google for <Code Caves>, <adding sections PE> and seach the old fravia mirror for adding fucntionality.

A good read would be to go to google and search for <RazziaPad> or <Razzia> or <How to add functionality to Notepad>

Have Phun

EJ12N
May 6th, 2004, 08:48
Quote:
Sorry but, what does it mean? Why do you need the source of the program !?!

zai


i said that cuz maybe u miss understood me
Well ima go search for those tuts Aimless said... but if anyone could describe it here for me how to do it would be great

Thank you!

Will
May 6th, 2004, 14:00
Quote:
i know how to make it so it displays the correct serial on the error msgbox



You know how to add code for that but not how to insert a single api call like SetWindowText?

EJ12N
May 6th, 2004, 16:58
Yes i dont know about how to setwindowtext on the new edit box i did to make it display on messagebox is easy you just change code... but i never done this SetWindowText so can anyone help

Will
May 6th, 2004, 18:02
Well showing the serial in a msgbox still involves a call to wsprintf, adding a string ("%d,0" or whatever), adding a buffer (25 dup(0) or whatever), and inserting the code.

That's about equally as complicated as adding a call to GetDlgItem/SetWindowText, which would consist of something like this:

(assuming that they're already imported, although importing them isn't much of a problem either )
Code:

;either overwrite unimportant code or insert a jump to a cave, then add this
push nIDDlgItem ;the dlg id that you gave the edit box
push hDlg ;the hWnd of the dlg -- it'll most likely be in 1 of 2 places
;ebp + xx or in a buffer
call GetDlgItem ;hopefully it's imported already
push lpString ;since you've already got the serial in a buffer that you
;used with your MessageBox/Ex call then just use that
push eax ;hWnd is in return of GetDlgItem
call SetWindowText ;hopefully it's imported already, if not try SetDlgItemText


That's more than enough info for you. You're selling yourself short though, by thinking that you can't do this already. You've already added the MessageBox code, so this isn't much more difficult if at all.


cheers,
will

EJ12N
May 7th, 2004, 14:20
NVM i got it Thanks anyways


Quote:
[Originally Posted by Will]Well showing the serial in a msgbox still involves a call to wsprintf, adding a string ("%d,0" or whatever), adding a buffer (25 dup(0) or whatever), and inserting the code.

That's about equally as complicated as adding a call to GetDlgItem/SetWindowText, which would consist of something like this:

(assuming that they're already imported, although importing them isn't much of a problem either )
Code:

;either overwrite unimportant code or insert a jump to a cave, then add this
push nIDDlgItem ;the dlg id that you gave the edit box
push hDlg ;the hWnd of the dlg -- it'll most likely be in 1 of 2 places
;ebp + xx or in a buffer
call GetDlgItem ;hopefully it's imported already
push lpString ;since you've already got the serial in a buffer that you
;used with your MessageBox/Ex call then just use that
push eax ;hWnd is in return of GetDlgItem
call SetWindowText ;hopefully it's imported already, if not try SetDlgItemText


That's more than enough info for you. You're selling yourself short though, by thinking that you can't do this already. You've already added the MessageBox code, so this isn't much more difficult if at all.


cheers,
will