Help With Fireball with one charge.

12/04/2009 18:17 wossen#1
Hi, I was playing around with the skill.dll in mabinogi and i think i found something related to fireball without the 5 charges, i know there's a version released already but i like to figure how things work out by myself. :)

So... anyways i don't understand this part

Quote:
text:100432B2 test al, al
i know its somehow testing/comparing something. can i just change test to NOP or JMP. I'm new to this so sorry if it doesn't make much sense.

and...

Quote:
cmp al, 5
it's defiantly testing something. Al could be the storage of something and the 5 must be how much you need to cast right? :D

anyways I'd like it if you could help me out or just push (not spoon-feed) me in the right direction
12/04/2009 18:42 fenrir2037#2
You almost have it. Just use your brain. Think think.
12/04/2009 19:11 Kefkai#3
The function of Test for you direct from the art of assembly book:

Another important use of the test instruction is to efficiently compare a register against zero. The following test instruction sets the zero flag if and only if ax contains zero (anything anded with itself produces its original value; this sets the zero flag only if that value is zero):




test ax, ax


As for what CMP does is it compares the value of the al register to 5, usually followed by a jump if that value matches.

You do seem to be really close though, this is some of the easier ASM to understand.
12/04/2009 19:36 agencysistine#4
Look at the line directly below the CMP line, it'll be Jump IF condition is met.

You just want to jump regardless of any condition.
12/04/2009 20:22 wossen#5
Ok so i know now that AL = 0. so I looked around a little more and found another register, which is AH. I googles and i found

Quote:
test ah, 5
(AH contains the high byte of AX?)<-- kinda don't get that.

And looked a little deeper to find out that AX is a General-Purpose Register, which is mostly used for calculations and for input/output (so this must be the input for the user(me)) below that is a JP (It jumps if there is parity or if the parity is even?) so I pretty much get the function (i think) now i should fill it with NOP's but i don't know how to do it on IDA... can someone help with that part please? Thanks in advance.
12/04/2009 21:08 fenrir2037#6
Quote:
Originally Posted by wossen View Post
Ok so i know now that AL = 0. so I looked around a little more and found another register, which is AH. I googles and i found

(AH contains the high byte of AX?)<-- kinda don't get that.

And looked a little deeper to find out that AX is a General-Purpose Register, which is mostly used for calculations and for input/output (so this must be the input for the user(me)) below that is a JP (It jumps if there is parity or if the parity is even?) so I pretty much get the function (i think) now i should fill it with NOP's but i don't know how to do it on IDA... can someone help with that part please? Thanks in advance.
^Talk to me in pm.
12/04/2009 21:38 Dark Raccoon#7
We are starting to get more Coders and less Leechers. :D
12/04/2009 21:59 shadownewbz#8
Quote:
Originally Posted by Dark Raccoon View Post
We are starting to get more Coders and less Leechers. :D
I think we're getting more coders and even more leechers o.o...
12/04/2009 22:01 Black Fomor#9
Quote:
Originally Posted by Dark Raccoon View Post
We are starting to get more Coders and less Leechers. :D
QFT
but I'm still a leecher :<
12/04/2009 22:02 Kevsprk#10
[Only registered and activated users can see links. Click Here To Register...]
12/05/2009 05:28 Kefkai#11
Quote:
Originally Posted by Dark Raccoon View Post
We are starting to get more Coders and less Leechers. :D
And the same amount of Lurkers!

Where's that Checkerbox fellow, he's probably lurking too.

I've still yet to contribute since I more or less just watch to see what's happening, I don't even PE, it's lame.
12/05/2009 05:38 Kevsprk#12
Quote:
Originally Posted by Kefkai View Post
And the same amount of Lurkers!

Where's that Checkerbox fellow, he's probably lurking too.

I've still yet to contribute since I more or less just watch to see what's happening, I don't even PE, it's lame.
And more people getting a clue.
12/05/2009 05:57 Dark Raccoon#13
#Closed, Guide was posted.