Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- /*///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /NNNNNNNN NNNNNNNN iiii XXXXXXX XXXXXXX lllllll MMMMMMMM MMMMMMMM/
- /N:::::::N N::::::N i::::i X:::::X X:::::X l:::::l M:::::::M M:::::::M/
- /N::::::::N N::::::N iiii X:::::X X:::::X l:::::l M::::::::M M::::::::M/
- /N:::::::::N N::::::N X::::::X X::::::X l:::::l M:::::::::M M:::::::::M/
- /N::::::::::N N::::::Niiiiiii eeeeeeeeeeee XXX:::::X X:::::XXXrrrrr rrrrrrrrr l::::l aaaaaaaaaaaaa M::::::::::M M::::::::::M/
- /N:::::::::::N N::::::Ni:::::i ee::::::::::::ee X:::::X X:::::X r::::rrr:::::::::r l::::l a::::::::::::a M:::::::::::M M:::::::::::M/
- /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/
- /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/
- /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/
- /N::::::N N:::::::::::N i::::i e:::::::::::::::::e X:::::X:::::X r:::::r rrrrrrrl::::l aa::::::::::::a M::::::M M:::::::M M::::::M/
- /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/
- /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/
- /N::::::N N::::::::Ni::::::ie::::::::e X::::::X X::::::X r:::::r l::::::la::::a a:::::a M::::::M M::::::M/
- /N::::::N N:::::::Ni::::::i e::::::::eeeeeeeeX:::::X X:::::X r:::::r l::::::la:::::aaaa::::::a M::::::M M::::::M/
- /N::::::N N::::::Ni::::::i ee:::::::::::::eX:::::X X:::::X r:::::r l::::::l a::::::::::aa:::aM::::::M M::::::M/
- /NNNNNNNN NNNNNNNiiiiiiii eeeeeeeeeeeeeeXXXXXXX XXXXXXX rrrrrrr llllllll aaaaaaaaaa aaaaMMMMMMMM MMMMMMMM/
- / /
- / all credits saves to NieXrlaM for coding /
- *////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"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
- }
- }
- class MemHacking {
- public:
- float ReadFloat(unsigned int Address){
- float N;
- _asm{
- push [Address]
- pop ebx
- mov eax,dword ptr [ebx]
- mov [N],eax}return N;}
- int ReadInt(unsigned int Address){
- int N;
- _asm{
- push [Address]
- pop ebx
- mov eax,dword ptr [ebx]
- mov [N],eax}return N;}
- char* ReadChar(unsigned int Address,unsigned int Bytes){
- Bytes -= 1;
- char* N;
- for (unsigned int i = 0; i <= Bytes; i++){
- char Temporary;
- __asm{
- xor edi,edi
- push [Address]
- pop edi
- xor edx,edx
- xor dx,dx
- xor dl,dl
- xor dh,dh
- mov dl,byte ptr ds:[edi]
- mov [Temporary],dl}
- N[i] = Temporary;
- Address++;}return N;}
- void writeMemByte(DWORD dwAddress, void* bytes, DWORD dwSize){
- DWORD flOldProtect = 0;
- VirtualProtect((void*)dwAddress, dwSize, PAGE_EXECUTE_READWRITE, &flOldProtect);
- memcpy((void*) dwAddress, bytes, dwSize);
- VirtualProtect((void*)dwAddress, dwSize, flOldProtect, &flOldProtect);}
- void writeMemInt(DWORD dwAddress, int bytes){
- DWORD flOldProtect = 0;
- VirtualProtect((void*)dwAddress, sizeof(bytes), PAGE_EXECUTE_READWRITE, &flOldProtect);
- memcpy((void*) dwAddress, &bytes, sizeof(bytes));
- VirtualProtect((void*)dwAddress, sizeof(bytes), flOldProtect, &flOldProtect);}
- void writeMemFloat(DWORD dwAddress, float bytes){
- DWORD flOldProtect = 0;
- VirtualProtect((void*)dwAddress, sizeof(bytes), PAGE_EXECUTE_READWRITE, &flOldProtect);
- memcpy((void*) dwAddress, &bytes, sizeof(bytes));
- VirtualProtect((void*)dwAddress, sizeof(bytes), flOldProtect, &flOldProtect);}
- };
- void Thermal(bool OnorOff){
- MemHacking MH;
- if(OnorOff == true){
- MH.writeMemFloat(0x6746E58,1.00000011920929);}}
- void Laser(bool OnorOff){
- MemHacking MH;
- if(OnorOff == false){
- MH.writeMemInt(0x646E7B0,0);}
- if(OnorOff == true){
- MH.writeMemInt(0x646E7B0,1);}}
- void FOV(bool OnorOff){
- MemHacking MH;
- if(OnorOff == true){
- MH.writeMemFloat(0x64684A0,80);}}
- void BlackNWhiteFix(bool OnorOff){
- float BlackNWhiteValue = 0.407000005245209;
- MemHacking MH;
- if(OnorOff == true){
- _asm{
- push -1
- fild dword ptr [esp]
- fstp dword ptr[esp]
- fld dword ptr [BlackNWhiteValue]
- fld dword ptr [esp]
- fmul
- add esp,4
- fstp dword ptr[BlackNWhiteValue]}
- MH.writeMemFloat(0x8F280C,BlackNWhiteValue);}}
- void GameESP(bool OnorOff){
- MemHacking MH;
- if(MH.ReadInt(0x7F58C8) == 4376){
- if(OnorOff == false){
- MH.writeMemInt(0xB9B828,4096);
- MH.writeMemInt(0xB89060,4096);
- MH.writeMemInt(0xB8C1AC,4096);
- MH.writeMemInt(0xB8F2F8,4096);
- MH.writeMemInt(0xB92444,4096);
- MH.writeMemInt(0xB95590,4096);
- MH.writeMemInt(0xB986DC,4096);}}
- if(MH.ReadInt(0x7F58C8) == 4096){
- if(OnorOff == true){
- MH.writeMemInt(0xB9B828,4376);
- MH.writeMemInt(0xB89060,4376);
- MH.writeMemInt(0xB8C1AC,4376);
- MH.writeMemInt(0xB8F2F8,4376);
- MH.writeMemInt(0xB92444,4376);
- MH.writeMemInt(0xB95590,4376);
- MH.writeMemInt(0xB986DC,4376);}}}
- DWORD WINAPI Mw2_Hack(LPVOID lpParam) {
- bool EnableAimBoT = false;
- bool EnableESPbox = false;
- bool NoRecoil = false;
- bool Thermalb = false;
- bool Laserb = false;
- bool NoFlash = false;
- bool Re3Deffect = false;
- bool BlackNwhiteF = false;
- bool Radar = false;
- bool Fovb = false;
- MemHacking MH;
- BYTE Nop[6] = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
- while(true){
- if (GetAsyncKeyState(VK_NUMPAD0)){
- EnableAimBoT = EnableAimBoT == true ? false : true;
- Sleep(250);
- if (EnableAimBoT == true){
- MH.writeMemByte(0x56BAFD, Nop,6);
- MH.writeMemByte(0x491C31, Nop,6);
- SendTextToChat("^3AimBoT is ^2On");}
- else{
- BYTE AimBoTx[6] = {0xF, 0x8B, 0x5C, 0xFF, 0xFF, 0xFF};
- BYTE AimBoTy[6] = {0xF, 0x84, 0xA6, 0x0, 0x0, 0x0};
- MH.writeMemByte(0x56BAFD, AimBoTx,6);
- MH.writeMemByte(0x491C31, AimBoTy,6);
- SendTextToChat("^3AimBoT is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD1)){
- EnableESPbox = EnableESPbox == true ? false : true;
- Sleep(250);
- if (EnableESPbox == true){
- MH.writeMemByte(0x5A00FE, Nop,2);
- MH.writeMemByte(0x4D7520, Nop,6);
- SendTextToChat("^3EspBox is ^2On");}
- else{
- BYTE Esp[6] = {0x8B, 0xD, 0xC8, 0x58, 0x7F, 0x0};
- BYTE FixColdBlooded[2] = {0x75, 0x6F};
- MH.writeMemByte(0x5A00FE, FixColdBlooded,2);
- MH.writeMemByte(0x4D7520, Esp,6);
- SendTextToChat("^3EspBox is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD2)){
- NoRecoil = NoRecoil == true ? false : true;
- Sleep(250);
- if (NoRecoil == true){
- MH.writeMemByte(0x49D327, Nop,5);
- SendTextToChat("^3No Recoil is ^2On");}
- else{
- BYTE NoRecoil[5] = {0xE8,0xC4,0x53,0xFB,0xFF};
- MH.writeMemByte(0x49D327, NoRecoil,5);
- SendTextToChat("^3No Recoil is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD3)){
- Thermalb = Thermalb == true ? false : true;
- Sleep(250);
- if (Thermalb == true){
- MH.writeMemByte(0x5102C4, Nop,5);
- SendTextToChat("^3Thermal is ^2On");}
- else{
- BYTE Thermal[5] = {0xA2, 0x58, 0x6E, 0x74, 0x6};
- MH.writeMemByte(0x5102C4, Thermal,5);
- SendTextToChat("^3Thermal is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD4)){
- Laserb = Laserb == true ? false : true;
- Sleep(250);
- if (Laserb == true){
- SendTextToChat("^3Laser is ^2On");}
- else{
- SendTextToChat("^3Laser is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD5)){
- NoFlash = NoFlash == true ? false : true;
- Sleep(250);
- if (NoFlash == true){
- BYTE NoFlash1[10] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0};
- BYTE NoFlash2[13] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0, 0x90, 0x90, 0x90};
- BYTE NoFlash3[17] = {0xC7, 0x5, 0x2C, 0x98, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0, 0x83, 0xC4, 0x10, 0xC3, 0xCC, 0xCC, 0xCC};
- MH.writeMemByte(0x4AEE85, NoFlash1,10);
- MH.writeMemByte(0x5966AA, NoFlash2,13);
- MH.writeMemByte(0x5966DF, NoFlash3,17);
- SendTextToChat("^3No Flash is ^2On");}
- else{
- BYTE NoFlash1[10] = {0xC7, 0x5, 0x34, 0x98, 0x86, 0x0, 0x1, 0x0, 0x0, 0x0};
- BYTE NoFlash2[13] = {0xD9, 0x1D, 0x28, 0x98, 0x86, 0x0, 0xD9, 0x40, 0x1C, 0xD9, 0x5C, 0x24, 0x10};
- BYTE NoFlash3[17] = {0xD9, 0x1D, 0x2C, 0x98, 0x86, 0x0, 0x83, 0xC4, 0x10, 0xC3, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC};
- MH.writeMemByte(0x4AEE85, NoFlash1,10);
- MH.writeMemByte(0x5966AA, NoFlash2,13);
- MH.writeMemByte(0x5966DF, NoFlash3,17);
- SendTextToChat("^3No Flash is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD6)){
- Re3Deffect = Re3Deffect == true ? false : true;
- Sleep(250);
- if (Re3Deffect == true){
- MH.writeMemByte(0x404250, Nop,4);
- SendTextToChat("^3Remove 3D Effects is ^2On");}
- else{
- BYTE No3Deffects[4] = {0xD9, 0x44, 0xE4, 0x8};
- MH.writeMemByte(0x404250, No3Deffects,4);
- SendTextToChat("^3Remove 3D Effects is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD7)){
- BlackNwhiteF = BlackNwhiteF == true ? false : true;
- Sleep(250);
- if (BlackNwhiteF == true){
- MH.writeMemByte(0x50E09B, Nop,4);
- SendTextToChat("^0Black^3&^7White ^3Fix is ^2On");}
- else{
- BYTE BlackNWhite[4] = {0xD9, 0x44, 0x24, 0x28};
- MH.writeMemByte(0x50E09B, BlackNWhite,4);
- MH.writeMemFloat(0x8F280C,0.407000005245209);
- SendTextToChat("^0Black^3&^7White ^3Fix is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD8)){
- Radar = Radar == true ? false : true;
- Sleep(250);
- if (Radar == true){
- MH.writeMemByte(0x5806D0, Nop,2);
- MH.writeMemByte(0x580701, Nop,2);
- SendTextToChat("^3Radar is ^2On");}
- else{
- BYTE Radarx[2] = {0x74, 0x3B};
- BYTE Radary[2] = {0x74, 0x9};
- MH.writeMemByte(0x5806D0, Radarx,2);
- MH.writeMemByte(0x580701, Radary,2);
- SendTextToChat("^3Radar is ^1Off");}}
- if (GetAsyncKeyState(VK_NUMPAD9)){
- Fovb = Fovb == true ? false : true;
- Sleep(250);
- if (Fovb == true){
- SendTextToChat("^3FOV 80 is ^2On");}
- else{
- MH.writeMemFloat(0x64684A0,65);
- SendTextToChat("^3FOV 80 is ^1Off");}}
- GameESP(EnableESPbox);
- Thermal(Thermalb);
- Laser(Laserb);
- FOV(Fovb);
- BlackNWhiteFix(BlackNwhiteF);
- if (EnableAimBoT == true){
- AimBoT(0x7A3304,0xB36A44,0x7A3300,0xB36A40,0x7F5B78,0x7A32E8+4,0x7A32E8,0x7A32E8+8,0x7A3360+4,0x7A3360,0x7A3360+8,0x7F590C,0x7F8EE9,2406);
- }
- }
- }
- BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved) {
- if (dwReason == DLL_PROCESS_ATTACH) {
- DisableThreadLibraryCalls( hModule );
- CreateThread(0, 0, Mw2_Hack, 0, 0, 0);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement