| View previous topic :: View next topic |
| Author |
Message |
sired22 Cheater
Reputation: 1
Joined: 22 Aug 2006 Posts: 36
|
Posted: Tue Jun 16, 2009 3:31 am Post subject: BlackMagic FASM error |
|
|
I need help. currently i am using the newest blackmagic lib in a program i am making trying to inject the following asm using managed FASM
BlackMagic.Asm.Clear()
BlackMagic.Asm.AddLine("mov eax,[eax+10]")
BlackMagic.Asm.AddLine("mov [0x{0}],eax", Readat.tostring("X8"))
BlackMagic.Asm.AddLine("cmp byte ptr [eax+08],02")
BlackMagic.Asm.AddLine("retn")
after allocating a cave i get an error on the following line
BlackMagic.Asm.Inject(Cave) - Assembly failed! Error code: -118; Error Line: 5
from what i can see everything about that is right. there isnt even a line 5
any suggestions?
if you have no idea what blackmagic is look it up on google its mostly tied to WOW for memory editing
--EDIT--
found out what went wrong. turns out when the managed fasm parses numbers it treats them as decimals and not hex. so my .tostring("X8") was confusing it with hex values. that also meens i need to change any numbers to there decimals if i want them injected right.
injecting "mov eax,[eax+10]" will become "mov eax,[eax+0A]" because its treating it as a decimal. to properly inject it i would need "mov eax,[eax+16]"
i'm not sure if its a bug or a feature but seeing as i have the source im goig to recompile with an optional flag to treat numbers as hex or decimal
stll getting an error at flavy.AddLine("cmp byte ptr [eax+8],02") dont know why though thats part of the orginal code. im just moving it.
Last edited by sired22 on Tue Jun 16, 2009 11:29 pm; edited 3 times in total |
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Tue Jun 16, 2009 10:18 am Post subject: |
|
|
| I've been trying to find BlackMagic, can you possible link me to it?
|
|
| Back to top |
|
 |
sired22 Cheater
Reputation: 1
Joined: 22 Aug 2006 Posts: 36
|
|
| Back to top |
|
 |
arigity Advanced Cheater
Reputation: 0
Joined: 03 Jul 2008 Posts: 65 Location: middle of nowhere.
|
Posted: Thu Jun 18, 2009 1:08 pm Post subject: Re: BlackMagic FASM error |
|
|
| sired22 wrote: | | injecting "mov eax,[eax+10]" will become "mov eax,[eax+0A]" because its treating it as a decimal. to properly inject it i would need "mov eax,[eax+16]" |
to do hex in fasm you can either write $10, 10h or 0x10
| sired22 wrote: | | stll getting an error at flavy.AddLine("cmp byte ptr [eax+8],02") dont know why though thats part of the orginal code. im just moving it. |
not correct fasm syntax. try cmp byte [eax+8], 02 instead.
_________________
|
|
| Back to top |
|
 |
sired22 Cheater
Reputation: 1
Joined: 22 Aug 2006 Posts: 36
|
Posted: Fri Jun 19, 2009 6:48 am Post subject: |
|
|
Thanks for the help arigity.
I was looking at the inject method of the source code when i noticed the hex formatters.
Also thanks for the info on the formating. Guess i will have to download fasm documentation so i can check for things like that.
Your post pointed me in the right direction while informing me there might be format issues between fasm and the asm cheat engine displays. so thanks again.
|
|
| Back to top |
|
 |
|