SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Windows.h>
  2. #include <string>
  3.  
  4. DWORD _CrcA = (DWORD)GetModuleHandle(Suta::Decrypt((PBYTE)"\x4F\x4E\x02\x4F\x4E\x41\x2C" /*cb.cbm*/, 7)) + 0x34D017;
  5. DWORD _ret_CrcA = _CrcA + 0x8;
  6.  
  7. DWORD _CrcB = (DWORD)GetModuleHandle(Suta::Decrypt((PBYTE)"\x4F\x4E\x02\x4F\x4E\x41\x2C" /*cb.cbm*/, 7)) + 0x27C486;
  8. DWORD _ret_CrcB = _CrcB + 0x9;
  9.  
  10. DWORD _CheckCrc = (DWORD)GetModuleHandle(Suta::Decrypt((PBYTE)"\x4F\x4E\x02\x4F\x4E\x41\x2C" /*cb.cbm*/, 7)) + 0x8AD5C5;
  11. DWORD _ret_CheckCrc = _CheckCrc + 0x8;
  12.  
  13. BYTE fake_CheckCrc[10];
  14. BYTE fake_SetEnd[10];
  15. BYTE fake_EndRender[10];
  16. BYTE fake_BypassRoom[10];
  17. BYTE fake_AK1[10];
  18. BYTE fake_AK2[10];
  19. BYTE fake_Vert[10];
  20. BYTE fake_Horz[10];
  21. BYTE fake_Ghost[10];
  22. BYTE fake_Speed[10];
  23. BYTE fake_Doline[10];
  24. BYTE fake_Replace[10];
  25. BYTE fake_Jump[10];
  26. BYTE fake_ServerNULL[10];
  27. BYTE fake_Explosion[10];
  28. BYTE fake_Unyu[10];
  29. BYTE fake_BugDT[10];
  30. BYTE fake_FreeMove[10];
  31. BYTE fake_CrcA[10];
  32. BYTE fake_CrcB[10];
  33. BYTE fake_m_pBone[10];
  34. BYTE fake_ArrayBone[10];
  35. BYTE fake_Raycast[10];
  36. BYTE fake_CurrentHP[10];
  37. namespace MemCRC
  38. {
  39.  
  40.     char* realCurrentHp = (char*)VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
  41.     char* real_m_Bone = (char*)VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
  42.     char* real_m_pBoneContext = (char*)VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
  43.     char* real_RaycastClosest = (char*)VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
  44.     char* real_SetBulletCountForNetwork = (char*)VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
  45. }
  46. bool CheckCrc(DWORD Address, DWORD Function, DWORD &Step)
  47. {
  48.     for (DWORD i = 0; i <= 6; i++)
  49.     {
  50.         if (Address == Function + i)
  51.         {
  52.             Step = i;
  53.             return true;
  54.         }
  55.     }
  56.     return false;
  57. }
  58.  
  59. bool CheckCRCFunctions(DWORD Address, BYTE &Crc)
  60. {
  61.     DWORD Step;
  62.     if (CheckCrc(Address, _CrcA, Step))
  63.     {
  64.         Crc = fake_CrcA[Step];
  65.         return true;
  66.     }
  67.     if (CheckCrc(Address, _CrcB, Step))
  68.     {
  69.         Crc = fake_CrcB[Step];
  70.         return true;
  71.     }
  72.  
  73.     if (CheckCrc(Address, _CheckCrc, Step))
  74.     {
  75.         Crc = fake_CheckCrc[Step];
  76.         return true;
  77.     }
  78.  
  79.  
  80.     return false;
  81. }
  82.  
  83. bool CheckGameFunctions(DWORD Address, BYTE &CRC)
  84. {
  85.     DWORD Step;
  86.  
  87.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.GetCurHP, Step))
  88.     {
  89.         CRC = fake_CurrentHP[Step];
  90.         return true;
  91.     }
  92.  
  93.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.m_pBoneContext, Step))
  94.     {
  95.         CRC = fake_m_pBone[Step];
  96.         return true;
  97.     }
  98.  
  99.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.BoneMatrixObject, Step))
  100.     {
  101.         CRC = fake_ArrayBone[Step];
  102.         return true;
  103.     }
  104.  
  105.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.Raycast, Step))
  106.     {
  107.         CRC = fake_Raycast[Step];
  108.         return true;
  109.     }
  110.  
  111.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.EndRender, Step))
  112.     {
  113.         CRC = fake_EndRender[Step];
  114.         return true;
  115.     }
  116.  
  117.  
  118.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.BugDT, Step))
  119.     {
  120.     CRC = fake_BugDT[Step];
  121.     return true;
  122.     }
  123.  
  124.  
  125.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.BugUnyu, Step))
  126.     {
  127.     CRC = fake_Unyu[Step];
  128.     return true;
  129.     }
  130.  
  131.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.AntiSerfull, Step))
  132.     {
  133.     CRC = fake_ServerNULL[Step];
  134.     return true;
  135.     }
  136.    
  137.  
  138.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.BypassRoom, Step))
  139.     {
  140.     CRC = fake_BypassRoom[Step];
  141.     return true;
  142.     }
  143.  
  144.     if (CheckCrc(Address, AddyStruct->IFHPB.CRC.AK1, Step))
  145.     {
  146.     CRC = fake_AK1[Step];
  147.     return true;
  148.     }
  149.  
  150.     if (CheckCrc(Address, AddyStruct->IFHPB.CRC.AK2, Step))
  151.     {
  152.     CRC = fake_AK2[Step];
  153.     return true;
  154.     }
  155.  
  156.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.LariTuyul, Step))
  157.     {
  158.     CRC = fake_Speed[Step];
  159.     return true;
  160.     }
  161.  
  162.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.AimBullet, Step))
  163.     {
  164.     CRC = fake_Doline[Step];
  165.     return true;
  166.     }
  167.  
  168.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.Jump, Step))
  169.     {
  170.     CRC = fake_Jump[Step];
  171.     return true;
  172.     }
  173.  
  174.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.RecoilVert, Step))
  175.     {
  176.     CRC = fake_Vert[Step];
  177.     return true;
  178.     }
  179.  
  180.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.RecoilHorz, Step))
  181.     {
  182.     CRC = fake_Horz[Step];
  183.     return true;
  184.     }
  185.  
  186.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.Explosion, Step))
  187.     {
  188.     CRC = fake_Explosion[Step];
  189.     return true;
  190.     }
  191.  
  192.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.FreeMove, Step))
  193.     {
  194.     CRC = fake_FreeMove[Step];
  195.     return true;
  196.     }
  197.  
  198.     if (CheckCrc(Address, AddyStruct->IFHPB.Function.AddrGhostReal,Step))
  199.     {
  200.         CRC = fake_Ghost[Step];
  201.         return true;
  202.     }
  203.  
  204.     return false;
  205. }
  206.  
  207.  
  208. #include "Asm1.h"
  209. #include "Asm2.h"
  210. #include "Asm3.h"
  211. #include "Asm4.h"
  212.  
  213. void FunctionCopyMemory()
  214. {
  215.  
  216.     CopyMemory((void*)fake_CheckCrc, (void*)_CheckCrc, 10);
  217.     CopyMemory((void*)fake_CrcA, (void*)_CrcA, 10);
  218.     CopyMemory((void*)fake_CrcB, (void*)_CrcB, 10);
  219.     CopyMemory((void*)fake_EndRender, (void*)AddyStruct->IFHPB.Function.EndRender, 10);
  220.     CopyMemory((void*)fake_BypassRoom, (void*)AddyStruct->IFHPB.Function.BypassRoom, 10);
  221.     CopyMemory((void*)fake_Vert, (void*)AddyStruct->IFHPB.Function.RecoilVert, 10);
  222.     CopyMemory((void*)fake_Horz, (void*)AddyStruct->IFHPB.Function.RecoilHorz, 10);
  223.     CopyMemory((void*)fake_AK1, (void*)AddyStruct->IFHPB.CRC.AK1, 10);
  224.     CopyMemory((void*)fake_AK2, (void*)AddyStruct->IFHPB.CRC.AK2, 10);
  225.     CopyMemory((void*)fake_Speed, (void*)AddyStruct->IFHPB.Function.LariTuyul, 10);
  226.     CopyMemory((void*)fake_Doline, (void*)AddyStruct->IFHPB.Function.AimBullet, 10);
  227.     CopyMemory((void*)fake_Jump, (void*)AddyStruct->IFHPB.Function.Jump, 10);
  228.     CopyMemory((void*)fake_ServerNULL, (void*)AddyStruct->IFHPB.Function.AntiSerfull, 10);
  229.     CopyMemory((void*)fake_Explosion, (void*)AddyStruct->IFHPB.Function.Explosion, 10);
  230.     CopyMemory((void*)fake_Unyu, (void*)AddyStruct->IFHPB.Function.BugUnyu, 10);
  231.     CopyMemory((void*)fake_BugDT, (void*)AddyStruct->IFHPB.Function.BugDT, 10);
  232.     CopyMemory((void*)fake_Ghost, (void*)AddyStruct->IFHPB.Function.BypassCall, 10);
  233.  
  234.     CopyMemory((void*)MemCRC::realCurrentHp, (void*)AddyStruct->IFHPB.Function.GetCurHP, 10);
  235.     CopyMemory((void*)MemCRC::real_m_Bone, (void*)AddyStruct->IFHPB.Function.BoneMatrixObject, 10);
  236.     CopyMemory((void*)MemCRC::real_m_pBoneContext, (void*)AddyStruct->IFHPB.Function.m_pBoneContext, 10);
  237.     CopyMemory((void*)MemCRC::real_RaycastClosest, (void*)AddyStruct->IFHPB.Function.Raycast, 10);
  238. }
  239.  
  240.  
  241. void Init()
  242. {
  243.     while (!FindWindowA("PBApp", NULL))
  244.     {
  245.         Sleep(100);
  246.     }
  247.  
  248.     LoggerIfilesHack();
  249.     FunctionCopyMemory();
  250.  
  251.     while (getStageGame() == -1)
  252.     {
  253.         Sleep(100);
  254.     }
  255.     MakeHook(_CheckCrc, (DWORD)hkCheckCrc);
  256.     MakeHook(_CrcA, (DWORD)hkCrcA);
  257.     MakeHook(_CrcB, (DWORD)hkCrcB);
  258.    
  259.     CopyMemory((void*)fake_CurrentHP, (void*)AddyStruct->IFHPB.Function.GetCurHP, 10);
  260.     CopyMemory((void*)fake_m_pBone, (void*)AddyStruct->IFHPB.Function.m_pBoneContext, 10);
  261.     CopyMemory((void*)fake_ArrayBone, (void*)AddyStruct->IFHPB.Function.BoneMatrixObject, 10);
  262.     CopyMemory((void*)fake_Raycast, (void*)AddyStruct->IFHPB.Function.Raycast, 10);
  263.  
  264.     MemoryEdit((void*)AddyStruct->IFHPB.Function.GetCurHP, (void*)MemCRC::realCurrentHp, 10);
  265.     MemoryEdit((void*)AddyStruct->IFHPB.Function.BoneMatrixObject, (void*)MemCRC::real_m_Bone, 10);
  266.     MemoryEdit((void*)AddyStruct->IFHPB.Function.m_pBoneContext, (void*)MemCRC::real_m_pBoneContext, 10);
  267.     MemoryEdit((void*)AddyStruct->IFHPB.Function.Raycast, (void*)MemCRC::real_RaycastClosest, 10);
  268.  
  269.     memcpy((void*)AddyStruct->IFHPB.Function.BypassCall, (void*)FunctionCopy, 0x2B);
  270.  
  271.     MakeHook(AddyStruct->IFHPB.Function.EndRender, (DWORD)new_EndRender);
  272. }
  273.  
  274. BOOL WINAPI  DllMain(HINSTANCE hModule, DWORD DwReason, LPVOID lpReserved)
  275. {
  276.    
  277.     if (DwReason == DLL_PROCESS_ATTACH)
  278.     {
  279.         DisableThreadLibraryCalls(hModule);
  280.         LoadLibraryA(Suta::Decrypt((PBYTE)"\x6D\x4B\x7C\x49\x5E\x4A\x61\x43\x42\x02\x48\x40\x40\x2C" /*AgPerfMon.dll*/, 14));
  281.         CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Init, NULL, NULL, NULL);
  282.         DeleteFileA(Suta::Decrypt((PBYTE)"\x6F\x16\x70\x70\x7B\x45\x42\x48\x43\x5B\x5F\x70\x70\x7F\x55\x5F\x58\x49\x41\x70\x70\x6F\x6E\x02\x4F\x4E\x41\x2C" /*C:\\Windows\\System\\CB.cbm*/, 28));
  283.         rename(Suta::Decrypt((PBYTE)"\x6F\x16\x70\x70\x7B\x45\x42\x48\x43\x5B\x5F\x70\x70\x7F\x55\x5F\x58\x49\x41\x70\x70\x6D\x4B\x7C\x49\x5E\x4A\x61\x43\x42\x02\x48\x40\x40\x2C" /*C:\\Windows\\System\\AgPerfMon.dll*/, 35), Suta::Decrypt((PBYTE)"\x6F\x16\x70\x70\x7B\x45\x42\x48\x43\x5B\x5F\x70\x70\x7F\x55\x5F\x58\x49\x41\x70\x70\x6F\x6E\x02\x4F\x4E\x41\x2C" /*C:\\Windows\\System\\CB.cbm*/, 28));
  284.      
  285.     }
  286.  
  287.     return false;
  288. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top