Anonymous
April 1st, 2004, 05:57
What have we here?
Many scripts where conditional jumps don't work appropiately.
I have a lot of scripts but, How many do they work correctly?
Mmmmmmmmm, few scripts.
Why? I think that OllyScript is for the time being, an experimental
language of scripts and many bugs should be repaired.
The scripts only works where the code is separated by blocks, which transfer the control to the next block when an exception or a BP happens:
start:
run
bloqck1:
gpa "LoadLibraryA","kernel32.dll" //GetProcAddress
bphws $RESULT, "x"
eob block2
run
block2:
eob block3
run
block3:
eob block4:
run
block4:
bphwc $RESULT
end:
msg "This is a shit, This is a shit, This is a shit"
ret
THIS IS A SHIT, because previously it is necessary to count the quantity of times that the program stops in that BP and then to make a block for every time.
The best thing is to make a single main block which repeats until a
condition is completed:
start:
run
bloqck1:
gpa "LoadLibraryA","kernel32.dll" //GetProcAddress
bphws $RESULT, "x"
eob block2
run
single_main_block:
mov a,eax
cmp a,44332211 (for example)
je PATCH:
continue:
log a
eob single_main_block
run
jmp single_main_block
PATCH:
mov [a], #11223344#
bphwc $RESULT
msg "This is correct but it doesn't work yet"
ret
The problem is that "je PATCH" is never executed when "cmp a,WWXXYYZZ" is true: PATCH label will be never executed.
I have loged variables to Log Window to see their values, but when "a" takes the value 44332211, the jump is not executed.
Could somebody tell me how to make so that this work appropiately, please?
From the depths of the abyss...
SACCOPHARYNX
Many scripts where conditional jumps don't work appropiately.
I have a lot of scripts but, How many do they work correctly?
Mmmmmmmmm, few scripts.
Why? I think that OllyScript is for the time being, an experimental
language of scripts and many bugs should be repaired.
The scripts only works where the code is separated by blocks, which transfer the control to the next block when an exception or a BP happens:
start:
run
bloqck1:
gpa "LoadLibraryA","kernel32.dll" //GetProcAddress
bphws $RESULT, "x"
eob block2
run
block2:
eob block3
run
block3:
eob block4:
run
block4:
bphwc $RESULT
end:
msg "This is a shit, This is a shit, This is a shit"
ret
THIS IS A SHIT, because previously it is necessary to count the quantity of times that the program stops in that BP and then to make a block for every time.
The best thing is to make a single main block which repeats until a
condition is completed:
start:
run
bloqck1:
gpa "LoadLibraryA","kernel32.dll" //GetProcAddress
bphws $RESULT, "x"
eob block2
run
single_main_block:
mov a,eax
cmp a,44332211 (for example)
je PATCH:
continue:
log a
eob single_main_block
run
jmp single_main_block
PATCH:
mov [a], #11223344#
bphwc $RESULT
msg "This is correct but it doesn't work yet"
ret
The problem is that "je PATCH" is never executed when "cmp a,WWXXYYZZ" is true: PATCH label will be never executed.
I have loged variables to Log Window to see their values, but when "a" takes the value 44332211, the jump is not executed.
Could somebody tell me how to make so that this work appropiately, please?
From the depths of the abyss...
SACCOPHARYNX