Advertisement
Guest User

x86 Assembly AimBoT Source v1.8

a guest
Nov 13th, 2010
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 24.72 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. *////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  23.  
  24. 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,unsigned int Gravity_Address,unsigned int If_Aiming_Tube_Address,float Tube_Velocity){
  25.     float My_X_Location,My_Y_Location,My_Z_Location,Enemy_X_Location,Enemy_Y_Location,Enemy_Z_Location,Gravity,Velocity,temp;
  26.     int retnto[3];
  27.             __asm{
  28. Start:
  29.               mov ecx,esp
  30.               push [Get_If_Aiming_Address]
  31.               call ReadMemory
  32.               fldz
  33.               fld dword ptr [esp]
  34.               fcom
  35.               fstsw ax
  36.               sahf
  37.               fstp dword ptr [esp-4]
  38.               fstp dword ptr [esp-4]
  39.               je onemoreChance
  40.               push 2500
  41.               fild dword ptr [esp]
  42.               fstp dword ptr [Velocity]
  43.               add esp,4
  44.               push 1
  45.               fild DWORD PTR [esp]
  46.               fstp DWORD PTR [Gravity]
  47.               add esp,4
  48.               jmp DontEndYet
  49. onemoreChance:
  50.               push [If_Aiming_Tube_Address]
  51.               call ReadMemory
  52.               pop eax
  53.               mov ebx,0
  54.               cmp eax,ebx
  55.               je end
  56.               push [If_Aiming_Tube_Address]
  57.               call ReadMemory
  58.               pop eax
  59.               mov ebx,3
  60.               cmp eax,ebx
  61.               jg end
  62.               mov eax,[Tube_Velocity]
  63.               mov [Velocity],eax
  64.               push [Gravity_Address]
  65.               call ReadMemory
  66.               fild DWORD PTR [esp]
  67.               fstp DWORD PTR [Gravity]
  68.               add esp,4
  69. DontEndYet:
  70.               push [My_X_Location_Address]
  71.               call ReadMemory
  72.               pop eax
  73.               push [My_Y_Location_Address]
  74.               call ReadMemory
  75.               pop edx
  76.               push [My_Z_Location_Address]
  77.               call ReadMemory
  78.               pop ebx
  79.               mov [My_X_Location],eax
  80.               mov [My_Y_Location],edx
  81.               mov [My_Z_Location],ebx
  82.               push [Enemy_X_Location_Address]
  83.               call ReadMemory
  84.               pop eax
  85.               push [Enemy_Y_Location_Address]
  86.               call ReadMemory
  87.               pop edx
  88.               push [Enemy_Z_Location_Address]
  89.               call ReadMemory
  90.               pop ebx
  91.               cmp eax,0
  92.               je Testz
  93.               jmp DontEnd
  94. Testz:
  95.               cmp edx,0
  96.               je Test1
  97.               jmp DontEnd
  98. Test1:
  99.               cmp ebx,0
  100.               je end
  101. DontEnd:
  102.               push [Enemy_X_Location_Address]
  103.               call ReadMemory
  104.               pop eax
  105.               push [Enemy_Y_Location_Address]
  106.               call ReadMemory
  107.               pop edx
  108.               push [Enemy_Z_Location_Address]
  109.               call ReadMemory
  110.               pop ebx
  111.               mov [Enemy_X_Location],eax
  112.               mov [Enemy_Y_Location],edx
  113.               mov [Enemy_Z_Location],ebx
  114.               fld dword ptr [Enemy_X_Location]
  115.               fld dword ptr [My_X_Location]
  116.               fsub
  117.               fstp dword ptr [My_X_Location]
  118.               fld dword ptr [Enemy_Y_Location]
  119.               fld dword ptr [My_Y_Location]
  120.               fsub
  121.               fstp dword ptr [My_Y_Location]
  122.               fld dword ptr [Enemy_Z_Location]
  123.               fld dword ptr [My_Z_Location]
  124.               fsub
  125.               fstp dword ptr [My_Z_Location]
  126.               fldz
  127.               fld dword ptr [My_Y_Location]
  128.               fcom
  129.               fstsw ax
  130.               sahf
  131.               fstp dword ptr [esp-4]
  132.               fstp dword ptr [esp-4]
  133.               jb Compare1
  134.               jmp endCompare1
  135. Compare1:
  136.               fldz
  137.               fld dword ptr [My_X_Location]
  138.               fcom
  139.               fstsw ax
  140.               sahf
  141.               fstp dword ptr [esp-4]
  142.               fstp dword ptr [esp-4]
  143.               jb Compare1_1
  144.               jge Compare1_2
  145. Compare1_1:
  146.               push -1
  147.               fild dword ptr [esp]
  148.               fstp dword ptr[esp]
  149.               fld dword ptr [esp]
  150.               fld dword ptr [My_X_Location]
  151.               fmul
  152.               fstp dword ptr [My_X_Location]
  153.               add esp,4
  154.               push -1
  155.               fild dword ptr [esp]
  156.               fstp dword ptr [esp]
  157.               fld dword ptr [esp]
  158.               fld dword ptr [My_Y_Location]
  159.               fmul
  160.               fstp dword ptr [My_Y_Location]
  161.               add esp,4
  162.               push 180
  163.               fild dword ptr [esp]
  164.               fstp dword ptr [esp]
  165.               push 1
  166.               call Degrees_X
  167.               jmp endCompare2
  168. Compare1_2:
  169.               push 1
  170.               fild dword ptr [esp]
  171.               fstp dword ptr [esp]
  172.               fld dword ptr [esp]
  173.               fld dword ptr [My_X_Location]
  174.               fmul
  175.               fstp dword ptr [My_X_Location]
  176.               add esp,4
  177.               push -1
  178.               fild dword ptr [esp]
  179.               fstp dword ptr [esp]
  180.               fld dword ptr [esp]
  181.               fld dword ptr [My_Y_Location]
  182.               fmul
  183.               fstp dword ptr [My_Y_Location]
  184.               add esp,4
  185.               push 90
  186.               fild dword ptr [esp]
  187.               fstp dword ptr [esp]
  188.               push 0
  189.               call Degrees_X
  190.               jmp endCompare2
  191. endCompare1:
  192.               fldz
  193.               fld dword ptr [My_Y_Location]
  194.               add esp,4
  195.               fcom
  196.               fstsw ax
  197.               sahf
  198.               fstp dword ptr [esp-4]
  199.               fstp dword ptr [esp-4]
  200.               jge Compare2
  201.               jmp endCompare2
  202. Compare2:
  203.               fldz
  204.               fld dword ptr [My_X_Location]
  205.               add esp,4
  206.               fcom
  207.               fstsw ax
  208.               sahf
  209.               fstp dword ptr [esp-4]
  210.               fstp dword ptr [esp-4]
  211.               jb Compare2_1
  212.               jge Compare2_2
  213. Compare2_1:
  214.               push -1
  215.               fild dword ptr [esp]
  216.               fstp dword ptr [esp]
  217.               fld dword ptr [esp]
  218.               fld dword ptr [My_X_Location]
  219.               fmul
  220.               fstp dword ptr [My_X_Location]
  221.               add esp,4
  222.               push 1
  223.               fild dword ptr [esp]
  224.               fstp dword ptr [esp]
  225.               fld dword ptr [esp]
  226.               fld dword ptr [My_Y_Location]
  227.               fmul
  228.               fstp dword ptr [My_Y_Location]
  229.               add esp,4
  230.               push 270
  231.               fild dword ptr [esp]
  232.               fstp dword ptr [esp]
  233.               push 0
  234.               call Degrees_X
  235.               jmp endCompare2
  236. Compare2_2:
  237.               push 1
  238.               fild dword ptr [esp]
  239.               fstp dword ptr [esp]
  240.               fld dword ptr [esp]
  241.               fld dword ptr [My_X_Location]
  242.               fmul
  243.               fstp dword ptr [My_X_Location]
  244.               add esp,4
  245.               push 1
  246.               fild dword ptr [esp]
  247.               fstp dword ptr [esp]
  248.               fld dword ptr [esp]
  249.               fld dword ptr [My_Y_Location]
  250.               fmul
  251.               fstp dword ptr [My_Y_Location]
  252.               add esp,4
  253.               push 0
  254.               fild dword ptr [esp]
  255.               fstp dword ptr [esp]
  256.               push 1
  257.               call Degrees_X
  258.               jmp endCompare2
  259. endCompare2:
  260.               push [Current_X_Degress_Address]
  261.               call ReadMemory
  262.               fldz
  263.               fld dword ptr [esp]
  264.               fcom
  265.               fstsw ax
  266.               sahf
  267.               fstp dword ptr [esp-4]
  268.               fstp dword ptr [esp-4]
  269.               jb add360d
  270.               jmp dadd360d
  271. add360d:
  272.               fld dword ptr [esp]
  273.               push 360
  274.               fild dword ptr [esp]
  275.               fstp dword ptr [esp]
  276.               fld dword ptr [esp]
  277.               fadd
  278.               add esp,4
  279.               fstp dword ptr [esp]
  280. dadd360d:
  281.               push [X_Degress_Address]
  282.               call ReadMemory
  283.               fld dword ptr [esp]
  284.               fld dword ptr [esp+4]
  285.               fsub
  286.               add esp,4
  287.               fstp dword ptr [esp]
  288.               fld dword ptr [esp]
  289.               fld dword ptr [esp+4]
  290.               fadd
  291.               add esp,4
  292.               fstp dword ptr [esp]
  293.               pop ebx
  294.               push [X_Degress_Address]
  295.               push ebx
  296.               call WriteMemory
  297.               call Degrees_Y
  298.               fld dword ptr [esp]
  299.               fld dword ptr [esp]
  300.               fcom
  301.               fstsw ax
  302.               sahf
  303.               fstp dword ptr [esp-4]
  304.               fstp dword ptr [esp-4]
  305.               jb end
  306.               push -1
  307.               fild dword ptr [esp]
  308.               fstp dword ptr [esp]
  309.               fld dword ptr [esp]
  310.               fld dword ptr [esp+4]
  311.               fmul
  312.               add esp,4
  313.               fstp dword ptr [esp]
  314.               push [Current_Y_Degress_Address]
  315.               call ReadMemory
  316.               push [Y_Degress_Address]
  317.               call ReadMemory
  318.               fld dword ptr [esp]
  319.               fld dword ptr [esp+4]
  320.               fsub
  321.               add esp,4
  322.               fstp dword ptr [esp]
  323.               fld dword ptr [esp]
  324.               fld dword ptr [esp+4]
  325.               fadd
  326.               add esp,4
  327.               fstp dword ptr [esp]
  328.               pop eax
  329.               push [Y_Degress_Address]
  330.               push eax
  331.               call WriteMemory
  332.               push [Enemy_X_Location_Address]
  333.               push 0
  334.               call WriteMemory
  335.               push [Enemy_Y_Location_Address]
  336.               push 0
  337.               call WriteMemory
  338.               push [Enemy_Z_Location_Address]
  339.               push 0
  340.               call WriteMemory
  341.               jmp end
  342. ReadMemory: ; ReadMemory(Address)
  343.               pop retnto[0]
  344.               pop esi
  345.               mov edi, dword ptr ds:[esi]
  346.               push edi
  347.               push retnto[0]
  348.               retn
  349. WriteMemory: ; WriteMemory(Address,Value)
  350.               pop retnto[0]
  351.               pop esi
  352.               pop edi
  353.               mov dword ptr ds:[edi], esi
  354.               push retnto[0]
  355.               retn
  356. Sqrt: ; Sqrt(Value)
  357.               pop retnto[0]
  358.               fld dword ptr [esp]
  359.               fsqrt
  360.               fstp dword ptr [esp]
  361.               push retnto[0]
  362.               retn
  363. Atan: ; Atan(Value)
  364.               pop retnto[0]
  365.               fld dword ptr [esp]
  366.               fld1
  367.               fpatan
  368.               fstp dword ptr [esp]
  369.               push 180
  370.               fild dword ptr [esp]
  371.               fstp dword ptr [esp]
  372.               fld dword ptr [esp]
  373.               fldpi
  374.               fdiv
  375.               fstp dword ptr [esp]
  376.               pop esi
  377.               fld dword ptr [esp]
  378.               push esi
  379.               fld dword ptr [esp]
  380.               fmul
  381.               add esp,4
  382.               fstp dword ptr [esp]
  383.               push retnto[0]
  384.               retn
  385. Pow: ; Pow(Base,Power)
  386.               pop retnto[0]
  387.               fld dword ptr [esp]
  388.               fld dword ptr [esp+4]
  389.               fld1
  390.               fsub
  391.               fyl2xp1
  392.               sub esp,16                              
  393.               fist dword ptr [esp+12]        
  394.               fld1
  395.               fstp tbyte ptr [esp]
  396.               fisub dword ptr [esp+12]          
  397.               mov eax, [esp+12]
  398.               add [esp+8],eax
  399.               f2xm1
  400.               fld1
  401.               fadd
  402.               fld tbyte ptr [esp]
  403.               fmul                                
  404.               add esp,20
  405.               fstp dword ptr [esp]
  406.               push retnto[0]
  407.               retn
  408. Asin: ; Asin(Value)
  409.               pop retnto[4]
  410.               push 2
  411.               fild dword ptr [esp]
  412.               fstp dword ptr [esp]
  413.               call Pow
  414.               pop edi
  415.               push edi
  416.               fld1
  417.               fld dword ptr [esp]
  418.               fsub
  419.               fstp dword ptr [esp]
  420.               push edi
  421.               fld dword ptr [esp]
  422.               fld dword ptr [esp+4]
  423.               fdiv
  424.               fstp dword ptr [esp]
  425.               call Sqrt
  426.               call Atan
  427.               push retnto[4]
  428.               retn
  429. Acos: ; Acos(Value)
  430.               pop retnto[4]
  431.               push 2
  432.               fild dword ptr [esp]
  433.               fstp dword ptr [esp]
  434.               call Pow
  435.               pop edi
  436.               push edi
  437.               fld1
  438.               fld dword ptr [esp]
  439.               fsub
  440.               fstp dword ptr [esp]
  441.               push edi
  442.               fld dword ptr [esp+4]
  443.               fld dword ptr [esp]
  444.               fdiv
  445.               fstp dword ptr [esp]
  446.               call Sqrt
  447.               call Atan
  448.               push retnto[4]
  449.               retn
  450. Degrees_X: ; Degrees_X(Value,Value)
  451.               pop retnto[8]
  452.               pop esi
  453.               pop [temp]
  454.               push [My_X_Location]
  455.               push 2
  456.               fild dword ptr [esp]
  457.               fstp dword ptr [esp]
  458.               call Pow
  459.               push [My_Y_Location]
  460.               push 2
  461.               fild dword ptr [esp]
  462.               fstp dword ptr [esp]
  463.               call Pow
  464.               fld dword ptr [esp+4]
  465.               fld dword ptr [esp]
  466.               fadd
  467.               add esp,4
  468.               fstp dword ptr [esp]
  469.               call Sqrt
  470.               push [My_X_Location]
  471.               fld dword ptr [esp]
  472.               fld dword ptr [esp+4]
  473.               fdiv
  474.               add esp,4
  475.               fstp dword ptr [esp]
  476.               pop edi
  477.               cmp esi,1
  478.               je DoSin_X
  479.               jmp DoCos_X
  480. DoSin_X:
  481.               push edi
  482.               call Asin
  483.               fld dword ptr [temp]
  484.               fld dword ptr [esp]
  485.               fadd
  486.               add esp,4
  487.               fstp dword ptr [esp]
  488.               push retnto[8]
  489.               retn
  490. DoCos_X:
  491.               push edi
  492.               call Acos
  493.               fld dword ptr [temp]
  494.               fld dword ptr [esp]
  495.               fadd
  496.               add esp,4
  497.               fstp dword ptr [esp]
  498.               push retnto[8]
  499.               retn
  500. Degrees_Y: ; Degrees_Y()
  501.               pop retnto[8]
  502.               push [My_X_Location]
  503.               push 2
  504.               fild dword ptr [esp]
  505.               fstp dword ptr [esp]
  506.               call Pow
  507.               push [My_Y_Location]
  508.               push 2
  509.               fild dword ptr [esp]
  510.               fstp dword ptr [esp]
  511.               call Pow
  512.               fld dword ptr [esp]
  513.               fld dword ptr [esp+4]
  514.               fadd
  515.               add esp,4
  516.               fstp dword ptr [esp]
  517.               call Sqrt
  518.               pop dword ptr [My_X_Location]
  519.               push [Velocity]
  520.               push 4
  521.               fild dword ptr [esp]
  522.               fstp dword ptr [esp]
  523.               call Pow
  524.               push dword ptr [My_X_Location]
  525.               push 2
  526.               fild dword ptr [esp]
  527.               fstp dword ptr [esp]
  528.               call Pow
  529.               fld dword ptr [esp]
  530.               fld dword ptr [Gravity]
  531.               fmul
  532.               fstp dword ptr [esp]
  533.               push 2
  534.               fild dword ptr [esp]
  535.               fstp dword ptr [esp]
  536.               fld dword ptr [esp]
  537.               fld dword ptr [My_Z_Location]
  538.               fmul
  539.               fstp dword ptr [esp]
  540.               push [Velocity]
  541.               push 2
  542.               fild dword ptr [esp]
  543.               fstp dword ptr [esp]
  544.               call Pow
  545.               fld dword ptr [esp]
  546.               fld dword ptr [esp+4]
  547.               fmul
  548.               add esp,4
  549.               fstp dword ptr [esp]
  550.               fld dword ptr [esp]
  551.               fld dword ptr [esp+4]
  552.               fadd
  553.               add esp,4
  554.               fstp dword ptr [esp]
  555.               fld dword ptr [Gravity]
  556.               fld dword ptr [esp]
  557.               fmul
  558.               fstp dword ptr [esp]
  559.               fld dword ptr [esp+4]
  560.               fld dword ptr [esp]
  561.               fsub
  562.               add esp,4
  563.               fstp dword ptr [esp]
  564.               call Sqrt
  565.               push [Velocity]
  566.               push 2
  567.               fild dword ptr [esp]
  568.               fstp dword ptr [esp]
  569.               call Pow
  570.               fld dword ptr [esp]
  571.               fld dword ptr [esp+4]
  572.               fsub
  573.               add esp,4
  574.               fstp dword ptr [esp]
  575.               push 0
  576.               fld dword ptr [Gravity]
  577.               fld dword ptr [My_X_Location]
  578.               fmul
  579.               fstp dword ptr [esp]
  580.               fld dword ptr [esp+4]
  581.               fld dword ptr [esp]
  582.               fdiv
  583.               add esp,4
  584.               fstp dword ptr [esp]
  585.               call Atan
  586.               push retnto[8]
  587.               retn
  588. end:
  589.               mov esp,ecx
  590.             }
  591.             Sleep(17);
  592. }
  593.  
  594. void SendTextToChat(char* Text){
  595.         char* MessageType = "chat message";
  596.         int ChatOffset = 0x594830;
  597.         _asm{
  598.                 push [MessageType]
  599.                 push 0x3A83B201
  600.                 push 0x96
  601.                 push [Text]
  602.                 push [Text]
  603.                 mov ESI,[Text]
  604.                 mov ecx,esi
  605.                 call [ChatOffset]
  606.                 add esp,0x14
  607.         }
  608. }
  609.  
  610. class MemHacking {
  611. public:
  612.          float ReadFloat(unsigned int Address){
  613.               float N;
  614.               _asm{
  615.               push [Address]
  616.               pop ebx
  617.               mov eax,dword ptr [ebx]
  618.               mov [N],eax}return N;}
  619.          int ReadInt(unsigned int Address){
  620.               int N;
  621.               _asm{
  622.               push [Address]
  623.               pop ebx
  624.               mov eax,dword ptr [ebx]
  625.               mov [N],eax}return N;}
  626.          char* ReadChar(unsigned int Address,unsigned int Bytes){
  627.               Bytes -= 1;
  628.               char* N;
  629.               for (unsigned int i = 0; i <= Bytes; i++){
  630.               char Temporary;
  631.               __asm{
  632.               xor edi,edi
  633.               push [Address]
  634.               pop edi
  635.               xor edx,edx
  636.               xor dx,dx
  637.               xor dl,dl
  638.               xor dh,dh
  639.               mov dl,byte ptr ds:[edi]
  640.               mov [Temporary],dl}
  641.               N[i] = Temporary;
  642.               Address++;}return N;}
  643.          void writeMemByte(DWORD dwAddress, void* bytes, DWORD dwSize){
  644.               DWORD flOldProtect = 0;
  645.               VirtualProtect((void*)dwAddress, dwSize, PAGE_EXECUTE_READWRITE, &flOldProtect);
  646.               memcpy((void*) dwAddress, bytes, dwSize);
  647.               VirtualProtect((void*)dwAddress, dwSize, flOldProtect, &flOldProtect);}
  648.          void writeMemInt(DWORD dwAddress, int bytes){
  649.               DWORD flOldProtect = 0;
  650.               VirtualProtect((void*)dwAddress, sizeof(bytes), PAGE_EXECUTE_READWRITE, &flOldProtect);
  651.               memcpy((void*) dwAddress, &bytes, sizeof(bytes));
  652.               VirtualProtect((void*)dwAddress, sizeof(bytes), flOldProtect, &flOldProtect);}
  653.          void writeMemFloat(DWORD dwAddress, float bytes){
  654.               DWORD flOldProtect = 0;
  655.               VirtualProtect((void*)dwAddress, sizeof(bytes), PAGE_EXECUTE_READWRITE, &flOldProtect);
  656.               memcpy((void*) dwAddress, &bytes, sizeof(bytes));
  657.               VirtualProtect((void*)dwAddress, sizeof(bytes), flOldProtect, &flOldProtect);}
  658. };
  659.  
  660. void Thermal(bool OnorOff){
  661.     MemHacking MH;
  662.     if(OnorOff == true){
  663.     MH.writeMemFloat(0x6746E58,1.00000011920929);}}
  664.  
  665. void Laser(bool OnorOff){
  666.     MemHacking MH;
  667.     if(OnorOff == false){
  668.     MH.writeMemInt(0x646E7B0,0);}
  669.     if(OnorOff == true){
  670.     MH.writeMemInt(0x646E7B0,1);}}
  671.  
  672. void FOV(bool OnorOff){
  673.     MemHacking MH;
  674.     if(OnorOff == true){
  675.     MH.writeMemFloat(0x64684A0,80);}}
  676.  
  677. void BlackNWhiteFix(bool OnorOff){
  678.     float BlackNWhiteValue = 0.407000005245209;
  679.     MemHacking MH;
  680.     if(OnorOff == true){
  681.     _asm{
  682.     push -1
  683.     fild dword ptr [esp]
  684.     fstp dword ptr[esp]
  685.     fld dword ptr [BlackNWhiteValue]
  686.     fld dword ptr [esp]
  687.     fmul
  688.     add esp,4
  689.     fstp dword ptr[BlackNWhiteValue]}
  690.     MH.writeMemFloat(0x8F280C,BlackNWhiteValue);}}
  691.  
  692. void GameESP(bool OnorOff){
  693.     MemHacking MH;
  694.     if(MH.ReadInt(0x7F58C8) != 4096){
  695.     if(OnorOff == false){
  696.     MH.writeMemInt(0xB9B828,4096);
  697.     MH.writeMemInt(0xB89060,4096);
  698.     MH.writeMemInt(0xB8C1AC,4096);
  699.     MH.writeMemInt(0xB8F2F8,4096);
  700.     MH.writeMemInt(0xB92444,4096);
  701.     MH.writeMemInt(0xB95590,4096);
  702.     MH.writeMemInt(0xB986DC,4096);}}
  703.     if(MH.ReadInt(0x7F58C8) != 4376){
  704.     if(OnorOff == true){
  705.     MH.writeMemInt(0xB9B828,4376);
  706.     MH.writeMemInt(0xB89060,4376);
  707.     MH.writeMemInt(0xB8C1AC,4376);
  708.     MH.writeMemInt(0xB8F2F8,4376);
  709.     MH.writeMemInt(0xB92444,4376);
  710.     MH.writeMemInt(0xB95590,4376);
  711.     MH.writeMemInt(0xB986DC,4376);}}}
  712.  
  713. DWORD WINAPI Mw2_Hack(LPVOID lpParam) {
  714.     bool EnableAimBoT = false;
  715.     bool EnableESPbox = false;
  716.     bool NoRecoil = false;
  717.     bool Thermalb = false;
  718.     bool Laserb = false;
  719.     bool NoFlash = false;
  720.     bool Re3Deffect = false;
  721.     bool BlackNwhiteF = false;
  722.     bool Radar = false;
  723.     bool Fovb = false;
  724.     MemHacking MH;
  725.     BYTE Nop[6] = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
  726.     while(true){
  727.         if (GetAsyncKeyState(VK_NUMPAD0)){
  728.             EnableAimBoT = EnableAimBoT == true ? false : true;
  729.             Sleep(250);
  730.             if (EnableAimBoT == true){
  731.                 MH.writeMemByte(0x56BAFD, Nop,6);
  732.                 MH.writeMemByte(0x491C31, Nop,6);
  733.                 SendTextToChat("^3AimBoT is ^2On");}
  734.             else{
  735.                 BYTE AimBoTx[6] = {0xF, 0x8B, 0x5C, 0xFF, 0xFF, 0xFF};
  736.                 BYTE AimBoTy[6] = {0xF, 0x84, 0xA6, 0x0, 0x0, 0x0};
  737.                 MH.writeMemByte(0x56BAFD, AimBoTx,6);
  738.                 MH.writeMemByte(0x491C31, AimBoTy,6);
  739.                 SendTextToChat("^3AimBoT is ^1Off");}}
  740.         if (GetAsyncKeyState(VK_NUMPAD1)){
  741.             EnableESPbox = EnableESPbox == true ? false : true;
  742.             Sleep(250);
  743.             if (EnableESPbox == true){
  744.                 MH.writeMemByte(0x5A00FE, Nop,2);
  745.                 MH.writeMemByte(0x4D7520, Nop,6);
  746.                 SendTextToChat("^3EspBox is ^2On");}
  747.             else{
  748.                 BYTE Esp[6] = {0x8B, 0xD, 0xC8, 0x58, 0x7F, 0x0};
  749.                 BYTE FixColdBlooded[2] = {0x75, 0x6F};
  750.                 MH.writeMemByte(0x5A00FE, FixColdBlooded,2);
  751.                 MH.writeMemByte(0x4D7520, Esp,6);
  752.                 SendTextToChat("^3EspBox is ^1Off");}}
  753.         if (GetAsyncKeyState(VK_NUMPAD2)){
  754.             NoRecoil = NoRecoil == true ? false : true;
  755.             Sleep(250);
  756.             if (NoRecoil == true){
  757.                 MH.writeMemByte(0x49D327, Nop,5);
  758.                 SendTextToChat("^3No Recoil is ^2On");}
  759.             else{
  760.                 BYTE NoRecoil[5] = {0xE8,0xC4,0x53,0xFB,0xFF};
  761.                 MH.writeMemByte(0x49D327, NoRecoil,5);
  762.                 SendTextToChat("^3No Recoil is ^1Off");}}
  763.         if (GetAsyncKeyState(VK_NUMPAD3)){
  764.             Thermalb = Thermalb == true ? false : true;
  765.             Sleep(250);
  766.             if (Thermalb == true){
  767.                 MH.writeMemByte(0x5102C4, Nop,5);
  768.                 SendTextToChat("^3Thermal is ^2On");}
  769.             else{
  770.                 BYTE Thermal[5] = {0xA2, 0x58, 0x6E, 0x74, 0x6};
  771.                 MH.writeMemByte(0x5102C4, Thermal,5);
  772.                 SendTextToChat("^3Thermal is ^1Off");}}
  773.         if (GetAsyncKeyState(VK_NUMPAD4)){
  774.             Laserb = Laserb == true ? false : true;
  775.             Sleep(250);
  776.             if (Laserb == true){
  777.                 SendTextToChat("^3Laser is ^2On");}
  778.             else{
  779.                 SendTextToChat("^3Laser is ^1Off");}}
  780.         if (GetAsyncKeyState(VK_NUMPAD5)){
  781.             NoFlash = NoFlash == true ? false : true;
  782.             Sleep(250);
  783.             if (NoFlash == true){
  784.                 BYTE NoFlash1[10] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0};
  785.                 BYTE NoFlash2[13] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0, 0x90, 0x90, 0x90};
  786.                 BYTE NoFlash3[17] = {0xC7, 0x5, 0x2C, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0, 0x83, 0xC4, 0x10, 0xC3, 0xCC, 0xCC, 0xCC};
  787.                 MH.writeMemByte(0x4AEE85, NoFlash1,10);
  788.                 MH.writeMemByte(0x5966AA, NoFlash2,13);
  789.                 MH.writeMemByte(0x5966DF, NoFlash3,17);
  790.                 SendTextToChat("^3No Flash is ^2On");}
  791.             else{
  792.                 BYTE NoFlash1[10] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x1, 0x0, 0x0, 0x0};
  793.                 BYTE NoFlash2[13] = {0xD9, 0x1D, 0x28, 0x98, 0x86, 0x0, 0xD9, 0x40, 0x1C, 0xD9, 0x5C, 0x24, 0x10};
  794.                 BYTE NoFlash3[17] = {0xD9, 0x1D, 0x2C, 0x98, 0x86, 0x0, 0x83, 0xC4, 0x10, 0xC3, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC};
  795.                 MH.writeMemByte(0x4AEE85, NoFlash1,10);
  796.                 MH.writeMemByte(0x5966AA, NoFlash2,13);
  797.                 MH.writeMemByte(0x5966DF, NoFlash3,17);
  798.                 SendTextToChat("^3No Flash is ^1Off");}}
  799.         if (GetAsyncKeyState(VK_NUMPAD6)){
  800.             Re3Deffect = Re3Deffect == true ? false : true;
  801.             Sleep(250);
  802.             if (Re3Deffect == true){
  803.                 MH.writeMemByte(0x404250, Nop,4);
  804.                 SendTextToChat("^3Remove 3D Effects is ^2On");}
  805.             else{
  806.                 BYTE No3Deffects[4] = {0xD9, 0x44, 0xE4, 0x8};
  807.                 MH.writeMemByte(0x404250, No3Deffects,4);
  808.                 SendTextToChat("^3Remove 3D Effects is ^1Off");}}
  809.         if (GetAsyncKeyState(VK_NUMPAD7)){
  810.             BlackNwhiteF = BlackNwhiteF == true ? false : true;
  811.             Sleep(250);
  812.             if (BlackNwhiteF == true){
  813.                 MH.writeMemByte(0x50E09B, Nop,4);
  814.                 SendTextToChat("^0Black^3&^7White ^3Fix is ^2On");}
  815.             else{
  816.                 BYTE BlackNWhite[4] = {0xD9, 0x44, 0x24, 0x28};
  817.                 MH.writeMemByte(0x50E09B, BlackNWhite,4);
  818.                 MH.writeMemFloat(0x8F280C,0.407000005245209);
  819.                 SendTextToChat("^0Black^3&^7White ^3Fix is ^1Off");}}
  820.         if (GetAsyncKeyState(VK_NUMPAD8)){
  821.             Radar = Radar == true ? false : true;
  822.             Sleep(250);
  823.             if (Radar == true){
  824.                 MH.writeMemByte(0x5806D0, Nop,2);
  825.                 MH.writeMemByte(0x580701, Nop,2);
  826.                 SendTextToChat("^3Radar Fix is ^2On");}
  827.             else{
  828.                 BYTE Radarx[2] = {0x74, 0x3B};
  829.                 BYTE Radary[2] = {0x74, 0x9};
  830.                 MH.writeMemByte(0x5806D0, Radarx,2);
  831.                 MH.writeMemByte(0x580701, Radary,2);
  832.                 SendTextToChat("^3Radar Fix is ^1Off");}}
  833.         if (GetAsyncKeyState(VK_NUMPAD9)){
  834.             Fovb = Fovb == true ? false : true;
  835.             Sleep(250);
  836.             if (Fovb == true){
  837.                 SendTextToChat("^3FOV 80 is ^2On");}
  838.             else{
  839.                 MH.writeMemFloat(0x64684A0,65);
  840.                 SendTextToChat("^3FOV 80 is ^1Off");}}
  841.         GameESP(EnableESPbox);
  842.         Thermal(Thermalb);
  843.         Laser(Laserb);
  844.         FOV(Fovb);
  845.         BlackNWhiteFix(BlackNwhiteF);
  846.         if (EnableAimBoT == true){
  847.         AimBoT(0x7A3304,0xB36A44,0x7A3300,0xB36A40,0x7F5B78,0x7A32E8+4,0x7A32E8,0x7A32E8+8,0x7A3360+4,0x7A3360,0x7A3360+8,0x7F590C,0x7F8EE9,2406);
  848.         }
  849.     }
  850. }
  851.  
  852. BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved) {
  853.     if (dwReason == DLL_PROCESS_ATTACH) {
  854.                 DisableThreadLibraryCalls( hModule );
  855.                 CreateThread(0, 0, Mw2_Hack, 0, 0, 0);
  856.         }
  857.     return TRUE;
  858. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement