Hi guys, I have been working with a dll for a mod I am making and I am having trouble changing a few pieces of it.
I realize that dll's are pretty complex and require editing of more then just one part of it, but I want to know what I need to do to get this to work.
I realize that dll's are pretty complex and require editing of more then just one part of it, but I want to know what I need to do to get this to work.
Code:
L241D3DD0:
mov ecx,[L243833F8]
mov edx,[ecx]
push 3F800000h
push BF800000h
call [edx+04h]
fstp dword ptr [esp+10h]
mov ecx,[L243833F8]
mov eax,[ecx]
push 3F800000h
push BF800000h
call [eax+04h]
fst dword ptr [esp+20h]
fmul dword ptr [esp+20h]
fld dword ptr [esp+10h]
fmul dword ptr [esp+10h]
faddp ST(1),ST
fcomp dword ptr [L242AF84C]
fnstsw ax
test ah,41h
jz L241D3DD0
[\code]
That is what I want to change, it picks two random numbers from -1 to 1 and repeats if the sum of their squares is greater than 1.
I have looked at the relocation tables and found there are cells that divide up this code. When I edit this code here I end up with some recognizeable code in the first cell I edit, but once I reach that cells boundary the next cell is just all 'dd' instructions according to pe explorer.
I have tried a variety of things and read some articles on pe header format and what I have come to understand is the dll keeps track of each instruction's size, be it 8 bytes, 4 bytes, etc. And when I put my code in there am changing the intruction sizes. So I kindly ask anyone who knows pe header format in much greater detail to explain how I can change what I need to change in order to but different size instructions in there.
Thank you for reading.