Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main() {
- process = OpenProcess(PROCESS_ALL_ACCESS, 0, GetProcessInfoByName(TEXT("BlackOps3.exe")).th32ProcessID);
- MODULEENTRY32 exe = GetModuleInfoByName(GetProcessId(process), L"BlackOps3.exe");
- for (;;) {
- MEMORY_BASIC_INFORMATION mi = { 0 };
- mi.BaseAddress = exe.modBaseAddr;
- for (long long i = 0;; i += mi.RegionSize) {
- VirtualQueryEx(process, (void *)i, &mi, sizeof(mi));
- if (i == (long long)mi.BaseAddress + mi.RegionSize) {
- break;
- }
- if (mi.BaseAddress == 0 || mi.RegionSize < 1503000000 || !(mi.Protect & PAGE_READWRITE) || !(mi.State & (MEM_COMMIT | MEM_RESERVE))) {
- continue;
- }
- char *buffer = (char *)malloc(mi.RegionSize);
- if (buffer) {
- ReadProcessMemory(process, mi.BaseAddress, buffer, mi.RegionSize, NULL);
- int start = 0, end = 0;
- for (int i = (int)mi.RegionSize - sizeof(DWORD), c = 0; i > 0; --i) {
- if (*(DWORD *)&buffer[i] == 4294967295 && ++c == 2) {
- start = i + 44;
- end = start + ReadInt(process, exe.modBaseAddr + 0xE0A07F0) * 64;
- break;
- }
- }
- if (start && end) {
- system("cls");
- printf("start: 0x%llx\n", (long long)mi.BaseAddress + start);
- printf("end: 0x%llx\n", (long long)mi.BaseAddress + end);
- int light_count = 0;
- for (int i = 0; i < ReadInt(process, exe.modBaseAddr + 0xE0A07F0); ++i) {
- void *light = (void *)((long long)mi.BaseAddress + start + i * 64);
- printf("light %d: 0x%llx\n", ++light_count, (long long)light);
- WriteInt(process, light, 0);
- WriteFloat(process, (void *)((long long)light + 4), 100);
- WriteFloat(process, (void *)((long long)light + 8), (i + 1) * 0.1f);
- }
- free(buffer);
- goto next;
- }
- free(buffer);
- }
- }
- next:
- Sleep(1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement