RE: Kernel32.dll Beep Function 04-25-2013, 06:52 AM
#5
I thought of storing the full value in a register, and then pushing the high and low off on the stack separately before, which should work. Unless I go with higher values. 8 bits is really small though... So why cl? :S Perhaps split one up into 16 bits instead?
I could probably even utilize some bitshifting to get rid of some 0x0's. I suppose this will work for smaller values though, but I think 0x3E8 is a bit too big for an 8 bit storage, so I'm not sure why you posted that. :S
Anyways here's what I got:
Which would be:
And all works fine
I could probably even utilize some bitshifting to get rid of some 0x0's. I suppose this will work for smaller values though, but I think 0x3E8 is a bit too big for an 8 bit storage, so I'm not sure why you posted that. :S
Anyways here's what I got:
Code:
__asm
{
mov ecx, dword ptr 0x755631AF
xor eax, eax
mov ax, 0x320
push eax
mov ax, 0x450
push eax
call ecx
}Which would be:
Code:
\xB9\xAF\x31\x56\x75\x33\xC0\x66\xB8\x20\x03\x50\x66\xB8\x50\x04\x50\xFF\xD1\xC3And all works fine
-- cxS
[ Haskell/.NET/C/C++ - Software Engineer ]


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)