[-]
Shout:
Click Refresh to load shouts.

Post Reply 
 
Thread Rating:
  • 6 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LongToByte in ASM
12-20-2007, 12:39 PM
Post: #1
LongToByte in ASM
This could be included in packet.dll or your ASM program if you'd feel like it. LongToByte(dword, 0) would get you the first byte, and , 1 would get you the second byte etc.

Code:
LongToByte proc szValue:DWORD,nCount:DWORD
    lea eax,szValue ; Set eax to the address of szValue
    add eax,nCount ; We add nCount to eax (if nCount is 1 we will return the second byte of the dword)
    movzx eax,byte ptr [eax] ; We move a byte into the 32-bit register using movzx. eax will now hold the correct byte
    ret ; Return eax which holds the correct byte to the application calling this function
LongToByte endp
Find all posts by this user
Quote this message in a reply
12-20-2007, 03:57 PM
Post: #2
LongToByte in ASM
putting it on packet structure's post Wink
thanks you

~juapillo~

-I'm the best and fuck the rest-
Find all posts by this user
Quote this message in a reply
Post Reply 



Contact UsTProgrammingReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication