#include <stdio.h> #include <stdlib.h> #include <windows.h> #include <tlhelp32.h>…
- User
#include <stdio.h> #include <stdlib.h> #include <windows.h> #include <tlhelp32.h> #include <psapi.h> #include #include
// Structure to hold section information struct SectionInfo { unsigned long long start; unsigned long long end; unsigned long long size; unsigned long long original_start; // Start address as seen in IDA };
// Function to get process ID by name DWORD get_process_id_by_name(const wchar_t* process_name) { PROCESSENTRY32W pe32; HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (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;}
// Function to get the base address of a module in a given process unsigned long long get_base_address(DWORD pid, const wchar_t* module_name) { MODULEENTRY32W me32; HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, pid);
if (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;}
// Function to get section information 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; }
IMAGE_NT_HEADERS64 nt_headers; if (!ReadProcessMemory(hProcess, (LPCVOID)(base_addr + dos_header.e_lfanew), &nt_headers, sizeof(nt_headers), NULL)) { return false; } unsigned long long section_offset = base_addr + dos_header.e_lfanew + sizeof(IMAGE_NT_HEADERS64); DWORD section_count = nt_headers.FileHeader.NumberOfSections; IMAGE_SECTION_HEADER* section_headers = new (std::nothrow) IMAGE_SECTION_HEADER[section_count]; if (!section_headers) { return false; } if (!ReadProcessMemory(hProcess, (LPCVOID)section_offset, section_headers, sizeof(IMAGE_SECTION_HEADER) * section_count, NULL)) { delete[] section_headers; return false; } bool found = false; for (DWORD i = 0; i < section_count; i++) { if (strncmp((char*)section_headers[i].Name, section_name, IMAGE_SIZEOF_SHORT_NAME) == 0) { // Calculate precise section start including alignment section_info.start = base_addr + section_headers[i].VirtualAddress; // Calculate aligned size DWORD aligned_size = section_headers[i].Misc.VirtualSize; if (aligned_size % nt_headers.OptionalHeader.SectionAlignment != 0) { aligned_size = (aligned_size + nt_headers.OptionalHeader.SectionAlignment - 1) & ~(nt_headers.OptionalHeader.SectionAlignment - 1); } section_info.end = section_info.start + aligned_size; section_info.size = aligned_size; // Calculate original address using precise ImageBase section_info.original_start = nt_headers.OptionalHeader.ImageBase + section_headers[i].VirtualAddress; found = true; break; } } delete[] section_headers; return found; - Assistant
- User
CHANGE THE LOGGING TO BE CLEAN AND CLEAR LIEK THIS $gameSettings = [ "fVATSMaxChance" => 0x563CC00, "fVATSChancePerceptionMultiplier" => 0x563E720, "fVATSMaxEngageDistance" => 0x56477A8, "fVATSChanceRaycastVisibilityMinimum" => 0x563E920, "fVATSPingCost" => 0x563CD80, "fVATSCriticalChargeBase" => 0x56444D0, "fVATSCriticalChargeBonusMult" => 0x56444F0, "fVATSCriticalChargeLimit" => 0x56478C8, "fVATSCriticalChargeMult" => 0x56444B0, "fPlayerAutoReloadDelaySec" => 0x5668C48, "bDisablePlayerCollision" => 0x5668908,
"fAVDCarryWeightBase" => 0x562C268, "fAbsolutePlayerInventoryWeightLimit" => 0x56424A8, "fInvisibilityMaxRefraction" => 0x5608200, "fInvisibilityMinRefraction" => 0x5608220, "fJetpackThrustInitial" => 0x560CD38, "fJetpackThrustSustained" => 0x560CD58, "fJetpackTimeToSustained" => 0x560CDB8, "bJetpackInitialThrustOnlyOnTakeoff" => 0x560CDF8, "fAimStabilityCrouchedScopeMult" => 0x563EA60, "fPropModScaleWeapDurability" => 0x5616A10, "fLockpickSkillSweetSpotBase" => 0x5643F30, "fSweetSpotEasy" => 0x5643F70, "fSweetSpotAverage" => 0x5643F90, "fSweetSpotHard" => 0x5643FB0, "fSweetSpotVeryHard" => 0x5643FD0, "iHackingMinWords" => 0x5643DB0, "iHackingMaxWords" => 0x5643DD0, "fCombatMusicNearCombatInnerRadius" => 0x5639980, "fCombatMusicNearCombatOuterRadius" => 0x56399A0, "fCombatMusicPlayerTargetedThreatRatio" => 0x56399C0, "pkKeywords" => 0x5617300, "fAttackActionPointCost" => 0x5617C00, "fspeed" => 0x5616D30, "fweight" => 0x56172D0, "iDurability" => 0x5617F60, "ihealth" => 0x5617F30, "bHoldInputToPower" => 0x5617D20, "fMinPowerPerShot" => 0x5617D80, "poAmmo" => 0x56178A0, "paAimModel" => 0x5617330, "ppOverrideProjectile" => 0x5617C30, "uNumProjectiles" => 0x56176C0, "vaActorValues" => 0x5614E40, - Assistant
- User
FULL CODE
- Assistant