Advertisement
Guest User

x86 Assembly AimBoT Source v2.0

a guest
Nov 16th, 2010
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 41.49 KB | None | 0 0
  1. #include <windows.h>
  2.  
  3. /*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                
  4. /NNNNNNNN        NNNNNNNN  iiii                    XXXXXXX       XXXXXXX                   lllllll                   MMMMMMMM               MMMMMMMM/
  5. /N:::::::N       N::::::N i::::i                   X:::::X       X:::::X                   l:::::l                   M:::::::M             M:::::::M/
  6. /N::::::::N      N::::::N  iiii                    X:::::X       X:::::X                   l:::::l                   M::::::::M           M::::::::M/
  7. /N:::::::::N     N::::::N                          X::::::X     X::::::X                   l:::::l                   M:::::::::M         M:::::::::M/
  8. /N::::::::::N    N::::::Niiiiiii     eeeeeeeeeeee  XXX:::::X   X:::::XXXrrrrr   rrrrrrrrr   l::::l   aaaaaaaaaaaaa   M::::::::::M       M::::::::::M/
  9. /N:::::::::::N   N::::::Ni:::::i   ee::::::::::::ee   X:::::X X:::::X   r::::rrr:::::::::r  l::::l   a::::::::::::a  M:::::::::::M     M:::::::::::M/
  10. /N:::::::N::::N  N::::::N i::::i  e::::::eeeee:::::ee  X:::::X:::::X    r:::::::::::::::::r l::::l   aaaaaaaaa:::::a M:::::::M::::M   M::::M:::::::M/
  11. /N::::::N N::::N N::::::N i::::i e::::::e     e:::::e   X:::::::::X     rr::::::rrrrr::::::rl::::l            a::::a M::::::M M::::M M::::M M::::::M/
  12. /N::::::N  N::::N:::::::N i::::i e:::::::eeeee::::::e   X:::::::::X      r:::::r     r:::::rl::::l     aaaaaaa:::::a M::::::M  M::::M::::M  M::::::M/
  13. /N::::::N   N:::::::::::N i::::i e:::::::::::::::::e   X:::::X:::::X     r:::::r     rrrrrrrl::::l   aa::::::::::::a M::::::M   M:::::::M   M::::::M/
  14. /N::::::N    N::::::::::N i::::i e::::::eeeeeeeeeee   X:::::X X:::::X    r:::::r            l::::l  a::::aaaa::::::a M::::::M    M:::::M    M::::::M/
  15. /N::::::N     N:::::::::N i::::i e:::::::e         XXX:::::X   X:::::XXX r:::::r            l::::l a::::a    a:::::a M::::::M     MMMMM     M::::::M/
  16. /N::::::N      N::::::::Ni::::::ie::::::::e        X::::::X     X::::::X r:::::r           l::::::la::::a    a:::::a M::::::M               M::::::M/
  17. /N::::::N       N:::::::Ni::::::i e::::::::eeeeeeeeX:::::X       X:::::X r:::::r           l::::::la:::::aaaa::::::a M::::::M               M::::::M/
  18. /N::::::N        N::::::Ni::::::i  ee:::::::::::::eX:::::X       X:::::X r:::::r           l::::::l a::::::::::aa:::aM::::::M               M::::::M/
  19. /NNNNNNNN         NNNNNNNiiiiiiii    eeeeeeeeeeeeeeXXXXXXX       XXXXXXX rrrrrrr           llllllll  aaaaaaaaaa  aaaaMMMMMMMM               MMMMMMMM/
  20. /                                                                                                                                                   /
  21. /                                                  all credits saves to NieXrlaM for coding                                                         /
  22. *////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"chat message";
  23.         int ChatOffset = 0x594830;
  24.         _asm{
  25.                             push [MessageType]
  26.                 push 0x3A83B201
  27.                                 push 0x96
  28.                 push [Text]
  29.                                 push [Text]
  30.                                 mov ESI,[Text]
  31.                                 mov ecx,esi
  32.                 call [ChatOffset]
  33.                                 add esp,0x14
  34.         }
  35. }
  36.  
  37. class MemHacking {
  38. public:
  39.                  float ReadFloat(unsigned int Address){
  40.               float N;
  41.                           _asm{
  42.                           push [Address]
  43.                           pop ebx
  44.               mov eax,dword ptr [ebx]
  45.                           mov [N],eax}return N;}
  46.                  int ReadInt(unsigned int Address){
  47.               int N;
  48.                           _asm{
  49.                           push [Address]
  50.                           pop ebx
  51.               mov eax,dword ptr [ebx]
  52.                           mov [N],eax}return N;}
  53.                  char* ReadChar(unsigned int Address,unsigned int Bytes){
  54.               Bytes -= 1;
  55.                           char* N;
  56.                           for (unsigned int i = 0; i <= Bytes; i++){
  57.                           char Temporary;
  58.                           __asm{
  59.                           xor edi,edi
  60.                           push [Address]
  61.                           pop edi
  62.                           xor edx,edx
  63.                           xor dx,dx
  64.                           xor dl,dl
  65.                           xor dh,dh
  66.                           mov dl,byte ptr ds:[edi]
  67.                           mov [Temporary],dl}
  68.                           N[i] = Temporary;
  69.                           Address++;}return N;}
  70.                  void writeMemByte(DWORD dwAddress, void* bytes, DWORD dwSize){
  71.                   DWORD flOldProtect = 0;
  72.                   VirtualProtect((void*)dwAddress, dwSize, PAGE_EXECUTE_READWRITE, &flOldProtect);
  73.                   memcpy((void*) dwAddress, bytes, dwSize);
  74.               VirtualProtect((void*)dwAddress, dwSize, flOldProtect, &flOldProtect);}
  75.                  void writeMemInt(DWORD dwAddress, int bytes){
  76.                   DWORD flOldProtect = 0;
  77.                   VirtualProtect((void*)dwAddress, sizeof(bytes), PAGE_EXECUTE_READWRITE, &flOldProtect);
  78.                   memcpy((void*) dwAddress, &bytes, sizeof(bytes));
  79.               VirtualProtect((void*)dwAddress, sizeof(bytes), flOldProtect, &flOldProtect);}
  80.                  void writeMemFloat(DWORD dwAddress, float bytes){
  81.                   DWORD flOldProtect = 0;
  82.                   VirtualProtect((void*)dwAddress, sizeof(bytes), PAGE_EXECUTE_READWRITE, &flOldProtect);
  83.                   memcpy((void*) dwAddress, &bytes, sizeof(bytes));
  84.               VirtualProtect((void*)dwAddress, sizeof(bytes), flOldProtect, &flOldProtect);}
  85. };
  86.  
  87. void Thermal(bool OnorOff){
  88.         MemHacking MH;
  89.         if(OnorOff == true){
  90.         MH.writeMemFloat(0x6746E58,1.00000011920929);}}
  91.  
  92. void Laser(bool OnorOff){
  93.         MemHacking MH;
  94.         if(OnorOff == false){
  95.         MH.writeMemInt(0x646E7B0,0);}
  96.         if(OnorOff == true){
  97.         MH.writeMemInt(0x646E7B0,1);}}
  98.  
  99. void FOV(bool OnorOff){
  100.         MemHacking MH;
  101.         if(OnorOff == true){
  102.     MH.writeMemFloat(0x64684A0,80);}}
  103.  
  104. void BlackNWhiteFix(bool OnorOff){
  105.         float BlackNWhiteValue = 0.407000005245209;
  106.         MemHacking MH;
  107.         if(OnorOff == true){
  108.         _asm{
  109.         push -1
  110.         fild dword ptr [esp]
  111.         fstp dword ptr[esp]
  112.         fld dword ptr [BlackNWhiteValue]
  113.         fld dword ptr [esp]
  114.         fmul
  115.         add esp,4
  116.         fstp dword ptr[BlackNWhiteValue]}
  117.         MH.writeMemFloat(0x8F280C,BlackNWhiteValue);}}
  118.  
  119. void GameESP(bool OnorOff){
  120.         MemHacking MH;
  121.         if(MH.ReadInt(0x7F58C8) == 4376){
  122.         if(OnorOff == false){
  123.         MH.writeMemInt(0xB9B828,4096);
  124.         MH.writeMemInt(0xB89060,4096);
  125.         MH.writeMemInt(0xB8C1AC,4096);
  126.         MH.writeMemInt(0xB8F2F8,4096);
  127.         MH.writeMemInt(0xB92444,4096);
  128.         MH.writeMemInt(0xB95590,4096);
  129.         MH.writeMemInt(0xB986DC,4096);}}
  130.         if(MH.ReadInt(0x7F58C8) == 4096){
  131.         if(OnorOff == true){
  132.         MH.writeMemInt(0xB9B828,4376);
  133.         MH.writeMemInt(0xB89060,4376);
  134.         MH.writeMemInt(0xB8C1AC,4376);
  135.         MH.writeMemInt(0xB8F2F8,4376);
  136.         MH.writeMemInt(0xB92444,4376);
  137.         MH.writeMemInt(0xB95590,4376);
  138.         MH.writeMemInt(0xB986DC,4376);}}}
  139.  
  140. DWORD WINAPI Mw2_Hack(LPVOID lpParam) {
  141.         bool EnableAimBoT = false;
  142.         bool EnableESPbox = false;
  143.         bool NoRecoil = false;
  144.         bool Thermalb = false;
  145.         bool Laserb = false;
  146.         bool NoFlash = false;
  147.         bool Re3Deffect = false;
  148.         bool BlackNwhiteF = false;
  149.         bool Radar = false;
  150.         bool Fovb = false;
  151.         MemHacking MH;
  152.         BYTE Nop[6] = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
  153.         while(true){
  154.                 if (GetAsyncKeyState(VK_NUMPAD0)){
  155.                         EnableAimBoT = EnableAimBoT == true ? false : true;
  156.                         Sleep(250);
  157.                         if (EnableAimBoT == true){
  158.                             MH.writeMemByte(0x56BAFD, Nop,6);
  159.                                 MH.writeMemByte(0x491C31, Nop,6);
  160.                                 SendTextToChat("^3AimBoT is ^2On");}
  161.                         else{
  162.                                 BYTE AimBoTx[6] = {0xF, 0x8B, 0x5C, 0xFF, 0xFF, 0xFF};
  163.                                 BYTE AimBoTy[6] = {0xF, 0x84, 0xA6, 0x0, 0x0, 0x0};
  164.                             MH.writeMemByte(0x56BAFD, AimBoTx,6);
  165.                                 MH.writeMemByte(0x491C31, AimBoTy,6);
  166.                                 SendTextToChat("^3AimBoT is ^1Off");}}
  167.                 if (GetAsyncKeyState(VK_NUMPAD1)){
  168.                         EnableESPbox = EnableESPbox == true ? false : true;
  169.                         Sleep(250);
  170.                         if (EnableESPbox == true){
  171.                             MH.writeMemByte(0x5A00FE, Nop,2);
  172.                                 MH.writeMemByte(0x4D7520, Nop,6);
  173.                                 SendTextToChat("^3EspBox is ^2On");}
  174.                         else{
  175.                                 BYTE Esp[6] = {0x8B, 0xD, 0xC8, 0x58, 0x7F, 0x0};
  176.                                 BYTE FixColdBlooded[2] = {0x75, 0x6F};
  177.                                 MH.writeMemByte(0x5A00FE, FixColdBlooded,2);
  178.                                 MH.writeMemByte(0x4D7520, Esp,6);
  179.                                 SendTextToChat("^3EspBox is ^1Off");}}
  180.                 if (GetAsyncKeyState(VK_NUMPAD2)){
  181.                         NoRecoil = NoRecoil == true ? false : true;
  182.                         Sleep(250);
  183.                         if (NoRecoil == true){
  184.                                 MH.writeMemByte(0x49D327, Nop,5);
  185.                                 SendTextToChat("^3No Recoil is ^2On");}
  186.                         else{
  187.                                 BYTE NoRecoil[5] = {0xE8,0xC4,0x53,0xFB,0xFF};
  188.                                 MH.writeMemByte(0x49D327, NoRecoil,5);
  189.                                 SendTextToChat("^3No Recoil is ^1Off");}}
  190.                 if (GetAsyncKeyState(VK_NUMPAD3)){
  191.                         Thermalb = Thermalb == true ? false : true;
  192.                         Sleep(250);
  193.                         if (Thermalb == true){
  194.                                 MH.writeMemByte(0x5102C4, Nop,5);
  195.                                 SendTextToChat("^3Thermal is ^2On");}
  196.                         else{
  197.                                 BYTE Thermal[5] = {0xA2, 0x58, 0x6E, 0x74, 0x6};
  198.                                 MH.writeMemByte(0x5102C4, Thermal,5);
  199.                                 SendTextToChat("^3Thermal is ^1Off");}}
  200.                 if (GetAsyncKeyState(VK_NUMPAD4)){
  201.                         Laserb = Laserb == true ? false : true;
  202.                         Sleep(250);
  203.                         if (Laserb == true){
  204.                                 SendTextToChat("^3Laser is ^2On");}
  205.                         else{
  206.                                 SendTextToChat("^3Laser is ^1Off");}}
  207.                 if (GetAsyncKeyState(VK_NUMPAD5)){
  208.                         NoFlash = NoFlash == true ? false : true;
  209.                         Sleep(250);
  210.                         if (NoFlash == true){
  211.                                 BYTE NoFlash1[10] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0};
  212.                                 BYTE NoFlash2[13] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0, 0x90, 0x90, 0x90};
  213.                                 BYTE NoFlash3[17] = {0xC7, 0x5, 0x2C, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0, 0x83, 0xC4, 0x10, 0xC3, 0xCC, 0xCC, 0xCC};
  214.                                 MH.writeMemByte(0x4AEE85, NoFlash1,10);
  215.                                 MH.writeMemByte(0x5966AA, NoFlash2,13);
  216.                                 MH.writeMemByte(0x5966DF, NoFlash3,17);
  217.                                 SendTextToChat("^3No Flash is ^2On");}
  218.                         else{
  219.                                 BYTE NoFlash1[10] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x1, 0x0, 0x0, 0x0};
  220.                                 BYTE NoFlash2[13] = {0xD9, 0x1D, 0x28, 0x98, 0x86, 0x0, 0xD9, 0x40, 0x1C, 0xD9, 0x5C, 0x24, 0x10};
  221.                                 BYTE NoFlash3[17] = {0xD9, 0x1D, 0x2C, 0x98, 0x86, 0x0, 0x83, 0xC4, 0x10, 0xC3, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC};
  222.                                 MH.writeMemByte(0x4AEE85, NoFlash1,10);
  223.                                 MH.writeMemByte(0x5966AA, NoFlash2,13);
  224.                                 MH.writeMemByte(0x5966DF, NoFlash3,17);
  225.                                 SendTextToChat("^3No Flash is ^1Off");}}
  226.                 if (GetAsyncKeyState(VK_NUMPAD6)){
  227.                         Re3Deffect = Re3Deffect == true ? false : true;
  228.                         Sleep(250);
  229.                         if (Re3Deffect == true){
  230.                                 MH.writeMemByte(0x404250, Nop,4);
  231.                                 SendTextToChat("^3Remove 3D Effects is ^2On");}
  232.                         else{
  233.                                 BYTE No3Deffects[4] = {0xD9, 0x44, 0xE4, 0x8};
  234.                                 MH.writeMemByte(0x404250, No3Deffects,4);
  235.                                 SendTextToChat("^3Remove 3D Effects is ^1Off");}}
  236.                 if (GetAsyncKeyState(VK_NUMPAD7)){
  237.                         BlackNwhiteF = BlackNwhiteF == true ? false : true;
  238.                         Sleep(250);
  239.                         if (BlackNwhiteF == true){
  240.                                 MH.writeMemByte(0x50E09B, Nop,4);
  241.                                 SendTextToChat("^0Black^3&^7White ^3Fix is ^2On");}
  242.                         else{
  243.                                 BYTE BlackNWhite[4] = {0xD9, 0x44, 0x24, 0x28};
  244.                                 MH.writeMemByte(0x50E09B, BlackNWhite,4);
  245.                     MH.writeMemFloat(0x8F280C,0.407000005245209);
  246.                                 SendTextToChat("^0Black^3&^7White ^3Fix is ^1Off");}}
  247.                 if (GetAsyncKeyState(VK_NUMPAD8)){
  248.                         Radar = Radar == true ? false : true;
  249.                         Sleep(250);
  250.                         if (Radar == true){
  251.                                 MH.writeMemByte(0x5806D0, Nop,2);
  252.                                 MH.writeMemByte(0x580701, Nop,2);
  253.                                 SendTextToChat("^3Radar is ^2On");}
  254.                         else{
  255.                                 BYTE Radarx[2] = {0x74, 0x3B};
  256.                                 BYTE Radary[2] = {0x74, 0x9};
  257.                                 MH.writeMemByte(0x5806D0, Radarx,2);
  258.                                 MH.writeMemByte(0x580701, Radary,2);
  259.                                 SendTextToChat("^3Radar is ^1Off");}}
  260.                 if (GetAsyncKeyState(VK_NUMPAD9)){
  261.                         Fovb = Fovb == true ? false : true;
  262.                         Sleep(250);
  263.                         if (Fovb == true){
  264.                                 SendTextToChat("^3FOV 80 is ^2On");}
  265.                         else{
  266.                                 MH.writeMemFloat(0x64684A0,65);
  267.                                 SendTextToChat("^3FOV 80 is ^1Off");}}
  268.                 GameESP(EnableESPbox);
  269.                 Thermal(Thermalb);
  270.                 Laser(Laserb);
  271.                 FOV(Fovb);
  272.                 BlackNWhiteFix(BlackNwhiteF);
  273.                 if (EnableAimBoT == true){
  274.                 AimBoT(0x7A3304,0xB36A44,0x7A3300,0xB36A40,0x7F5B78,0x7A32E8+4,0x7A32E8,0x7A32E8+8,0x7A3360+4,0x7A3360,0x7A3360+8,0x7F590C,0x7F8EE9,2406);
  275.                 }
  276.         }
  277. }
  278.  
  279. BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved) {
  280.     if (dwReason == DLL_PROCESS_ATTACH) {
  281.                 DisableThreadLibraryCalls( hModule );
  282.                 CreateThread(0, 0, Mw2_Hack, 0, 0, 0);
  283.         }
  284.     return TRUE;
  285. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement