View previous topic :: View next topic |
Author |
Message |
rfreeman Newbie cheater
Reputation: 0
Joined: 26 Jan 2010 Posts: 24
|
Posted: Sat Sep 17, 2011 7:57 am Post subject: Array of bytes |
|
|
Hi, does anyone know how to add an array of bytes in a script. At the moment I'm adding them with the mov command, many mov's, if the array is long. Is there a better way?
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Sep 17, 2011 5:51 pm Post subject: |
|
|
Care to show us what you are trying to do? Saying 'script' in general can mean so many different languages as well so we can't really help you unless you give us more information.
_________________
- Retired. |
|
Back to top |
|
 |
unknown_k Expert Cheater
Reputation: 5
Joined: 24 May 2011 Posts: 211
|
Posted: Sat Sep 17, 2011 8:39 pm Post subject: |
|
|
Wiccaan wrote: | Care to show us what you are trying to do? Saying 'script' in general can mean so many different languages as well so we can't really help you unless you give us more information. |
Yeah, I second this. Show us some example script or yours.
Unless you mean this
Code: | newmem:
db 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF |
|
|
Back to top |
|
 |
rfreeman Newbie cheater
Reputation: 0
Joined: 26 Jan 2010 Posts: 24
|
Posted: Sat Sep 24, 2011 3:59 am Post subject: |
|
|
Sorry, I mean add an array of bytes (on condition) in assembler in a code cave. E.g.
newmem:
cmp ebx,ecx
jne here
//add array of bytes to memory address
mov [eax],48F42400
mov [eax+4],497F3A8B
mov [eax+8],76209853
//is there a command that saves me adding the array with multiple mov commands?
here:
Thanks in advance
|
|
Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Sat Sep 24, 2011 1:42 pm Post subject: |
|
|
You may want to look into SIMD (Single Instruction, Multiple Data) instruction sets such as MMX and SSE. For this case, see the MOVUPS instruction.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Sat Sep 24, 2011 2:35 pm Post subject: |
|
|
and if you don't care about speed but just want some easy to read and understand code:
Code: |
mov esi,addressofaob
mov edi,eax
mov ecx,aobsize
rep movsb
|
you can speed it up by doing a rep movsw/movsd and divide ecx by 2 or 4 respectively and add the last (3 at most) bytes manually
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sun Sep 25, 2011 8:10 am Post subject: |
|
|
honestly, you shouldn't be caring about that
|
|
Back to top |
|
 |
rfreeman Newbie cheater
Reputation: 0
Joined: 26 Jan 2010 Posts: 24
|
Posted: Sun Sep 25, 2011 1:47 pm Post subject: |
|
|
Thanks for all your help
|
|
Back to top |
|
 |
|