Jump to content

Recommended Posts

Posted

Hi all, as the title suggests, I am seeking info on how i can split an INT64 value into a Dword Loword and Dword Hiword. This is done because i need to push the dwords onto the stack in ASM code.

Any ideas how to do it?

Posted

$iValue = 1067353106670363250

$tInt64 = DllStructCreate('int64')
DllStructSetData($tInt64, 1, $iValue)
$tHiLo = DllStructCreate('dword;dword', DllStructGetPtr($tInt64))
ConsoleWrite('Hi DWord = 0x' & Hex(DllStructGetData($tHiLo, 2)) & @CR)
ConsoleWrite('Lo DWord = 0x' & Hex(DllStructGetData($tHiLo, 1)) & @CR)

Posted (edited)

Ah so i should create a DLL struct. Thank you so much... : D

*edit: it's really interesting how you used the dll struct pointer to directly pull into the new struct. I guess when doing this it automatically divvies up the different types? ;)

Edited by mavor

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...