need a way to get and log the offset from the pointer it finds #include <stdio.h>…
- User
need a way to get and log the offset from the pointer it finds #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <tlhelp32.h> #include <psapi.h> #include #include
struct SectionInfo { unsigned long long start; unsigned long long end; unsigned long long size; unsigned long long original_start;
};DWORD get_process_id_by_name(const wchar_t* process_name) { PROCESSENTRY32W pe32; HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
codeif (hSnapshot == INVALID_HANDLE_VALUE) { return 0; } pe32.dwSize = sizeof(PROCESSENTRY32W); if (!Process32FirstW(hSnapshot, &pe32)) { CloseHandle(hSnapshot); return 0; } do { if (_wcsicmp(pe32.szExeFile, process_name) == 0) { CloseHandle(hSnapshot); return pe32.th32ProcessID; } } while (Process32NextW(hSnapshot, &pe32)); CloseHandle(hSnapshot); return 0;}
unsigned long long get_base_address(DWORD pid, const wchar_t* module_name) { MODULEENTRY32W me32; HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, pid);
codeif (hSnapshot == INVALID_HANDLE_VALUE) { return 0; } me32.dwSize = sizeof(MODULEENTRY32W); if (!Module32FirstW(hSnapshot, &me32)) { CloseHandle(hSnapshot); return 0; } unsigned long long base_address = 0; do { if (_wcsicmp(me32.szModule, module_name) == 0) { base_address = (unsigned long long)me32.modBaseAddr; break; } } while (Module32NextW(hSnapshot, &me32)); CloseHandle(hSnapshot); return base_address;}
bool get_section_info(HANDLE hProcess, unsigned long long base_addr, const char* section_name, SectionInfo& section_info) { IMAGE_DOS_HEADER dos_header; if (!ReadProcessMemory(hProcess, (LPCVOID)base_addr, &dos_header, sizeof(dos_header), NULL)) { return false; }
code - Assistant
- User
fix this and print full fixed code i want full high quailty code out put Reading invalid data from 'buffer'. an empty initializer is invalid for an array with unspecified bound 'log_file' could be '0': this does not adhere to the specification for the function 'fprintf'. 'log_file' could be '0': this does not adhere to the specification for the function 'fclose'. See line 292 for an earlier location where this can occur cannot allocate an array of constant size 0
- Assistant
- User
i need them logged in a format like these $gameSettings = [ "fVATSMaxChance" => 0x563CC00, "fVATSChancePerceptionMultiplier" => 0x563E720, "fVATSMaxEngageDistance" => 0x56477A8, "fVATSChanceRaycastVisibilityMinimum" => 0x563E920, "fVATSPingCost" => 0x563CD80, "fVATSCriticalChargeBase" => 0x56444D0, "fVATSCriticalChargeBonusMult" => 0x56444F0, "fVATSCriticalChargeLimit" => 0x56478C8, "fVATSCriticalChargeMult" => 0x56444B0, "fPlayerAutoReloadDelaySec" => 0x5668C48, "bDisablePlayerCollision" => 0x5668908,
code - Assistant
- User
you removed stuff
- Assistant
- User
whats this spell .rdata:00000001440B59A8 66 db 66h ; f .rdata:00000001440B59A9 43 db 43h ; C .rdata:00000001440B59AA 6F db 6Fh ; o .rdata:00000001440B59AB 6D db 6Dh ; m .rdata:00000001440B59AC 62 db 62h ; b .rdata:00000001440B59AD 61 db 61h ; a .rdata:00000001440B59AE 74 db 74h ; t .rdata:00000001440B59AF 46 db 46h ; F .rdata:00000001440B59B0 61 db 61h ; a .rdata:00000001440B59B1 6C db 6Ch ; l .rdata:00000001440B59B2 6C db 6Ch ; l .rdata:00000001440B59B3 62 db 62h ; b .rdata:00000001440B59B4 61 db 61h ; a .rdata:00000001440B59B5 63 db 63h ; c .rdata:00000001440B59B6 6B db 6Bh ; k .rdata:00000001440B59B7 4D db 4Dh ; M .rdata:00000001440B59B8 69 db 69h ; i .rdata:00000001440B59B9 6E db 6Eh ; n .rdata:00000001440B59BA 4D db 4Dh ; M .rdata:00000001440B59BB 6F db 6Fh ; o .rdata:00000001440B59BC 76 db 76h ; v .rdata:00000001440B59BD 65 db 65h ; e .rdata:00000001440B59BE 6D db 6Dh ; m .rdata:00000001440B59BF 65 db 65h ; e .rdata:00000001440B59C0 6E db 6Eh ; n .rdata:00000001440B59C1 74 db 74h ; t .rdata:00000001440B59C2 44 db 44h ; D .rdata:00000001440B59C3 69 db 69h ; i .rdata:00000001440B59C4 73 db 73h ; s .rdata:00000001440B59C5 74 db 74h ; t .rdata:00000001440B59C6 61 db 61h ; a .rdata:00000001440B59C7 6E db 6Eh ; n .rdata:00000001440B59C8 63 db 63h ; c .rdata:00000001440B59C9 65 db 65h ; e
- Assistant
The sequence of bytes displayed from the
.rdatasection in your assembly dump spells out a string in ASCII format. Here's what the specific sequence decodes to:-
Hex Dump:
66 43 6F 6D 62 61 74 46 61 6C 6C 62 61 63 6B 4D 69 6E 4D 6F 76 65 6D 65 6E 74 44 69 73 74 61 6E 63 65
-
ASCII Translation:
- Corresponding characters:
fCombatFallbackMinMovementDistance
- Corresponding characters:
By examining each part of the dump:
66corresponds tof43corresponds toC6Fcorresponds too6Dcorresponds tom62corresponds tob- corresponds to
-