djhonga2001

Untitled

Jan 30th, 2016
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. moduleHandle = (__int64)(GetModuleHandleA(0i64) - 1342177280);
  2.  
  3. signed __int64 findGameVersion()
  4. {
  5. unsigned int moduleBaseValue; // eax@1
  6. int v1; // eax@5
  7. int v2; // eax@6
  8. int v3; // eax@7
  9. signed __int64 result; // rax@9
  10.  
  11. moduleBaseValue = *(_DWORD *)(moduleHandle + 0x140870000i64);
  12. if ( moduleBaseValue <= 0x57085889 )
  13. {
  14. if ( moduleBaseValue == 1460164745 )
  15. return 12i64;
  16. if ( moduleBaseValue > 0x100FF360 )
  17. {
  18. if ( moduleBaseValue == 683967304 )
  19. return 13i64;
  20. if ( moduleBaseValue == 1224733726 )
  21. return 17i64;
  22. if ( moduleBaseValue == 1306716160 )
  23. return 14i64;
  24. }
  25. else
  26. {
  27. if ( moduleBaseValue == 269480800 )
  28. return 5i64;
  29. v1 = moduleBaseValue - 1;
  30. if ( !v1 )
  31. return 3i64;
  32. v2 = v1 - 126136;
  33. if ( !v2 )
  34. return 4i64;
  35. v3 = v2 - 10528599;
  36. if ( !v3 )
  37. return 1i64;
  38. if ( v3 == 241003505 )
  39. return 10i64;
  40. }
  41. return 0xFFFFFFFFi64;
  42. }
  43. if ( moduleBaseValue > 0xC4834800 )
  44. {
  45. if ( moduleBaseValue == -932311194 )
  46. {
  47. result = 11i64;
  48. }
  49. else if ( moduleBaseValue == -402579420 )
  50. {
  51. result = 0i64;
  52. }
  53. else
  54. {
  55. if ( moduleBaseValue != -197560555 )
  56. return 0xFFFFFFFFi64;
  57. result = 16i64;
  58. }
  59. }
  60. else
  61. {
  62. if ( moduleBaseValue == -998029312 )
  63. return 9i64;
  64. if ( moduleBaseValue == 2099381759 )
  65. return 2i64;
  66. if ( moduleBaseValue == -1991718773 )
  67. return 15i64;
  68. if ( moduleBaseValue != -1990176375 )
  69. {
  70. if ( moduleBaseValue == -1958150279 )
  71. return 7i64;
  72. return 0xFFFFFFFFi64;
  73. }
  74. result = 8i64;
  75. if ( *(_DWORD *)(moduleHandle + 5389892360i64) == 610044232 )
  76. result = 6i64;
  77. }
  78. return result;
  79. }
  80.  
  81. _QWORD globalPtrArray[72] =
  82. {
  83. 142972DF0h, 14296E670h, 1429941F0h, 14298F9F0h, 142A0D4B0h
  84. 142A07E70h, 142A74710h, 142A701E0h, 142A74710h, 142A701E0h
  85. 142AB3B80h, 142AAF5A0h, 142AD4DC0h, 142ACF7C0h, 142AFD320h
  86. 142AF7EC0h, 142AFF640h, 142AFB0C0h, 1427B9250h, 1427B5B90h
  87. 1427CF550h, 1427CBE10h, 1427EBBB8h, 1427E7750h, 14285FF40h
  88. 14285CAC8h, 14285FF40h, 14285CAC8h, 14286B5C0h, 1428680C0h
  89. 14288B158h, 142887048h, 1428A9288h, 1428A4EE0h, 1428AB588h
  90. 1428A80E0h, 141EDFEBCh, 141EDF9C8h, 141ED937Ch, 141ED88B8h
  91. 141EF25E0h, 141EECECCh, 141F65AD0h, 141F70C28h, 141F65AD0h
  92. 141F70C28h, 141F7DBBCh, 141F6C8E0h, 141F98938h, 141F87494h
  93. 141FA92C4h, 141FA3B00h, 141FB80FCh, 141FA62F0h, 141EDFEC4h
  94. 141EDF9CCh, 141ED93CCh, 141ED8908h, 141EF25E4h, 141EECF18h
  95. 141F65AD4h, 141F70C2Ch, 141F65AD4h, 141F70C2Ch, 141F7DBC0h
  96. 141F6C8E8h, 141F98944h, 141F874A0h, 141FA92E4h, 141FA3B20h
  97. 141FB8108h, 141FA62F4
  98. }
  99.  
  100. unsigned __int64 *__fastcall getGlobalPtr(signed int funcToFind)
  101. {
  102. return (unsigned __int64 *)(*(_QWORD *)(globalPtrArray[gameVersion] + 8i64 * ((funcToFind >> 18) & 0x3F) + moduleHandle)
  103. + 8i64 * (funcToFind & 0x3FFFF));
  104. }
Add Comment
Please, Sign In to add comment