Code:
void AimBoT(unsigned int Current_X_Degress_Address,unsigned int X_Degress_Address,unsigned int Current_Y_Degress_Address,unsigned int Y_Degress_Address,unsigned int Get_If_Aiming_Address,unsigned int My_X_Location_Address,unsigned int My_Y_Location_Address,unsigned int My_Z_Location_Address,unsigned int Enemy_X_Location_Address,unsigned int Enemy_Y_Location_Address,unsigned int Enemy_Z_Location_Address){
float My_X_Location,My_Y_Location,My_Z_Location,Enemy_X_Location,Enemy_Y_Location,Enemy_Z_Location,temp;
int Returns[12];
__asm{
Start:
mov ecx,esp
push [Get_If_Aiming_Address]
call ReadMemory
fldz
fld dword ptr [esp]
fcom
fstsw ax
sahf
fstp dword ptr [esp-4]
fstp dword ptr [esp-4]
je end
push [My_X_Location_Address]
call ReadMemory
pop eax
push [My_Y_Location_Address]
call ReadMemory
pop edx
push [My_Z_Location_Address]
call ReadMemory
pop ebx
mov [My_X_Location],eax
mov [My_Y_Location],edx
mov [My_Z_Location],ebx
push [Enemy_X_Location_Address]
call ReadMemory
pop eax
push [Enemy_Y_Location_Address]
call ReadMemory
pop edx
push [Enemy_Z_Location_Address]
call ReadMemory
pop ebx
cmp eax,0
je Testz
jmp DontEnd
Testz:
cmp edx,0
je Test1
jmp DontEnd
Test1:
cmp ebx,0
je end
DontEnd:
push [Enemy_X_Location_Address]
call ReadMemory
pop eax
push [Enemy_Y_Location_Address]
call ReadMemory
pop edx
push [Enemy_Z_Location_Address]
call ReadMemory
pop ebx
mov [Enemy_X_Location],eax
mov [Enemy_Y_Location],edx
mov [Enemy_Z_Location],ebx
fld dword ptr [Enemy_X_Location]
fld dword ptr [My_X_Location]
fsub
fstp dword ptr [My_X_Location]
fld dword ptr [Enemy_Y_Location]
fld dword ptr [My_Y_Location]
fsub
fstp dword ptr [My_Y_Location]
fld dword ptr [Enemy_Z_Location]
fld dword ptr [My_Z_Location]
fsub
fstp dword ptr [My_Z_Location]
fldz
fld dword ptr [My_Y_Location]
fcom
fstsw ax
sahf
fstp dword ptr [esp-4]
fstp dword ptr [esp-4]
jb Compare1
jmp endCompare1
Compare1:
fldz
fld dword ptr [My_X_Location]
fcom
fstsw ax
sahf
fstp dword ptr [esp-4]
fstp dword ptr [esp-4]
jb Compare1_1
jge Compare1_2
Compare1_1:
push -1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_X_Location]
fmul
fstp DWORD PTR [My_X_Location]
add esp,4
push -1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_Y_Location]
fmul
fstp DWORD PTR [My_Y_Location]
add esp,4
push 180
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
push 1
call Degrees_X
jmp endCompare2
Compare1_2:
push 1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_X_Location]
fmul
fstp DWORD PTR [My_X_Location]
add esp,4
push -1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_Y_Location]
fmul
fstp DWORD PTR [My_Y_Location]
add esp,4
push 90
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
push 0
call Degrees_X
jmp endCompare2
endCompare1:
fldz
fld dword ptr [My_Y_Location]
add esp,4
fcom
fstsw ax
sahf
fstp dword ptr [esp-4]
fstp dword ptr [esp-4]
jge Compare2
jmp endCompare2
Compare2:
fldz
fld dword ptr [My_X_Location]
add esp,4
fcom
fstsw ax
sahf
fstp dword ptr [esp-4]
fstp dword ptr [esp-4]
jb Compare2_1
jge Compare2_2
Compare2_1:
push -1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_X_Location]
fmul
fstp DWORD PTR [My_X_Location]
add esp,4
push 1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_Y_Location]
fmul
fstp DWORD PTR [My_Y_Location]
add esp,4
push 270
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
push 0
call Degrees_X
jmp endCompare2
Compare2_2:
push 1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_X_Location]
fmul
fstp DWORD PTR [My_X_Location]
add esp,4
push 1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld dword ptr [My_Y_Location]
fmul
fstp DWORD PTR [My_Y_Location]
add esp,4
push 0
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
push 1
call Degrees_X
jmp endCompare2
endCompare2:
push [Current_X_Degress_Address]
call ReadMemory
fldz
fld dword ptr [esp]
fcom
fstsw ax
sahf
fstp dword ptr [esp-4]
fstp dword ptr [esp-4]
jb add360d
jmp dadd360d
add360d:
fld dword ptr [esp]
push 360
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld dword ptr [esp]
fadd
add esp,4
fstp DWORD PTR [esp]
dadd360d:
push [X_Degress_Address]
call ReadMemory
fld dword ptr [esp]
fld dword ptr [esp+4]
fsub
add esp,4
fstp dword ptr [esp]
fld dword ptr [esp]
fld dword ptr [esp+4]
fadd
add esp,4
fstp dword ptr [esp]
pop ebx
push [X_Degress_Address]
push ebx
call WriteMemory
fldz
fld dword ptr [My_Z_Location]
fcom
fstsw ax
sahf
fstp dword ptr [esp-4]
fstp dword ptr [esp-4]
jb DoMinus
push -1
jmp elseDoPlus
DoMinus:
fld [My_Z_Location]
push -1
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fmul
fstp DWORD PTR [My_Z_Location]
push 1
elseDoPlus:
call Degrees_Y;
push [Current_Y_Degress_Address]
call ReadMemory
push [Y_Degress_Address]
call ReadMemory
fld dword ptr [esp]
fld dword ptr [esp+4]
fsub
add esp,4
fstp dword ptr [esp]
fld dword ptr [esp]
fld dword ptr [esp+4]
fadd
add esp,4
fstp dword ptr [esp]
pop eax
push [Y_Degress_Address]
push eax
call WriteMemory
push [Enemy_X_Location_Address]
push 0
call WriteMemory
push [Enemy_Y_Location_Address]
push 0
call WriteMemory
push [Enemy_Z_Location_Address]
push 0
call WriteMemory
jmp end
ReadMemory: ; ReadMemory(Address)
pop (Returns[0])
pop esi
mov edi, DWORD PTR DS:[esi]
push edi
xor edi,edi
xor esi,esi
push (Returns[0])
retn
WriteMemory: ; WriteMemory(Address,Value)
pop (Returns[0])
pop esi
pop edi
mov DWORD PTR DS:[edi], esi
xor esi,esi
xor edi,edi
push (Returns[0])
retn
Sqrt: ; Sqrt(Value)
pop (Returns[0])
fld dword ptr [esp]
fsqrt
fstp dword ptr [esp]
push (Returns[0])
retn
Atan: ; Atan(Value)
pop (Returns[0])
fld dword ptr [esp]
fld1
fpatan
fstp dword ptr [esp]
push 180
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld dword ptr [esp]
fldpi
fdiv
fstp dword ptr [esp]
pop esi
fld dword ptr [esp]
push esi
fld dword ptr [esp]
fmul
add esp,4
fstp dword ptr [esp]
push (Returns[0])
retn
Pow: ; Pow(Base,Power)
pop (Returns[0])
fld DWORD PTR [esp]
fld DWORD PTR [esp+4]
fld1
fsub
fyl2xp1
sub esp,16
fist DWORD PTR [esp+12]
fld1
fstp TBYTE PTR [esp]
fisub DWORD PTR [esp+12]
mov eax, [esp+12]
add [esp+8],eax
f2xm1
fld1
fadd
fld TBYTE PTR [esp]
fmul
add esp,20
fstp DWORD PTR [esp]
push (Returns[0])
retn
Asin: ; Asin(Value)
pop (Returns[4])
push 2
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
call Pow
pop edi
push edi
fld1
fld DWORD PTR [esp]
fsub
fstp DWORD PTR [esp]
push edi
fld DWORD PTR [esp]
fld DWORD PTR [esp+4]
fdiv
fstp DWORD PTR [esp]
call Sqrt
call Atan
push (Returns[4])
retn
Acos: ; Acos(Value)
pop (Returns[4])
push 2
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
call Pow
pop edi
push edi
fld1
fld DWORD PTR [esp]
fsub
fstp DWORD PTR [esp]
push edi
fld DWORD PTR [esp+4]
fld DWORD PTR [esp]
fdiv
fstp DWORD PTR [esp]
call Sqrt
call Atan
push (Returns[4])
retn
Degrees_X: ; Degrees_X(Value,Value)
pop (Returns[8])
pop esi
pop [temp]
push [My_X_Location]
push 2
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
call Pow
push [My_Y_Location]
push 2
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
call Pow
fld DWORD PTR [esp+4]
fld DWORD PTR [esp]
fadd
add esp,4
fstp DWORD PTR [esp]
call Sqrt
push [My_X_Location]
fld DWORD PTR [esp]
fld DWORD PTR [esp+4]
fdiv
add esp,4
fstp DWORD PTR [esp]
pop edi
cmp esi,1
je DoSin_X
jmp DoCos_X
DoSin_X:
push edi
call Asin
fld DWORD PTR [temp]
fld DWORD PTR [esp]
fadd
add esp,4
fstp DWORD PTR [esp]
push (Returns[8])
retn
DoCos_X:
push edi
call Acos
fld DWORD PTR [temp]
fld DWORD PTR [esp]
fadd
add esp,4
fstp DWORD PTR [esp]
push (Returns[8])
retn
Degrees_Y: ; Degrees_Y()
pop (Returns[8])
pop [temp]
push [My_X_Location]
push 2
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
call Pow
push [My_Y_Location]
push 2
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
call Pow
fld DWORD PTR [esp+4]
fld DWORD PTR [esp]
fadd
add esp,4
fstp DWORD PTR [esp]
push [My_Z_Location]
push 2
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
call Pow
fld DWORD PTR [esp+4]
fld DWORD PTR [esp]
fadd
add esp,4
fstp DWORD PTR [esp]
call Sqrt
push [My_Z_Location]
fld DWORD PTR [esp]
fld DWORD PTR [esp+4]
fdiv
add esp,4
fstp DWORD PTR [esp]
call Asin
push temp
fild DWORD PTR [esp]
fstp DWORD PTR [esp]
fld DWORD PTR [esp]
fld DWORD PTR [esp+4]
fmul
add esp,4
fstp DWORD PTR [esp]
push (Returns[8])
retn
end:
mov esp,ecx
}
Sleep(17);
}
void SendTextToChat(char* Text){
char* MessageType = "chat message";
int ChatOffset = 0x594830;
_asm{
push [MessageType]
push 0x3A83B201
push 0x96
push [Text]
push [Text]
mov ESI,[Text]
mov ecx,esi
call [ChatOffset]
add esp,0x14
}
}
DWORD WINAPI AimBoT(LPVOID lpParam) {
bool Enable = false;
while(true){
if (GetAsyncKeyState(VK_F11)){
Enable = Enable == true ? false : true;
Sleep(250);
if (Enable == true){
SendTextToChat("^3AimBoT is ^2On");}
else{
SendTextToChat("^3AimBoT is ^1Off");}
}
if (Enable == true){
AimBoT(0x7A3304,0xB36A44,0x7A3300,0xB36A40,0x7F5B78,0x7A32E8+4,0x7A32E8,0x7A32E8+8,0x7A3360+4,0x7A3360,0x7A3360+8);
}
}
}
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved) {
if (dwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls( hModule );
CreateThread(0, 0, AimBoT, 0, 0, 0);
}
return TRUE;
}