Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   Another question about masm register displaying (https://forum.exetools.com/showthread.php?t=9371)

kittmaster 03-17-2006 23:02

Another question about masm register displaying
 
I want to directly display the contents of a register EBX. My invoke strings keep converting it to decimal so I commented it out. That doesn't seem to work either, so I created a variable in the data section SzTemp and copied the EBX there to that variable. But that doesn't seem to keep the hex value correctly and corrupts it somehow.

The answer to the keygen is the hex value that is stored in the EBX, I need to get that data to my wsprintf invoking command. The screenshot shows all the iterations and none seem to work. With the addr decimalformat, that works, but is the wrong comparison because it wants to be in hex not decimal. I've search to keep try and convert the decimalformat command to hexidecimalformat, but there is not data on that either..........?????

Chris

http://www.kittmaster.com/vette/images/ScreenShot003.png

Kerlingen 03-17-2006 23:18

What are you using as "ctrl_str" ?

It also seems you don't write to valEAX, valEBX, valECX or valEDX after you calculated it in the serial loop.

What is "not working as desired" ?

kittmaster 03-18-2006 00:26

Quote:

Originally Posted by Kerlingen
What are you using as "ctrl_str" ?

It also seems you don't write to valEAX, valEBX, valECX or valEDX after you calculated it in the serial loop.

What is "not working as desired" ?

For now those are commented out, I ripped them from the masm forum when I was searching for a method to get the ebx register hex data to my wsprintf dialog.

In the screen shot after the these are typically the commands that would be used to take the serial generator and display it in the keygen output box. The final answer is stored in hex in the ebx register and I want that data to be push to the output dialogbox text.

This is the commands as I figured them:

Code:

invoke wsprintf, addr tempbuffer,  addr decimalformat, eax                                    ; write decimal value of edx

invoke SetDlgItemTextA,handle,IDC_SERIAL, addr genedserial ; display serial


kittmaster 03-18-2006 01:27

I found my solution, thanks to those who responded:

This is what it was:
Code:

decimalformat          db "%d",0
Quote:

should be something like
Code:

"%0Xh",00h

I found that this is almost right > it adds an h to the string value so I adjusted it like

should be
Code:

"%0X",00h

this is what nailed it. Should have realized that the call to the string is necessary and then needs a decision as to what TYPE of output it should be. So I've adjusted my models to include a program switch that will display both if needed.

Thanks for this...........Life saver!!

Chris


All times are GMT +8. The time now is 22:31.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX