What can you do? Briefly list your capabilities and the kinds of files and tasks you can help with.

Dr.Binary

I'm Dr.Binary, a cybersecurity analysis assistant. Here's what I can do:

File & code work

  • Read, create, and edit text files in your workspace
  • Search files by glob patterns or regex (grep)
  • Write and run shell commands in a sandbox (Python, clang, binwalk, radare2, 7zip, git, etc.)

Binary & reverse engineering

  • Quick triage of ELF/PE/Mach-O binaries (imports, exports, strings, functions)
  • Full Ghidra decompilation & disassembly of every function
  • Diff two binaries (patch analysis, backdoor hunting) down to individual function pairs
  • Backward taint analysis (command injection, format strings, unsafe memcpy)
  • Call-graph reachability mapping to rank findings

Firmware analysis

  • Extract firmware images (SquashFS, UBI, JFFS2, cramfs, nested archives) with unblob/binwalk
  • Map attack surfaces: network endpoints, file interfaces, IPC channels
  • Build shared-library dependency graphs across binaries
  • Match extracted components against an offline CVE database and check whether upstream fixes are present
  • Identify device-specific CVEs in vendor code (web handlers, CGI binaries)
  • Assemble everything into a final security report

Specialized skills (loaded on demand) Android security-bug classification, Linux kernel commit → CWE classification (memory, concurrency, pointer, resource, input-control bugs), binary diffing, n-day matching, malware analysis, CTF cracking

Other

  • Web search & page fetching for current advisories, CVEs, docs
  • Delegate self-contained tasks to specialized subagents (firmware analyst, vulnerability researcher, malware analyst, CTF solver, threat intel)

Typical tasks: analyze a suspicious binary, diff a patched vs. unpatched version, extract and audit router firmware, find CVEs in a component, solve a reversing CTF, or classify a kernel patch.

Just upload a file (or point me at a URL) and tell me what you want to learn about it.

                         s_(mUsbStorageLib)_0475763d                     XREF[1]:     018496b0(*)  
    0475763d 28 6d 55        ds         "(mUsbStorageLib)"
             73 62 53 
             74 6f 72 
    0475764e 67 65 74        ds         "getFontSetDesc"
             46 6f 6e 
             74 53 65 
                         s_PDIEXT::MBufferDecryptManager_0475765d        XREF[1]:     0184fef5(*)  
    0475765d 50 44 49        ds         "PDIEXT::MBufferDecryptManager"
             45 58 54 
             3a 3a 4d 
                         s_MNetworkPlatform_0475767b                     XREF[20]:    FUN_008db2d0:008db31e(*), 
                                                                                      FUN_00b0a450:00b0a4c9(R), 
                                                                                      FUN_0183ff20:0183ff57(*), 
                                                                                      FUN_01840180:018401b7(*), 
                                                                                      FUN_018402b0:018402e7(*), 
                                                                                      FUN_01840800:0184083c(*), 
                                                                                      FUN_01840d20:01840d57(*), 
                                                                                      FUN_01841020:0184105c(*), 
                                                                                      FUN_01841410:01841447(*), 
                                                                                      FUN_018419a0:018419d7(*), 
                                                                                      FUN_01841a60:01841b50(*), 
                                                                                      FUN_01841f10:01841f47(*), 
                                                                                      FUN_01842110:01842147(*), 
                                                                                      FUN_01842370:018423e7(*), 
                                                                                      FUN_01842810:018428a5(*), 
                                                                                      FUN_01842a00:01842a5a(*), 
                                                                                      FUN_01842b80:01842bda(*), 
                                                                                      FUN_01842d00:01842d5a(*), 
                                                                                      FUN_01842e80:01842ee1(*), 
                                                                                      FUN_018430d0:018431ea(*), [more]
    0475767b 4d 4e 65        ds         "MNetworkPlatform"
             74 77 6f 
             72 6b 50 
                         s_keepHtmlTag__0475768c                         XREF[1]:     01855e73(*)  
    0475768c 6b 65 65        ds         "keepHtmlTag_"
             70 48 74 
             6d 6c 54 
                         s_displayOriginalPrice__04757699                XREF[1]:     01859f2b(*)  
    04757699 64 69 73        ds         "displayOriginalPrice_"
             70 6c 61 
             79 4f 72 
                         s_publisher__047576af                           XREF[1]:     0185a8f4(*)  
    047576af 70 75 62        ds         "publisher_"
             6c 69 73 
             68 65 72 
                         s_PDINetwork::psn::in_game_catalog_047576ba     XREF[1]:     0185b89f(*)  
    047576ba 50 44 49        ds         "PDINetwork::psn::in_game_catalog::GetContaine
             4e 65 74 
             77 6f 72 
                         s_std::vector*_
Dr.Binary
list_files

That looks like Ghidra's Defined Strings window from a stripped binary — and the strings identify it pretty specifically:

What I can tell from the paste

  • It's Gran Turismo 7 (PS4/PS5): build paths like C:\pdi\src\gt7\maintenance\adhoc\module... (pdi = Polyphony Digital Inc.)
  • UI/menu framework classes: MENU::MProgressFace, MSelectBar, MToolTipFace, MStringAttribute, GTMENU::MListener
  • Network layer: PDINetwork::psn::in_game_catalog::GetContainer..., MNetworkPlatform, MBufferDecryptManager (PSN in-game catalog / decryption manager)
  • Lots of car-simulation parameter names (TireWearScale, SAWC_ACD_maxControl, YfbTCS_gradient, DRS_ActivationThrottle...)
  • Addresses around 0x4757xxx (strings) and functions FUN_005xxxxx–FUN_01axxxxx suggest a large executable — consistent with GT7's eboot.bin/ELF, likely dumped straight from the game without symbols.

Your workspace is currently empty, so I don't have the binary itself — just this excerpt.

What would you like to do? For example, I can:

  1. Analyze the actual binary — upload it (or a dump_data-ready copy) and I'll decompile every function, build an index (analysis.json), and dig into areas you care about.
  2. Hunt for something specific — e.g. the MBufferDecryptManager / crypto setup, the PSN catalog protocol, save-data handling, or network code (I'd follow the XREFs you see here, like FUN_0183ff20 for MNetworkPlatform).
  3. Explain a specific region — paste a function's decompiled code or give me an address and I'll interpret it.
  4. Locate structures — these strings are property/attribute names (serialized UI/scene data), so I can help map them to parsing functions.

What's the goal — reversing the game's network protocol, modding, security research, or something else?

/* WARNING: Removing unreachable block (ram,0x007bb8fd) / / WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_007bb810(void)

{ long lVar1; long *plVar2;

plVar2 = DAT_05cc5298; *(undefined1 *)(DAT_05cc5298 + 0x2f) = 1; lVar1 = lRam0000000005cc5268; plVar2[0x30] = _DAT_05cc5260; plVar2[0x31] = lVar1; FUN_003c10f0(); lVar1 = ___stack_chk_guard; plVar2 = DAT_05cc5298; (**(code **)(DAT_05cc5298 + 0x270))(); FUN_003c01f0(plVar2,DAT_06b82bd8); FUN_007bdb90(plVar2,"encrypt",FUN_017b5400); FUN_007bdb90(plVar2,"decrypt",FUN_017b5520); if (___stack_chk_guard != lVar1) { / WARNING: Subroutine does not return */ __stack_chk_fail(); } return; } *

Dr.Binary

This is a neat find — it's an init/registration function that exposes the game's crypto primitives to its script layer. Ties directly into the strings you pasted earlier (MBufferDecryptManager, clearKey in the neighboring FUN_007bb400).

What it does, step by step

  1. Grabs a global singleton — DAT_05cc5298 is a pointer to a manager object (very likely the script VM / decrypt-manager singleton). It flips a bool flag: *(obj + 0x2f) = 1 (probably "initialized" or "enabled").

  2. Copies a 16-byte value into the object — plVar2[0x30] / plVar2[0x31] are offsets +0x180 / +0x188, loaded from DAT_05cc5260 and DAT_05cc5268. Two adjacent qwords = likely a pointer pair, a GUID, or — given this module — a key/IV blob. The lRam0000000005cc5268 oddity is just Ghidra failing to merge that second global with a symbol; it's DAT_05cc5260 + 8.

  3. FUN_003c10f0() — no args; probably acquires a runtime lock / ensures the script state exists.

  4. Virtual call (*obj)[0x270]() — vtable offset 0x270; something like "begin function registration" or "get script state".

  5. FUN_003c01f0(plVar2, DAT_06b82bd8) — pushes/attaches an environment or table (the DAT_06b82bd8 global is probably the registry table).

  6. The money shot:

    FUN_007bdb90(plVar2, "encrypt", FUN_017b5400);
    FUN_007bdb90(plVar2, "decrypt", FUN_017b5520);
    

    FUN_007bdb90(obj, name, fnptr) is a register(name, native_fn) helper (same helper that registered "clearKey" at 0x007bb769 in FUN_007bb400). So the script environment gets two native bindings:

    • "encrypt" → FUN_017b5400
    • "decrypt" → FUN_017b5520

Why this matters: FUN_017b5400 / FUN_017b5520 are the actual encrypt/decrypt implementations used by whatever scripts call them — likely save-data or network-buffer crypto (PDIEXT::MBufferDecryptManager from your string dump). That makes them the highest-value functions in this module: identify the cipher there (look for AES S-boxes/_mm_aesimc, or a custom stream cipher), and you've characterized the whole scheme. FUN_007bb400 should hold key setup (clearKey implies a setKey sibling nearby).

Decompiler artifacts to keep in mind

  • The unreachable block at 0x007bb8fd that Ghidra stripped is worth a look in the raw disassembly — code marked unreachable in a crypto module sometimes hides an alternate path or anti-tamper branch.
  • ___stack_chk_guard usage is just PS5/PS4 stack-canary boilerplate.

If you paste the decompilation of FUN_017b5400, FUN_017b5520, FUN_007bdb90, and FUN_007bb400, I'll tell you exactly what cipher/mode this is and how the keys flow. (Or upload the binary and I'll do the full pass myself.)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_017b5400(undefined8 param_1,int param_2,long *param_3)

{ long *plVar1; uint uVar2; void *__src; long lVar3; ulong __n; undefined8 local_40; long local_38;

local_38 = ___stack_chk_guard; if (0 < param_2) { plVar1 = (long *)*param_3; if (plVar1 == (long *)0x0) { eh_c1a70("C:\pdi\src\gt7\maintenance\adhoc\include\h_object.h",0xd5,"HObject"); } __src = (void *)(**(code )(*plVar1 + 0x208))(plVar1,0); param_3 = (long *)*param_3; if (param_3 == (long *)0x0) { eh_c1a70("C:\pdi\src\gt7\maintenance\adhoc\include\h_object.h",0xd5,"HObject"); } uVar2 = ((code **)(*param_3 + 0x1e8))(param_3); __n = (ulong)uVar2; lVar3 = FUN_00688210(__n + 8); memcpy((void )(lVar3 + 8),__src,__n); FUN_03ebd3f0(lVar3,__n); FUN_00b62480(&local_40,lVar3,__n + 8,1); eh_650(param_1,local_40); eh_970(&local_40); } if (___stack_chk_guard == local_38) { return; } / WARNING: Subroutine does not return */ __stack_chk_fail(); }

*_

Dr.Binary

Now we're inside the crypto path. FUN_017b5400 is the native "encrypt" binding — a thin script-to-native adapter. Here's the decoded flow:

Signature — FUN_017b5400(vm_ctx, argc, args*)

  • param_1 = script machine context (used at the end to return a value)
  • param_2 = argument count
  • param_3 = pointer to the argument slot array; *param_3 = first argument, an HObject handle (matches the assert path: h_object.h:0xd5 "HObject" — that eh_c1a70(file, line, "HObject") is a throw-on-null-handle check, Ghidra just lost the macro)

What it actually does

// pseudocode reconstruction
value encrypt(vm, argc, args) {
    if (argc < 1) return;                    // 0 < param_2 guard
    obj = args[0].asObject();                // null-checked → HObject assert
    src  = obj->vtable[0x208/8](obj, 0);     // GetRawData / LockBuffer(0) → void*
    size = obj->vtable[0x1e8/8](obj);        // GetSize() → uint32
    buf  = alloc(size + 8);                  // FUN_00688210 = engine allocator
    memcpy(buf + 8, src, size);              // data goes AFTER an 8-byte header
    FUN_03ebd3f0(buf, size);                 // ← header write AND/OR in-place crypto
    result = make_buffer_object(buf, size+8, /*own=*/1);   // FUN_00b62480
    return result(vm, result);               // eh_650 = push return, eh_970 = release ref
}

Key observations

  1. The output is 8-byte header + payload. The allocation is size + 8, data is copied to +8, and the wrapper (FUN_00b62480) gets the full size + 8. So whatever FUN_03ebd3f0 writes into buf[0..8] is a header — likely the original length, a magic, or a checksum/CRC that decrypt (FUN_017b5520) validates before reversing.

  2. No key is passed in. That's the big tell. Either:

    • FUN_03ebd3f0 uses a global/static key schedule (set by the setKey sibling in FUN_007bb400, cleared by "clearKey" — and remember FUN_007bb810 copied a 16-byte blob from DAT_05cc5260/68 into the singleton, which smells like a default key or IV), or
    • the encryption actually happened inside the virtual call at vtable+0x208 (a buffer object that self-encrypts), and FUN_03ebd3f0 is just header setup.
  3. Which one is it — resolve by reading FUN_03ebd3f0 next. It takes (buf, size) and runs after the copy, so it's suspect #1 for the real cipher. Tell-tale signs to look for in it: AES T-tables or _mm_aesenc intrinsics, XOR loops with a rolling key (custom stream cipher), or just two 4-byte stores (header-only, meaning the crypto lives elsewhere).

  4. The two vtable offsets (0x1e8 → slot 61, 0x208 → slot 65) belong to whatever buffer/byte-array class this is — if you dump that class's vtable you'll find GetSize and GetData/Lock as neighbors, plus probably Encrypt/Decrypt methods.

To nail the algorithm, paste (in this order):

  1. FUN_03ebd3f0 — header or cipher?
  2. FUN_017b5520 — the "decrypt" twin; comparing them shows exactly what the 8 bytes mean
  3. FUN_007bb400 — key setup / clearKey context

If FUN_03ebd3f0 turns out to be a real cipher, this module is your save-data/asset crypto, and the 16-byte blob at DAT_05cc5260 is likely the hardcoded default key.

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_03ebd3f0(undefined4 *param_1,long param_2)

{ byte *pbVar1; undefined4 uVar2; undefined1 uVar3; uint uVar4; int iVar5; long lVar6; int iVar7; undefined1 local_a00 [2504]; long local_38;

local_38 = ___stack_chk_guard; uVar4 = 0x3039; if (param_2 != 0) { uVar4 = 0xffffffff; lVar6 = 0; do { pbVar1 = (byte *)((long)(param_1 + 2) + lVar6); lVar6 = lVar6 + 1; uVar4 = uVar4 >> 8 ^ *(uint *)(&DAT_0506c330 + (ulong)(byte)(*pbVar1 ^ (byte)uVar4) * 4); } while (param_2 != lVar6); uVar4 = uVar4 ^ 0xffffcfc6; } uVar2 = swap_bytes(uVar4); param_1[1] = uVar2; iVar5 = FUN_00767b50(); uVar2 = swap_bytes(iVar5); *param_1 = uVar2; iVar7 = swap_bytes(param_1[1]); FUN_00804610(local_a00,iVar7 + iVar5); FUN_03ebd560(param_1 + 2,param_2,local_a00); uVar3 = *(undefined1 *)(param_1 + 1); lVar6 = param_2 * 0x4339334b >> 0x20; *(undefined1 *)(param_1 + 1) = *(undefined1 *)((long)param_1 + lVar6 + 4); *(undefined1 *)((long)param_1 + lVar6 + 4) = uVar3; uVar3 = *(undefined1 *)((long)param_1 + 5); *(undefined1 *)((long)param_1 + 5) = *(undefined1 *)((long)param_1 + lVar6 + 5); *(undefined1 *)((long)param_1 + lVar6 + 5) = uVar3; uVar3 = *(undefined1 *)((long)param_1 + 6); *(undefined1 *)((long)param_1 + 6) = *(undefined1 *)((long)param_1 + lVar6 + 6); *(undefined1 *)((long)param_1 + lVar6 + 6) = uVar3; uVar3 = *(undefined1 *)((long)param_1 + 7); *(undefined1 *)((long)param_1 + 7) = *(undefined1 *)((long)param_1 + lVar6 + 7); *(undefined1 *)((long)param_1 + lVar6 + 7) = uVar3; uVar3 = *(undefined1 *)param_1; lVar6 = param_2 * 0xc0e2be6e + 0x3038af9b8 >> 0x20; *(undefined1 *)param_1 = *(undefined1 *)((long)param_1 + lVar6); *(undefined1 *)((long)param_1 + lVar6) = uVar3; uVar3 = *(undefined1 *)((long)param_1 + 1); *(undefined1 *)((long)param_1 + 1) = *(undefined1 *)((long)param_1 + lVar6 + 1); *(undefined1 *)((long)param_1 + lVar6 + 1) = uVar3; uVar3 = *(undefined1 *)((long)param_1 + 2); *(undefined1 *)((long)param_1 + 2) = *(undefined1 *)((long)param_1 + lVar6 + 2); *(undefined1 *)((long)param_1 + lVar6 + 2) = uVar3; uVar3 = *(undefined1 *)((long)param_1 + 3); *(undefined1 *)((long)param_1 + 3) = *(undefined1 *)((long)param_1 + lVar6 + 3); *(undefined1 )((long)param_1 + lVar6 + 3) = uVar3; if (___stack_chk_guard == local_38) { return; } / WARNING: Subroutine does not return */ __stack_chk_fail(); }

                         LAB_05cc5260                                    XREF[1]:     FUN_007bb810:007bb822(R)  
    05cc5260 08 00           OR         byte ptr [RAX],AL
    05cc5262 00 00           ADD        byte ptr [RAX],AL
    05cc5264 00 00           ADD        byte ptr [RAX],AL
    05cc5266 00 00           ADD        byte ptr [RAX],AL
    05cc5268 08 00           OR         byte ptr [RAX],AL
    05cc526a 00 00           ADD        byte ptr [RAX],AL
    05cc526c 00 00           ADD        byte ptr [RAX],AL
    05cc526e 00 00           ADD        byte ptr [RAX],AL
    05cc5270 70 5c 17        addr       PTR_vtable_05175c70                              = 07d7e080
             05 00 00 
             00 00
    05cc5278 a0 5c 17        addr       PTR_vtable_05175ca0                              = 07d7e100
             05 00 00 
             00 00
    05cc5280 70              ??         70h    p                                         ?  ->  00ae2b70
    05cc5281 2b              ??         2Bh    +
    05cc5282 ae              ??         AEh
    05cc5283 00              ??         00h
    05cc5284 00              ??         00h
    05cc5285 00              ??         00h
    05cc5286 00              ??         00h
    05cc5287 00              ??         00h
    05cc5288 10 b8 7b        addr       FUN_007bb810
             00 00 00 
             00 00
    05cc5290 f0 53 7b        addr       LAB_017b53f0
             01 00 00 
             00 00
                         DAT_05cc5298                                    XREF[4]:     FUN_007bb810:007bb814(R), 
                                                                                      FUN_007bb810:007bb837(R), 
                                                                                      017b53f0(W), 
                                                                                      FUN_017b57d0:017b5807(R)  
    05cc5298 00 00 00        undefined8 0000000000000000h
             00 00 00 
             00 00
    05cc52a0 08              ??         08h                                              ?  ->  05cc5208
    05cc52a1 52              ??         52h    R
    05cc52a2 cc              ??         CCh
    05cc52a3 05              ??         05h
    05cc52a4 00              ??         00h
    05cc52a5 00              ??         00h
    05cc52a6 00              ??         00h
    05cc52a7 00              ??         00h
    05cc52a8 4a              ??         4Ah    J                                         ?  ->  048cb64a
    05cc52a9 b6              ??         B6h
    05cc52aa 8c              ??         8Ch
    05cc52ab 04              ??         04h
    05cc52ac 00              ??         00h
    05cc52ad 00              ??         00h
    05cc52ae 00              ??         00h                                              ?  ->  00080000
    05cc52af 00              ??         00h                                              ?  ->  00000800
                         DAT_05cc52b0                                    XREF[1]:     FUN_00b4a070:00b4a082(R)  
    05cc52b0 08              ??         08h                                              ?  ->  00000008
    05cc52b1 00              ??         00h
    05cc52b2 00              ??         00h
    05cc52b3 00              ??         00h
    05cc52b4 00              ??         00h
    05cc52b5 00              ??         00h
    05cc52b6 00              ??         00h                                              ?  ->  00080000
    05cc52b7 00              ??         00h                                              ?  ->  00000800
    05cc52b8 08              ??         08h                                              ?  ->  00000008
    05cc52b9 00              ??         00h
    05cc52ba 00              ??         00h
    05cc52bb 00              ??         00h
    05cc52bc 00              ??         00h
    05cc52bd 00              ??         00h
    05cc52be 00              ??         00h
    05cc52bf 00              ??         00h
    05cc52c0 20 5d 17        addr       PTR_vtable_05175d20                              = 07d7e080
             05 00 00 
             00 00
    05cc52c8 c0 5d 17        addr       PTR_vtable_05175dc0                              = 07d7e100
             05 00 00 
             00 00
    05cc52d0 90              ??         90h                                              ?  ->  00ae2b90
    05cc52d1 2b              ??         2Bh    +
    05cc52d2 ae              ??         AEh
    05cc52d3 00              ??         00h
    05cc52d4 00              ??         00h
    05cc52d5 00              ??         00h
    05cc52d6 00              ??         00h
    05cc52d7 00              ??         00h
    05cc52d8 70 a0 b4        addr       FUN_00b4a070
             00 00 00 
             00 00
    05cc52e0 e0 58 7b        addr       LAB_017b58e0
             01 00 00 
             00 00
                         DAT_05cc52e8                                    XREF[4]:     FUN_00b4a070:00b4a074(R), 
                                                                                      FUN_00b4a070:00b4a097(R), 
                                                                                      017b58e0(W), 
                                                                                      FUN_017b70f0:017b7127(R)  
    05cc52e8 00 00 00        undefined8 0000000000000000h
             00 00 00 
             00 00
    05cc52f0 58              ??         58h    X                                         ?  ->  05cc5258
    05cc52f1 52              ??         52h    R
    05cc52f2 cc              ??         CCh
    05cc52f3 05              ??         05h
    05cc52f4 00              ??         00h
    05cc52f5 00              ??         00h
    05cc52f6 00              ??         00h
    05cc52f7 00              ??         00h
    05cc52f8 f8              ??         F8h                                              ?  ->  047d86f8
    05cc52f9 86              ??         86h
    05cc52fa 7d              ??         7Dh    }
    05cc52fb 04              ??         04h
    05cc52fc 00              ??         00h
    05cc52fd 00              ??         00h
    05cc52fe 00              ??         00h                                              ?  ->  00080000
    05cc52ff 00              ??         00h                                              ?  ->  00000800
                         DAT_05cc5300                                    XREF[1]:     FUN_00b6f7f0:00b6f802(R)  
    05cc5300 08              ??         08h                                              ?  ->  00000008
    05cc5301 00              ??         00h
    05cc5302 00              ??         00h
    05cc5303 00              ??         00h
    05cc5304 00              ??         00h
    05cc5305 00              ??         00h
    05cc5306 00              ??         00h                                              ?  ->  00080000
    05cc5307 00              ??         00h                                              ?  ->  00000800
    05cc5308 08              ??         08h                                              ?  ->  00000008
    05cc5309 00              ??         00h
    05cc530a 00              ??         00h
    05cc530b 00              ??         00h
    05cc530c 00              ??         00h
    05cc530d 00              ??         00h
    05cc530e 00              ??         00h
    05cc530f 00              ??         00h
    05cc5310 f0 5c 17        addr       PTR_vtable_05175cf0                              = 07d7e080
             05 00 00 
             00 00
    05cc5318 38 5d 17        addr       PTR_vtable_05175d38                              = 07d7e100
             05 00 00 
             00 00
    05cc5320 b0              ??         B0h                                              ?  ->  00ae2bb0
    05cc5321 2b              ??         2Bh    +
    05cc5322 ae              ??         AEh
    05cc5323 00              ??         00h
    05cc5324 00              ??         00h
    05cc5325 00              ??         00h
    05cc5326 00              ??         00h
    05cc5327 00              ??         00h
    05cc5328 f0 f7 b6        addr       FUN_00b6f7f0
             00 00 00 
             00 00
    05cc5330 f0 58 7b        addr       LAB_017b58f0
             01 00 00 
             00 00
                         DAT_05cc5338                                    XREF[4]:     FUN_00b6f7f0:00b6f7f4(R), 
                                                                                      FUN_00b6f7f0:00b6f817(R), 
                                                                                      017b58f0(W), 
                                                                                      FUN_017b5df0:017b5e27(R)  
    05cc5338 00 00 00        undefined8 0000000000000000h
             00 00 00 
             00 00
    05cc5340 a8              ??         A8h                                              ?  ->  05cc52a8
    05cc5341 52              ??         52h    R
    05cc5342 cc              ??         CCh
    05cc5343 05              ??         05h
    05cc5344 00              ??         00h
    05cc5345 00              ??         00h
    05cc5346 00              ??         00h
    05cc5347 00              ??         00h
    05cc5348 b7              ??         B7h                                              ?  ->  049588b7
    05cc5349 88              ??         88h
    05cc534a 95              ??         95h
    05cc534b 04              ??         04h
    05cc534c 00              ??         00h
    05cc534d 00              ??         00h
    05cc534e 00              ??         00h                                              ?  ->  00080000
    05cc534f 00              ??         00h                                              ?  ->  00000800
                         DAT_05cc5350                                    XREF[1]:     FUN_00b5a400:00b5a412(R)  
    05cc5350 08              ??         08h                                              ?  ->  00000008
    05cc5351 00              ??         00h
    05cc5352 00              ??         00h
    05cc5353 00              ??         00h
    05cc5354 00              ??         00h
    05cc5355 00              ??         00h
    05cc5356 00              ??         00h                                              ?  ->  00080000
    05cc5357 00              ??         00h                                              ?  ->  00000800
    05cc5358 08              ??         08h                                              ?  ->  00000008
    05cc5359 00              ??         00h
    05cc535a 00              ??         00h
    05cc535b 00              ??         00h
    05cc535c 00              ??         00h
    05cc535d 00              ??         00h
    05cc535e 00              ??         00h
    05cc535f 00              ??         00h
    05cc5360 10 61 17        addr       PTR_vtable_05176110                              = 07d7e080
             05 00 00 
             00 00
    05cc5368 40 61 17        addr       PTR_vtable_05176140                              = 07d7e100
             05 00 00 
             00 00
    05cc5370 d0              ??         D0h                                              ?  ->  00ae2bd0
    05cc5371 2b              ??         2Bh    +                                         ?  ->  0000ae2b
    05cc5372 ae              ??         AEh
    05cc5373 00              ??         00h
    05cc5374 00              ??         00h
    05cc5375 00              ??         00h
    05cc5376 00              ??         00h
    05cc5377 00              ??         00h
    05cc5378 00 a4 b5        addr       FUN_00b5a400
             00 00 00 
             00 00
    05cc5380 d0 9f 7b        addr       LAB_017b9fd0
             01 00 00 
             00 00
                         DAT_05cc5388                                    XREF[4]:     FUN_00b5a400:00b5a404(R), 
                                                                                      FUN_00b5a400:00b5a427(R), 
                                                                                      017b9fd0(W), 
                                                                                      FUN_017bad70:017bada7(R)  
    05cc5388 00 00 00        undefined8 0000000000000000h
             00 00 00 
             00 00
    05cc5390 f8              ??         F8h                                              ?  ->  05cc52f8
    05cc5391 52              ??         52h    R
    05cc5392 cc              ??         CCh
    05cc5393 05              ??         05h
    05cc5394 00              ??         00h
    05cc5395 00              ??         00h
    05cc5396 00              ??         00h
    05cc5397 00              ??         00h
    05cc5398 a0              ??         A0h                                              ?  ->  04922da0
    05cc5399 2d              ??         2Dh    -
    05cc539a 92              ??         92h
    05cc539b 04              ??         04h
    05cc539c 00              ??         00h
    05cc539d 00              ??         00h
    05cc539e 00              ??         00h                                              ?  ->  00080000
    05cc539f 00              ??         00h                                              ?  ->  00000800
                         DAT_05cc53a0                                    XREF[1]:     FUN_007c2cc0:007c2cd2(R)  
    05cc53a0 08              ??         08h                                              ?  ->  00000008
    05cc53a1 00              ??         00h
    05cc53a2 00              ??         00h
    05cc53a3 00              ??         00h
    05cc53a4 00              ??         00h
    05cc53a5 00              ??         00h
    05cc53a6 00              ??         00h                                              ?  ->  00080000
    05cc53a7 00              ??         00h                                              ?  ->  00000800
    05cc53a8 08              ??         08h                                              ?  ->  00000008
    05cc53a9 00              ??         00h
    05cc53aa 00              ??         00h
    05cc53ab 00              ??         00h
    05cc53ac 00              ??         00h
    05cc53ad 00              ??         00h
    05cc53ae 00              ??         00h
    05cc53af 00              ??         00h
    05cc53b0 c0 67 17        addr       PTR_vtable_051767c0                              = 07d7e080
             05 00 00 
             00 00
    05cc53b8 f0 67 17        addr       PTR_vtable_051767f0                              = 07d7e100
             05 00 00 
             00 00
    05cc53c0 f0              ??         F0h                                              ?  ->  00ae2bf0
    05cc53c1 2b              ??         2Bh    +
    05cc53c2 ae              ??         AEh
    05cc53c3 00              ??         00h
    05cc53c4 00              ??         00h
    05cc53c5 00              ??         00h
    05cc53c6 00              ??         00h
    05cc53c7 00              ??         00h
    05cc53c8 c0 2c 7c        addr       FUN_007c2cc0
             00 00 00 
             00 00
    05cc53d0 f0 b2 7b        addr       LAB_017bb2f0
             01 00 00 
             00 00
                         DAT_05cc53d8                                    XREF[4]:     FUN_007c2cc0:007c2cc4(R), 
                                                                                      FUN_007c2cc0:007c2ce7(R), 
                                                                                      017bb2f0(W), 
                                                                                      FUN_017be2a0:017be2d7(R)  
    05cc53d8 00 00 00        undefined8 0000000000000000h
             00 00 00 
             00 00
    05cc53e0 48              ??         48h    H                                         ?  ->  05cc5348
    05cc53e1 53              ??         53h    S
    05cc53e2 cc              ??         CCh
    05cc53e3 05              ??         05h
    05cc53e4 00              ??         00h
    05cc53e5 00              ??         00h
    05cc53e6 00              ??         00h
    05cc53e7 00              ??         00h
    05cc53e8 e3              ??         E3h                                              ?  ->  049588e3
    05cc53e9 88              ??         88h
    05cc53ea 95              ??         95h
    05cc53eb 04              ??         04h
    05cc53ec 00              ??         00h
    05cc53ed 00              ??         00h
    05cc53ee 00              ??         00h                                              ?  ->  00080000
    05cc53ef 00              ??         00h                                              ?  ->  00000800
                         DAT_05cc53f0                                    XREF[1]:     FUN_00b7cc20:00b7cc32(R)  
    05cc53f0 08              ??         08h                                              ?  ->  00000008
    05cc53f1 00              ??         00h
    05cc53f2 00              ??         00h
    05cc53f3 00              ??         00h
    05cc53f4 00              ??         00h
    05cc53f5 00              ??         00h
    05cc53f6 00              ??         00h                                              ?  ->  00080000
    05cc53f7 00              ??         00h                                              ?  ->  00000800
    05cc53f8 08              ??         08h                                              ?  ->  00000008
    05cc53f9 00              ??         00h
    05cc53fa 00              ??         00h
    05cc53fb 00              ??         00h
    05cc53fc 00              ??         00h
    05cc53fd 00              ??         00h
    05cc53fe 00              ??         00h
    05cc53ff 00              ??         00h
    05cc5400 90 62 17        addr       PTR_vtable_05176290                              = 07d7e080
             05 00 00 
             00 00
    05cc5408 c0 62 17        addr       PTR_vtable_051762c0                              = 07d7e100
             05 00 00 
             00 00
    05cc5410 10              ??         10h                                              ?  ->  00ae2c10
    05cc5411 2c              ??         2Ch    ,
    05cc5412 ae              ??         AEh
    05cc5413 00              ??         00h
    05cc5414 00              ??         00h
    05cc5415 00              ??         00h
    05cc5416 00              ??         00h
    05cc5417 00              ??         00h
    05cc5418 20 cc b7        addr       FUN_00b7cc20
             00 00 00 
             00 00
    05cc5420 d0 f3 7b        addr       LAB_017bf3d0
             01 00 00 
             00 00
                         DAT_05cc5428                                    XREF[4]:     FUN_00b7cc20:00b7cc24(R), 
                                                                                      FUN_00b7cc20:00b7cc47(R), 
                                                                                      017bf3d0(W), 
                                                                                      FUN_017bfa80:017bfab7(R)  
    05cc5428 00 00 00        undefined8 0000000000000000h
             00 00 00 
             00 00
    05cc5430 98              ??         98h                                              ?  ->  05cc5398
    05cc5431 53              ??         53h    S
    05cc5432 cc              ??         CCh
    05cc5433 05              ??         05h
    05cc5434 00              ??         00h
    05cc5435 00              ??         00h
    05cc5436 00              ??         00h
    05cc5437 00              ??         00h
    05cc5438 95              ??         95h                                              ?  ->  04a4c495
    05cc5439 c4              ??         C4h
    05cc543a a4              ??         A4h
    05cc543b 04              ??         04h
    05cc543c 00              ??         00h
    05cc543d 00              ??         00h
    05cc543e 00              ??         00h                                              ?  ->  00080000
    05cc543f 00              ??         00h                                              ?  ->  00000800
                         DAT_05cc5440                                    XREF[1]:     FUN_00b6fed0:00b6fee2(R)  
    05cc5440 08              ??         08h                                              ?  ->  00000008
    05cc5441 00              ??         00h
    05cc5442 00              ??         00h
    05cc5443 00              ??         00h
    05cc5444 00              ??         00h
    05cc5445 00              ??         00h
    05cc5446 00              ??         00h                                              ?  ->  00080000
    05cc5447 00              ??         00h                                              ?  ->  00000800
    05cc5448 08              ??         08h                                              ?  ->  00000008
    05cc5449 00              ??         00h
    05cc544a 00              ??         00h
    05cc544b 00              ??         00h
    05cc544c 00              ??         00h
    05cc544d 00              ??         00h

*_

Dr.Binary

Excellent — this function cracks the whole scheme open. FUN_03ebd3f0 is not a cipher — it's a keystream obfuscator + integrity header writer, and everything needed to undo it is stored inside the blob itself. Full decode:

Layout being built: [8-byte header][payload]

1. Custom CRC-32 of the plaintext payload (computed before obfuscation)

crc = 0xFFFFFFFF;
for each byte b:  crc = (crc >> 8) ^ table[(b ^ crc) & 0xFF];   // table @ DAT_0506c330, 256×4 bytes
crc ^= 0xFFFFCFC6;   // == ~0x3039
  • Since crc32_std = raw ^ 0xFFFFFFFF, this simplifies to crc = crc32_std(data) ^ 0x3039 — and 0x3039 is just 12345. Empty payload shortcuts to 0x3039. A textbook "developer-flavored" CRC.
  • Quick sanity check you can do: DAT_0506c330[1] == 0x77073096 ⇒ it's the standard IEEE CRC-32 table.

2. Nonce/timestamp — FUN_00767b50() (no args, global) — almost certainly time() or a tick counter. Stored as the first header dword.

3. Header is big-endian: param_1[0] = bswap32(nonce), param_1[1] = bswap32(crc).

4. Mersenne Twister keystream

  • FUN_00804610(ctx, seed) with local_a00[2504] — 2504 bytes = MT19937 exactly (624×4 state + index/mixed fields). Seeded with crc + nonce.
  • FUN_03ebd560(payload, n, mt_ctx) — in-place payload transform; with an MT context handed to it, this is a per-byte XOR keystream with ~99% confidence.

5. Header concealment — the clever bit. The 8 header bytes are then swapped into the payload at positions derived from the size:

off_crc  = (n * 0x4339334B) >> 32;                  // ≈ 0.263·n
off_time = (n * 0xC0E2BE6E + 0x3038AF9B8) >> 32;    // ≈ 0.753·n + 3
swap bytes[4..7]   (CRC field)   ↔ bytes[off_crc+4 .. off_crc+7]    // payload
swap bytes[0..3]   (nonce field) ↔ bytes[off_time .. off_time+3]    // payload

Those aren't compiler division magics (the implied divisors 3.8/1.33 aren't integers) — they're hand-picked scramble constants. So a casual hex-edit can't even find the CRC or timestamp without knowing the size and the constants.

The security takeaway (important): this is obfuscation, not cryptography. The seed is crc + nonce, and both are in the file. Once you've unswapped the header, MT19937 regenerates the keystream and the payload falls open. There is no secret key anywhere — the only secrets are the algorithm shape and those two multipliers, which we've now read out of the binary.

Correction to my earlier read: with the memory dump you pasted, DAT_05cc5260/68 are just {8, 8} — two size/capacity fields, not a key blob. Also, the region 0x05cc5258–0x05cc5440+ you included is a bonus find: it's the static script-class registry — repeating records of {vtable pair, data ptr, name ptr, register_fn, init_fn}. The crypto class's record is register=FUN_007bb810, init=LAB_017b53f0, name=0x048cb64a; sibling classes are registered by FUN_00b4a070, FUN_00b6f7f0, FUN_00b5a400, FUN_007c2cc0, FUN_00b7cc20 — and all their binding functions cluster in 0x017b5xxx–0x017bfxxx. FUN_017b57d0 (reads DAT_05cc5298) likely registers the remaining methods (setKey/clearKey family).

To close this out, paste (in priority order):

  1. FUN_03ebd560 — confirm XOR vs. something fancier
  2. FUN_00804610 — confirm standard MT19937 init (and whether the seed gets scrambled first)
  3. FUN_00767b50 — confirm timestamp vs. counter
  4. FUN_017b5520 — the decrypt twin (should mirror: unswap → unXOR → CRC check)

Once I have #1 and #2, I'll write you a standalone Python encrypt/decrypt implementation you can run against real blobs to verify end-to-end.


                     *                          FUNCTION                          *
                     **************************************************************
                       undefined FUN_03ebd560()
     undefined         <UNASSIGNED>   <RETURN>
     undefined8        Stack[-0x38]:8 local_38                                XREF[3]:     03ebd57a(W), 
                                                                                           03ebd5a4(R), 
                                                                                           03ebd6cd(R)  
     undefined1[16]    Stack[-0x48]   local_48                                XREF[4]:     03ebd59f(W), 
                                                                                           03ebd5b3(R), 
                                                                                           03ebd6c8(W), 
                                                                                           03ebd6dd(R)  
     undefined1[16]    Stack[-0x58]   local_58                                XREF[4]:     03ebd59a(W), 
                                                                                           03ebd669(R), 
                                                                                           03ebd6c3(W), 
                                                                                           03ebd756(R)  
                     FUN_03ebd560                                    XREF[1]:     FUN_03ebd3f0:03ebd494(c)  
03ebd560 55              PUSH       RBP
03ebd561 48 89 e5        MOV        RBP,RSP
03ebd564 41 57           PUSH       R15
03ebd566 41 56           PUSH       R14
03ebd568 41 55           PUSH       R13
03ebd56a 41 54           PUSH       R12
03ebd56c 53              PUSH       RBX
03ebd56d 48 83 ec 28     SUB        RSP,0x28
03ebd571 48 89 cb        MOV        RBX,RCX
03ebd574 49 89 f7        MOV        R15,RSI
03ebd577 49 89 fc        MOV        R12,RDI
03ebd57a 48 89 55 d0     MOV        qword ptr [RBP + local_38],RDX
03ebd57e 48 83 fe 04     CMP        RSI,0x4
03ebd582 0f 82 1d        JC         LAB_03ebd6a5
         01 00 00
03ebd588 c4 e2 79        VPBROADC   XMM0,qword ptr [DAT_04705ed8]                    = 0000001800000010h
         59 05 47 
         89 84 00
03ebd591 c4 e2 79        VPBROADC   XMM1,byte ptr [DAT_04b3f05c]                     = 0Fh
         78 0d c2 
         1a c8 00
03ebd59a c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_58[0]],XMM0
         45 b0
03ebd59f c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_48[0]],XMM1
         4d c0
                     LAB_03ebd5a4                                    XREF[1]:     03ebd69f(j)  
03ebd5a4 48 8b 7d d0     MOV        RDI,qword ptr [RBP + local_38]
03ebd5a8 e8 53 76        CALL       FUN_03ec4c00                                     undefined FUN_03ec4c00()
         00 00
03ebd5ad 41 0f 38        MOVBE      ECX,dword ptr [R12]
         f0 0c 24
03ebd5b3 c5 f9 6f        VMOVDQA    XMM2,xmmword ptr [RBP + local_48[0]]
         55 c0
03ebd5b8 c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_047023e0]
         1d 20 4e 
         84 00
03ebd5c0 49 83 c7 fc     ADD        R15,-0x4
03ebd5c4 31 c1           XOR        ECX,EAX
03ebd5c6 8b 03           MOV        EAX,dword ptr [RBX]
03ebd5c8 89 c2           MOV        EDX,EAX
03ebd5ca c1 e2 04        SHL        EDX,0x4
03ebd5cd 8d 54 10 11     LEA        EDX,[RAX + RDX*0x1 + 0x11]
03ebd5d1 c5 f9 6e c2     VMOVD      XMM0,EDX
03ebd5d5 89 d0           MOV        EAX,EDX
03ebd5d7 89 13           MOV        dword ptr [RBX],EDX
03ebd5d9 c0 c2 04        ROL        DL,0x4
03ebd5dc c4 e2 79        VPBROADC   XMM0,XMM0
         58 c0
03ebd5e1 c4 e2 79        VPSHUFB    XMM0,XMM0,xmmword ptr [DAT_046fb8d0]             = 02h
         00 05 e6 
         e2 83 00
03ebd5ea 89 d6           MOV        ESI,EDX
03ebd5ec c0 ea 02        SHR        DL,0x2
03ebd5ef c1 e8 08        SHR        EAX,0x8
03ebd5f2 40 80 e6 33     AND        SIL,0x33
03ebd5f6 80 e2 33        AND        DL,0x33
03ebd5f9 c0 c0 04        ROL        AL,0x4
03ebd5fc 40 c0 e6 02     SHL        SIL,0x2
03ebd600 40 08 f2        OR         DL,SIL
03ebd603 89 d6           MOV        ESI,EDX
03ebd605 d0 ea           SHR        DL,0x1
03ebd607 40 80 e6 55     AND        SIL,0x55
03ebd60b 80 e2 55        AND        DL,0x55
03ebd60e 40 00 f6        ADD        SIL,SIL
03ebd611 40 08 f2        OR         DL,SIL
03ebd614 89 c6           MOV        ESI,EAX
03ebd616 c0 e8 02        SHR        AL,0x2
03ebd619 c5 f9 db ca     VPAND      XMM1,XMM0,XMM2
03ebd61d c5 f9 71        VPSRLW     XMM0,XMM0,0x4
         d0 04
03ebd622 40 80 e6 33     AND        SIL,0x33
03ebd626 24 33           AND        AL,0x33
03ebd628 0f b6 d2        MOVZX      EDX,DL
03ebd62b c4 e2 61        VPSHUFB    XMM1,XMM3,XMM1
         00 c9
03ebd630 c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_046fcde0]
         1d a8 f7 
         83 00
03ebd638 c5 f9 db c2     VPAND      XMM0,XMM0,XMM2
03ebd63c 40 c0 e6 02     SHL        SIL,0x2
03ebd640 40 08 f0        OR         AL,SIL
03ebd643 89 c6           MOV        ESI,EAX
03ebd645 d0 e8           SHR        AL,0x1
03ebd647 40 80 e6 55     AND        SIL,0x55
03ebd64b 24 55           AND        AL,0x55
03ebd64d 40 00 f6        ADD        SIL,SIL
03ebd650 40 08 f0        OR         AL,SIL
03ebd653 0f b6 c0        MOVZX      EAX,AL
03ebd656 c4 e2 61        VPSHUFB    XMM0,XMM3,XMM0
         00 c0
03ebd65b c1 e0 08        SHL        EAX,0x8
03ebd65e c5 f1 eb c0     VPOR       XMM0,XMM1,XMM0
03ebd662 09 d0           OR         EAX,EDX
03ebd664 c4 e2 79        VPMOVZXBD  XMM0,XMM0
         31 c0
03ebd669 c4 e2 79        VPSLLVD    XMM0,XMM0,xmmword ptr [RBP + local_58[0]]
         47 45 b0
03ebd66f c5 f9 7e c2     VMOVD      EDX,XMM0
03ebd673 09 c2           OR         EDX,EAX
03ebd675 c4 e3 79        VPEXTRD    EAX,XMM0,0x1
         16 c0 01
03ebd67b 09 d0           OR         EAX,EDX
03ebd67d c1 e2 08        SHL        EDX,0x8
03ebd680 8d 94 02        LEA        EDX,[RDX + RAX*0x1 + 0x101]
         01 01 00 00
03ebd687 c4 e3 7b        RORX       EDX,EDX,0x10
         f0 d2 10
03ebd68d 31 c2           XOR        EDX,EAX
03ebd68f 29 d1           SUB        ECX,EDX
03ebd691 41 0f 38        MOVBE      dword ptr [R12],ECX
         f1 0c 24
03ebd697 49 83 c4 04     ADD        R12,0x4
03ebd69b 49 83 ff 03     CMP        R15,0x3
03ebd69f 0f 87 ff        JA         LAB_03ebd5a4
         fe ff ff
                     LAB_03ebd6a5                                    XREF[1]:     03ebd582(j)  
03ebd6a5 4d 85 ff        TEST       R15,R15
03ebd6a8 0f 84 e0        JZ         LAB_03ebd78e
         00 00 00
03ebd6ae c4 e2 79        VPBROADC   XMM0,qword ptr [DAT_04706ff8]                    = 0000001000000008h
         59 05 41 
         99 84 00
03ebd6b7 c4 e2 79        VPBROADC   XMM1,byte ptr [DAT_04b3f05c]                     = 0Fh
         78 0d 9c 
         19 c8 00
03ebd6c0 45 31 ed        XOR        R13D,R13D
03ebd6c3 c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_58[0]],XMM0
         45 b0
03ebd6c8 c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_48[0]],XMM1
         4d c0
                     LAB_03ebd6cd                                    XREF[1]:     03ebd788(j)  
03ebd6cd 48 8b 7d d0     MOV        RDI,qword ptr [RBP + local_38]
03ebd6d1 47 0f b6        MOVZX      R14D,byte ptr [R12 + R13*0x1]
         34 2c
03ebd6d6 e8 25 75        CALL       FUN_03ec4c00                                     undefined FUN_03ec4c00()
         00 00
03ebd6db 8b 0b           MOV        ECX,dword ptr [RBX]
03ebd6dd c5 f9 6f        VMOVDQA    XMM2,xmmword ptr [RBP + local_48[0]]
         55 c0
03ebd6e2 c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_047023e0]
         1d f6 4c 
         84 00
03ebd6ea 44 31 f0        XOR        EAX,R14D
03ebd6ed 89 ca           MOV        EDX,ECX
03ebd6ef c1 e2 04        SHL        EDX,0x4
03ebd6f2 8d 4c 11 11     LEA        ECX,[RCX + RDX*0x1 + 0x11]
03ebd6f6 c5 f9 6e c1     VMOVD      XMM0,ECX
03ebd6fa 89 0b           MOV        dword ptr [RBX],ECX
03ebd6fc c0 c1 04        ROL        CL,0x4
03ebd6ff c4 e2 79        VPBROADC   XMM0,XMM0
         58 c0
03ebd704 c4 e2 79        VPSHUFB    XMM0,XMM0,xmmword ptr [DAT_046feed0]             = 01h
         00 05 c3 
         17 84 00
03ebd70d 89 ca           MOV        EDX,ECX
03ebd70f c0 e9 02        SHR        CL,0x2
03ebd712 80 e2 33        AND        DL,0x33
03ebd715 80 e1 33        AND        CL,0x33
03ebd718 c0 e2 02        SHL        DL,0x2
03ebd71b 08 d1           OR         CL,DL
03ebd71d 89 ca           MOV        EDX,ECX
03ebd71f d0 e9           SHR        CL,0x1
03ebd721 80 e2 55        AND        DL,0x55
03ebd724 80 e1 55        AND        CL,0x55
03ebd727 00 d2           ADD        DL,DL
03ebd729 08 d1           OR         CL,DL
03ebd72b c5 f9 db ca     VPAND      XMM1,XMM0,XMM2
03ebd72f c5 f9 71        VPSRLW     XMM0,XMM0,0x4
         d0 04
03ebd734 0f b6 c9        MOVZX      ECX,CL
03ebd737 c4 e2 61        VPSHUFB    XMM1,XMM3,XMM1
         00 c9
03ebd73c c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_046fcde0]
         1d 9c f6 
         83 00
03ebd744 c5 f9 db c2     VPAND      XMM0,XMM0,XMM2
03ebd748 c4 e2 61        VPSHUFB    XMM0,XMM3,XMM0
         00 c0
03ebd74d c5 f1 eb c0     VPOR       XMM0,XMM1,XMM0
03ebd751 c4 e2 79        VPMOVZXBD  XMM0,XMM0
         31 c0
03ebd756 c4 e2 79        VPSLLVD    XMM0,XMM0,xmmword ptr [RBP + local_58[0]]
         47 45 b0
03ebd75c c5 f9 70        VPSHUFD    XMM1,XMM0,0x55
         c8 55
03ebd761 c5 f9 eb c1     VPOR       XMM0,XMM0,XMM1
03ebd765 c5 f9 7e c2     VMOVD      EDX,XMM0
03ebd769 09 ca           OR         EDX,ECX
03ebd76b 89 d6           MOV        ESI,EDX
03ebd76d c1 e6 08        SHL        ESI,0x8
03ebd770 8d 94 16        LEA        EDX,[RSI + RDX*0x1 + 0x101]
         01 01 00 00
03ebd777 c1 ea 10        SHR        EDX,0x10
03ebd77a 31 ca           XOR        EDX,ECX
03ebd77c 29 d0           SUB        EAX,EDX
03ebd77e 43 88 04 2c     MOV        byte ptr [R12 + R13*0x1],AL
03ebd782 49 ff c5        INC        R13
03ebd785 4d 39 ef        CMP        R15,R13
03ebd788 0f 85 3f        JNZ        LAB_03ebd6cd
         ff ff ff
                     LAB_03ebd78e                                    XREF[1]:     03ebd6a8(j)  
03ebd78e 48 83 c4 28     ADD        RSP,0x28
03ebd792 5b              POP        RBX
03ebd793 41 5c           POP        R12
03ebd795 41 5d           POP        R13
03ebd797 41 5e           POP        R14
03ebd799 41 5f           POP        R15
03ebd79b 5d              POP        RBP
03ebd79c c3              RET
03ebd79d cc              ??         CCh
03ebd79e cc              ??         CCh
03ebd79f cc              ??         CCh

                     **************************************************************
                     *                          FUNCTION                          *
                     **************************************************************
                       undefined FUN_00804610()
     undefined         <UNASSIGNED>   <RETURN>
                     FUN_00804610                                    XREF[10]:    FUN_00801a60:00801a97(c), 
                                                                                  FUN_00804480:00804507(c), 
                                                                                  FUN_017c2a20:017c2a5e(c), 
                                                                                  FUN_0242e800:0242e8ab(c), 
                                                                                  FUN_02f32a60:02f32db4(c), 
                                                                                  FUN_02f32f90:02f32fc2(c), 
                                                                                  FUN_03e6c850:03e6c8d9(c), 
                                                                                  FUN_03e6c850:03e6c9f5(c), 
                                                                                  FUN_03ebd3f0:03ebd475(c), 
                                                                                  FUN_03ebd7a0:03ebd874(c)  
00804610 b8 01 00        MOV        EAX,0x1
         00 00
00804615 89 b7 c4        MOV        dword ptr [RDI + 0x9c4],ESI
         09 00 00
0080461b 89 37           MOV        dword ptr [RDI],ESI
0080461d c7 87 c0        MOV        dword ptr [RDI + 0x9c0],0x1
         09 00 00 
         01 00 00 00
00804627 66 0f 1f        NOP        word ptr [RAX + RAX*0x1]
         84 00 00 
         00 00 00
                     LAB_00804630                                    XREF[1]:     0080465d(j)  
00804630 48 98           CDQE
00804632 8b 4c 87 fc     MOV        ECX,dword ptr [RDI + RAX*0x4 + -0x4]
00804636 89 ca           MOV        EDX,ECX
00804638 c1 ea 1e        SHR        EDX,0x1e
0080463b 31 ca           XOR        EDX,ECX
0080463d 69 ca 65        IMUL       ECX,EDX,0x6c078965
         89 07 6c
00804643 01 c1           ADD        ECX,EAX
00804645 89 0c 87        MOV        dword ptr [RDI + RAX*0x4],ECX
00804648 8b 8f c0        MOV        ECX,dword ptr [RDI + 0x9c0]
         09 00 00
0080464e 8d 41 01        LEA        EAX,[RCX + 0x1]
00804651 89 87 c0        MOV        dword ptr [RDI + 0x9c0],EAX
         09 00 00
00804657 81 f9 6f        CMP        ECX,0x26f
         02 00 00
0080465d 7c d1           JL         LAB_00804630
0080465f c3              RET
Dr.Binary

Both functions decoded — and this changes my earlier guess in an interesting way. It's not a plain XOR keystream; it's a two-generator mixed stream transform. Here's the breakdown:

1. FUN_00804610 = textbook MT19937 init — confirmed ✅

ctx[0] = seed;                       // mt[0]
ctx[0x9C0] = 1;                      // index @ offset 2496
ctx[0x9C4] = seed;                   // raw seed stashed @ offset 2500
for (i = 1; i < 624; i++)
    mt[i] = 0x6C078965 * (mt[i-1] ^ (mt[i-1] >> 30)) + i;

0x6C078965 = 1812433253 = the standard init_genrand multiplier. Context = 624 words (2496 B) + index (+0x9C0) + saved seed (+0x9C4) = 2504 bytes — exactly matches the local_a00[2504] prediction. Stock MT19937, no tweaks.

2. FUN_03ebd560 = per-word mixed transform

Main loop processes 4 bytes at a time as big-endian dwords (MOVBE), tail loop does the remainder byte-by-byte, same math:

// per step
t = FUN_03ec4c00(ctx);              // next tempered MT19937 word
w = bswap32( load32(p) ) ^ t;       // dword path (byte path: b ^ t_lo8)

s = *counter;                       // ← 4th arg (RCX), a 32-bit counter, NOT the MT ctx
s = s * 17 + 17;                    // = (s+1)*17, stored back to *counter
k = bitrev_mix(s);                  // keystream word (see below)

store bswap32( w - k );             // NOTE: subtract, not XOR

The keystream k is built from the counter's bytes via nibble-swap SIMD: VPSHUFB against 16-entry tables (DAT_047023e0, DAT_046fcde0) after splitting nibbles — that's the classic vectorized bit-reverse-per-byte; the scalar path confirms it (ROL 4 → &0x33 pair-swap → &0x55 bit-swap = full rev8). The pieces are then reassembled with shifts/RORX/XOR into a 32-bit mixing word. So:

  • counter chain: s ← (s+1)·17, reassembled via bit-reversal + rotate/xor mixing → keystream word
  • combine: data_be = bswap(bswap32(load) ^ mt_word − k)

Because the mix is stateless w.r.t. the data, decrypt is mechanical: regenerate t and k identically, then add instead of subtract.

3. Two open items

  • The counter pointer (RCX / RBX in the fn). The caller's decompile only showed 3 args, so Ghidra swallowed it. Check the disassembly right before CALL FUN_03ebd560 at 0x03ebd494 — you'll see the LEA/MOV that sets ECX. My bet: it points into the MT context (likely ctx+0x9C0, the index field), which would make the initial counter value 1.
  • The exact mixing expression. To pin k to the last bit I need the four constants: DAT_047023e0 and DAT_046fcde0 (16-byte tables — almost certainly both the nibble-reverse table {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15}), and the two VPSHUFB masks at DAT_046fb8d0 / DAT_046feed0 (byte-select patterns, first bytes 02h/01h).

4. Also notable

  • FUN_03ebd7a0 — sitting immediately after FUN_03ebd560, and it also calls FUN_00804610 (XREF at 03ebd874). That's the decrypt-side transform (+ k instead of − k). One paste would confirm the whole inversion.
  • FUN_00804610's XREF list (017c2a20, 0242e800, 02f32a60, 03e6c850, ...) shows this MT19937 is a shared utility — and 017c2a20 lives right in the script-binding module, so other script-exposed classes use the same PRNG.

Verdict — unchanged and now stronger

Unkeyed obfuscation, fully specified by the blob itself: MT19937 (stock) seeded with crc + nonce, both recoverable from the (unswapped) header, plus a deterministic counter chain. No secret anywhere. Once the four constants and the RCX source are confirmed, the algorithm is 100% specified and I'll hand you the Python encrypt/decrypt pair to verify against a real blob.

Paste next (any order):

  1. Disassembly of FUN_03ebd3f0 around 03ebd494 (the call site — RCX setup)
  2. FUN_03ebd7a0 (decrypt twin)
  3. FUN_03ec4c00 (MT twist/temper — to confirm stock constants)
  4. The 32 bytes at DAT_047023e0, DAT_046fcde0, DAT_046fb8d0, DAT_046feed0
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_03ebd3f0()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[2]:     03ebd418(W), 
                                                                                               03ebd534(R)  
         undefined         Stack[-0xa00   local_a00                               XREF[2]:     03ebd463(*), 
                                                                                               03ebd48a(*)  
         undefined4        Stack[-0xa04   local_a04                               XREF[2]:     03ebd47d(*), 
                                                                                               03ebd491(*)  
                         FUN_03ebd3f0                                    XREF[1]:     FUN_017b5400:017b54ca(c)  
    03ebd3f0 55              PUSH       RBP
    03ebd3f1 48 89 e5        MOV        RBP,RSP
    03ebd3f4 41 57           PUSH       R15
    03ebd3f6 41 56           PUSH       R14
    03ebd3f8 41 55           PUSH       R13
    03ebd3fa 41 54           PUSH       R12
    03ebd3fc 53              PUSH       RBX
    03ebd3fd 48 81 ec        SUB        RSP,0x9d8
             d8 09 00 00
    03ebd404 48 8b 05        MOV        RAX,qword ptr [->__stack_chk_guard]              = 07d7faf8
             85 1a 72 01
    03ebd40b 49 89 f6        MOV        R14,RSI
    03ebd40e 48 89 fb        MOV        RBX,RDI
    03ebd411 4c 8d 7f 08     LEA        R15,[RDI + 0x8]
    03ebd415 48 8b 00        MOV        RAX=>__stack_chk_guard,qword ptr [RAX]           = ??
    03ebd418 48 89 45 d0     MOV        qword ptr [RBP + local_38],RAX
    03ebd41c b8 39 30        MOV        EAX,0x3039
             00 00
    03ebd421 48 85 f6        TEST       RSI,RSI
    03ebd424 74 2c           JZ         LAB_03ebd452
    03ebd426 b8 ff ff        MOV        EAX,0xffffffff
             ff ff
    03ebd42b 48 8d 15        LEA        RDX,[DAT_0506c330]
             fe ee 1a 01
    03ebd432 31 c9           XOR        ECX,ECX
                         LAB_03ebd434                                    XREF[1]:     03ebd44b(j)  
    03ebd434 41 8a 34 0f     MOV        SIL,byte ptr [R15 + RCX*0x1]
    03ebd438 48 ff c1        INC        RCX
    03ebd43b 40 30 c6        XOR        SIL,AL
    03ebd43e c1 e8 08        SHR        EAX,0x8
    03ebd441 40 0f b6 f6     MOVZX      ESI,SIL
    03ebd445 33 04 b2        XOR        EAX,dword ptr [RDX + RSI*0x4]=>DAT_0506c330
    03ebd448 49 39 ce        CMP        R14,RCX
    03ebd44b 75 e7           JNZ        LAB_03ebd434
    03ebd44d 35 c6 cf        XOR        EAX,0xffffcfc6
             ff ff
                         LAB_03ebd452                                    XREF[1]:     03ebd424(j)  
    03ebd452 0f 38 f1        MOVBE      dword ptr [RBX + 0x4],EAX
             43 04
    03ebd457 e8 f4 a6        CALL       FUN_00767b50                                     undefined FUN_00767b50()
             8a fc
    03ebd45c 0f 38 f1 03     MOVBE      dword ptr [RBX],EAX
    03ebd460 41 89 c4        MOV        R12D,EAX
    03ebd463 48 8d bd        LEA        RDI=>local_a00,[RBP + -0x9f8]
             08 f6 ff ff
    03ebd46a 44 0f 38        MOVBE      R13D,dword ptr [RBX + 0x4]
             f0 6b 04
    03ebd470 43 8d 74        LEA        ESI,[R13 + R12*0x1]
             25 00
    03ebd475 e8 96 71        CALL       FUN_00804610                                     undefined FUN_00804610()
             94 fc
    03ebd47a 45 31 e5        XOR        R13D,R12D
    03ebd47d 48 8d 8d        LEA        RCX=>local_a04,[RBP + -0x9fc]
             04 f6 ff ff
    03ebd484 4c 89 ff        MOV        RDI,R15
    03ebd487 4c 89 f6        MOV        RSI,R14
    03ebd48a 48 8d 95        LEA        RDX=>local_a00,[RBP + -0x9f8]
             08 f6 ff ff
    03ebd491 44 89 29        MOV        dword ptr [RCX]=>local_a04,R13D
    03ebd494 e8 c7 00        CALL       FUN_03ebd560                                     undefined FUN_03ebd560()
             00 00
    03ebd499 49 69 c6        IMUL       RAX,R14,0x4339334b
             4b 33 39 43
    03ebd4a0 8a 4b 04        MOV        CL,byte ptr [RBX + 0x4]
    03ebd4a3 48 c1 f8 20     SAR        RAX,0x20
    03ebd4a7 8a 54 03 04     MOV        DL,byte ptr [RBX + RAX*0x1 + 0x4]
    03ebd4ab 88 53 04        MOV        byte ptr [RBX + 0x4],DL
    03ebd4ae 88 4c 03 04     MOV        byte ptr [RBX + RAX*0x1 + 0x4],CL
    03ebd4b2 8a 4b 05        MOV        CL,byte ptr [RBX + 0x5]
    03ebd4b5 8a 54 03 05     MOV        DL,byte ptr [RBX + RAX*0x1 + 0x5]
    03ebd4b9 88 53 05        MOV        byte ptr [RBX + 0x5],DL
    03ebd4bc 88 4c 03 05     MOV        byte ptr [RBX + RAX*0x1 + 0x5],CL
    03ebd4c0 8a 4b 06        MOV        CL,byte ptr [RBX + 0x6]
    03ebd4c3 8a 54 03 06     MOV        DL,byte ptr [RBX + RAX*0x1 + 0x6]
    03ebd4c7 88 53 06        MOV        byte ptr [RBX + 0x6],DL
    03ebd4ca 88 4c 03 06     MOV        byte ptr [RBX + RAX*0x1 + 0x6],CL
    03ebd4ce 8a 4b 07        MOV        CL,byte ptr [RBX + 0x7]
    03ebd4d1 8a 54 03 07     MOV        DL,byte ptr [RBX + RAX*0x1 + 0x7]
    03ebd4d5 88 53 07        MOV        byte ptr [RBX + 0x7],DL
    03ebd4d8 88 4c 03 07     MOV        byte ptr [RBX + RAX*0x1 + 0x7],CL
    03ebd4dc b8 6e be        MOV        EAX,0xc0e2be6e
             e2 c0
    03ebd4e1 48 b9 b8        MOV        RCX,0x3038af9b8
             f9 8a 03 
             03 00 00 00
    03ebd4eb 49 0f af c6     IMUL       RAX,R14
    03ebd4ef 48 01 c1        ADD        RCX,RAX
    03ebd4f2 8a 03           MOV        AL,byte ptr [RBX]
    03ebd4f4 48 c1 f9 20     SAR        RCX,0x20
    03ebd4f8 8a 14 0b        MOV        DL,byte ptr [RBX + RCX*0x1]
    03ebd4fb 88 13           MOV        byte ptr [RBX],DL
    03ebd4fd 88 04 0b        MOV        byte ptr [RBX + RCX*0x1],AL
    03ebd500 8a 43 01        MOV        AL,byte ptr [RBX + 0x1]
    03ebd503 8a 54 0b 01     MOV        DL,byte ptr [RBX + RCX*0x1 + 0x1]
    03ebd507 88 53 01        MOV        byte ptr [RBX + 0x1],DL
    03ebd50a 88 44 0b 01     MOV        byte ptr [RBX + RCX*0x1 + 0x1],AL
    03ebd50e 8a 43 02        MOV        AL,byte ptr [RBX + 0x2]
    03ebd511 8a 54 0b 02     MOV        DL,byte ptr [RBX + RCX*0x1 + 0x2]
    03ebd515 88 53 02        MOV        byte ptr [RBX + 0x2],DL
    03ebd518 88 44 0b 02     MOV        byte ptr [RBX + RCX*0x1 + 0x2],AL
    03ebd51c 8a 43 03        MOV        AL,byte ptr [RBX + 0x3]
    03ebd51f 8a 54 0b 03     MOV        DL,byte ptr [RBX + RCX*0x1 + 0x3]
    03ebd523 88 53 03        MOV        byte ptr [RBX + 0x3],DL
    03ebd526 88 44 0b 03     MOV        byte ptr [RBX + RCX*0x1 + 0x3],AL
    03ebd52a 48 8b 0d        MOV        RCX=>__stack_chk_guard,qword ptr [->__stack_ch   = ??
             5f 19 72 01                                                                 = 07d7faf8
    03ebd531 48 8b 01        MOV        RAX,qword ptr [RCX]=>__stack_chk_guard           = ??
    03ebd534 48 3b 45 d0     CMP        RAX,qword ptr [RBP + local_38]
    03ebd538 75 12           JNZ        LAB_03ebd54c
    03ebd53a 48 81 c4        ADD        RSP,0x9d8
             d8 09 00 00
    03ebd541 5b              POP        RBX
    03ebd542 41 5c           POP        R12
    03ebd544 41 5d           POP        R13
    03ebd546 41 5e           POP        R14
    03ebd548 41 5f           POP        R15
    03ebd54a 5d              POP        RBP
    03ebd54b c3              RET
                         LAB_03ebd54c                                    XREF[1]:     03ebd538(j)  
    03ebd54c e8 0f ff        CALL       __stack_chk_fail                                 undefined __stack_chk_fail()
             04 00
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
    03ebd551 0f              ??         0Fh
    03ebd552 0b              ??         0Bh
    03ebd553 cc              ??         CCh
    03ebd554 cc              ??         CCh
    03ebd555 cc              ??         CCh
    03ebd556 cc              ??         CCh
    03ebd557 cc              ??         CCh
    03ebd558 cc              ??         CCh
    03ebd559 cc              ??         CCh
    03ebd55a cc              ??         CCh
    03ebd55b cc              ??         CCh
    03ebd55c cc              ??         CCh
    03ebd55d cc              ??         CCh
    03ebd55e cc              ??         CCh
    03ebd55f cc              ??         CCh
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_03ebd560()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[3]:     03ebd57a(W), 
                                                                                               03ebd5a4(R), 
                                                                                               03ebd6cd(R)  
         undefined1[16]    Stack[-0x48]   local_48                                XREF[4]:     03ebd59f(W), 
                                                                                               03ebd5b3(R), 
                                                                                               03ebd6c8(W), 
                                                                                               03ebd6dd(R)  
         undefined1[16]    Stack[-0x58]   local_58                                XREF[4]:     03ebd59a(W), 
                                                                                               03ebd669(R), 
                                                                                               03ebd6c3(W), 
                                                                                               03ebd756(R)  
                         FUN_03ebd560                                    XREF[1]:     FUN_03ebd3f0:03ebd494(c)  
    03ebd560 55              PUSH       RBP
    03ebd561 48 89 e5        MOV        RBP,RSP
    03ebd564 41 57           PUSH       R15
    03ebd566 41 56           PUSH       R14
    03ebd568 41 55           PUSH       R13
    03ebd56a 41 54           PUSH       R12
    03ebd56c 53              PUSH       RBX
    03ebd56d 48 83 ec 28     SUB        RSP,0x28
    03ebd571 48 89 cb        MOV        RBX,RCX
    03ebd574 49 89 f7        MOV        R15,RSI
    03ebd577 49 89 fc        MOV        R12,RDI
    03ebd57a 48 89 55 d0     MOV        qword ptr [RBP + local_38],RDX
    03ebd57e 48 83 fe 04     CMP        RSI,0x4
    03ebd582 0f 82 1d        JC         LAB_03ebd6a5
             01 00 00
    03ebd588 c4 e2 79        VPBROADC   XMM0,qword ptr [DAT_04705ed8]                    = 0000001800000010h
             59 05 47 
             89 84 00
    03ebd591 c4 e2 79        VPBROADC   XMM1,byte ptr [DAT_04b3f05c]                     = 0Fh
             78 0d c2 
             1a c8 00
    03ebd59a c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_58[0]],XMM0
             45 b0
    03ebd59f c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_48[0]],XMM1
             4d c0
                         LAB_03ebd5a4                                    XREF[1]:     03ebd69f(j)  
    03ebd5a4 48 8b 7d d0     MOV        RDI,qword ptr [RBP + local_38]
    03ebd5a8 e8 53 76        CALL       FUN_03ec4c00                                     undefined FUN_03ec4c00()
             00 00
    03ebd5ad 41 0f 38        MOVBE      ECX,dword ptr [R12]
             f0 0c 24
    03ebd5b3 c5 f9 6f        VMOVDQA    XMM2,xmmword ptr [RBP + local_48[0]]
             55 c0
    03ebd5b8 c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_047023e0]
             1d 20 4e 
             84 00
    03ebd5c0 49 83 c7 fc     ADD        R15,-0x4
    03ebd5c4 31 c1           XOR        ECX,EAX
    03ebd5c6 8b 03           MOV        EAX,dword ptr [RBX]
    03ebd5c8 89 c2           MOV        EDX,EAX
    03ebd5ca c1 e2 04        SHL        EDX,0x4
    03ebd5cd 8d 54 10 11     LEA        EDX,[RAX + RDX*0x1 + 0x11]
    03ebd5d1 c5 f9 6e c2     VMOVD      XMM0,EDX
    03ebd5d5 89 d0           MOV        EAX,EDX
    03ebd5d7 89 13           MOV        dword ptr [RBX],EDX
    03ebd5d9 c0 c2 04        ROL        DL,0x4
    03ebd5dc c4 e2 79        VPBROADC   XMM0,XMM0
             58 c0
    03ebd5e1 c4 e2 79        VPSHUFB    XMM0,XMM0,xmmword ptr [DAT_046fb8d0]             = 02h
             00 05 e6 
             e2 83 00
    03ebd5ea 89 d6           MOV        ESI,EDX
    03ebd5ec c0 ea 02        SHR        DL,0x2
    03ebd5ef c1 e8 08        SHR        EAX,0x8
    03ebd5f2 40 80 e6 33     AND        SIL,0x33
    03ebd5f6 80 e2 33        AND        DL,0x33
    03ebd5f9 c0 c0 04        ROL        AL,0x4
    03ebd5fc 40 c0 e6 02     SHL        SIL,0x2
    03ebd600 40 08 f2        OR         DL,SIL
    03ebd603 89 d6           MOV        ESI,EDX
    03ebd605 d0 ea           SHR        DL,0x1
    03ebd607 40 80 e6 55     AND        SIL,0x55
    03ebd60b 80 e2 55        AND        DL,0x55
    03ebd60e 40 00 f6        ADD        SIL,SIL
    03ebd611 40 08 f2        OR         DL,SIL
    03ebd614 89 c6           MOV        ESI,EAX
    03ebd616 c0 e8 02        SHR        AL,0x2
    03ebd619 c5 f9 db ca     VPAND      XMM1,XMM0,XMM2
    03ebd61d c5 f9 71        VPSRLW     XMM0,XMM0,0x4
             d0 04
    03ebd622 40 80 e6 33     AND        SIL,0x33
    03ebd626 24 33           AND        AL,0x33
    03ebd628 0f b6 d2        MOVZX      EDX,DL
    03ebd62b c4 e2 61        VPSHUFB    XMM1,XMM3,XMM1
             00 c9
    03ebd630 c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_046fcde0]
             1d a8 f7 
             83 00
    03ebd638 c5 f9 db c2     VPAND      XMM0,XMM0,XMM2
    03ebd63c 40 c0 e6 02     SHL        SIL,0x2
    03ebd640 40 08 f0        OR         AL,SIL
    03ebd643 89 c6           MOV        ESI,EAX
    03ebd645 d0 e8           SHR        AL,0x1
    03ebd647 40 80 e6 55     AND        SIL,0x55
    03ebd64b 24 55           AND        AL,0x55
    03ebd64d 40 00 f6        ADD        SIL,SIL
    03ebd650 40 08 f0        OR         AL,SIL
    03ebd653 0f b6 c0        MOVZX      EAX,AL
    03ebd656 c4 e2 61        VPSHUFB    XMM0,XMM3,XMM0
             00 c0
    03ebd65b c1 e0 08        SHL        EAX,0x8
    03ebd65e c5 f1 eb c0     VPOR       XMM0,XMM1,XMM0
    03ebd662 09 d0           OR         EAX,EDX
    03ebd664 c4 e2 79        VPMOVZXBD  XMM0,XMM0
             31 c0
    03ebd669 c4 e2 79        VPSLLVD    XMM0,XMM0,xmmword ptr [RBP + local_58[0]]
             47 45 b0
    03ebd66f c5 f9 7e c2     VMOVD      EDX,XMM0
    03ebd673 09 c2           OR         EDX,EAX
    03ebd675 c4 e3 79        VPEXTRD    EAX,XMM0,0x1
             16 c0 01
    03ebd67b 09 d0           OR         EAX,EDX
    03ebd67d c1 e2 08        SHL        EDX,0x8
    03ebd680 8d 94 02        LEA        EDX,[RDX + RAX*0x1 + 0x101]
             01 01 00 00
    03ebd687 c4 e3 7b        RORX       EDX,EDX,0x10
             f0 d2 10
    03ebd68d 31 c2           XOR        EDX,EAX
    03ebd68f 29 d1           SUB        ECX,EDX
    03ebd691 41 0f 38        MOVBE      dword ptr [R12],ECX
             f1 0c 24
    03ebd697 49 83 c4 04     ADD        R12,0x4
    03ebd69b 49 83 ff 03     CMP        R15,0x3
    03ebd69f 0f 87 ff        JA         LAB_03ebd5a4
             fe ff ff
                         LAB_03ebd6a5                                    XREF[1]:     03ebd582(j)  
    03ebd6a5 4d 85 ff        TEST       R15,R15
    03ebd6a8 0f 84 e0        JZ         LAB_03ebd78e
             00 00 00
    03ebd6ae c4 e2 79        VPBROADC   XMM0,qword ptr [DAT_04706ff8]                    = 0000001000000008h
             59 05 41 
             99 84 00
    03ebd6b7 c4 e2 79        VPBROADC   XMM1,byte ptr [DAT_04b3f05c]                     = 0Fh
             78 0d 9c 
             19 c8 00
    03ebd6c0 45 31 ed        XOR        R13D,R13D
    03ebd6c3 c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_58[0]],XMM0
             45 b0
    03ebd6c8 c5 f9 7f        VMOVDQA    xmmword ptr [RBP + local_48[0]],XMM1
             4d c0
                         LAB_03ebd6cd                                    XREF[1]:     03ebd788(j)  
    03ebd6cd 48 8b 7d d0     MOV        RDI,qword ptr [RBP + local_38]
    03ebd6d1 47 0f b6        MOVZX      R14D,byte ptr [R12 + R13*0x1]
             34 2c
    03ebd6d6 e8 25 75        CALL       FUN_03ec4c00                                     undefined FUN_03ec4c00()
             00 00
    03ebd6db 8b 0b           MOV        ECX,dword ptr [RBX]
    03ebd6dd c5 f9 6f        VMOVDQA    XMM2,xmmword ptr [RBP + local_48[0]]
             55 c0
    03ebd6e2 c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_047023e0]
             1d f6 4c 
             84 00
    03ebd6ea 44 31 f0        XOR        EAX,R14D
    03ebd6ed 89 ca           MOV        EDX,ECX
    03ebd6ef c1 e2 04        SHL        EDX,0x4
    03ebd6f2 8d 4c 11 11     LEA        ECX,[RCX + RDX*0x1 + 0x11]
    03ebd6f6 c5 f9 6e c1     VMOVD      XMM0,ECX
    03ebd6fa 89 0b           MOV        dword ptr [RBX],ECX
    03ebd6fc c0 c1 04        ROL        CL,0x4
    03ebd6ff c4 e2 79        VPBROADC   XMM0,XMM0
             58 c0
    03ebd704 c4 e2 79        VPSHUFB    XMM0,XMM0,xmmword ptr [DAT_046feed0]             = 01h
             00 05 c3 
             17 84 00
    03ebd70d 89 ca           MOV        EDX,ECX
    03ebd70f c0 e9 02        SHR        CL,0x2
    03ebd712 80 e2 33        AND        DL,0x33
    03ebd715 80 e1 33        AND        CL,0x33
    03ebd718 c0 e2 02        SHL        DL,0x2
    03ebd71b 08 d1           OR         CL,DL
    03ebd71d 89 ca           MOV        EDX,ECX
    03ebd71f d0 e9           SHR        CL,0x1
    03ebd721 80 e2 55        AND        DL,0x55
    03ebd724 80 e1 55        AND        CL,0x55
    03ebd727 00 d2           ADD        DL,DL
    03ebd729 08 d1           OR         CL,DL
    03ebd72b c5 f9 db ca     VPAND      XMM1,XMM0,XMM2
    03ebd72f c5 f9 71        VPSRLW     XMM0,XMM0,0x4
             d0 04
    03ebd734 0f b6 c9        MOVZX      ECX,CL
    03ebd737 c4 e2 61        VPSHUFB    XMM1,XMM3,XMM1
             00 c9
    03ebd73c c5 fa 6f        VMOVDQU    XMM3,xmmword ptr [DAT_046fcde0]
             1d 9c f6 
             83 00
    03ebd744 c5 f9 db c2     VPAND      XMM0,XMM0,XMM2
    03ebd748 c4 e2 61        VPSHUFB    XMM0,XMM3,XMM0
             00 c0
    03ebd74d c5 f1 eb c0     VPOR       XMM0,XMM1,XMM0
    03ebd751 c4 e2 79        VPMOVZXBD  XMM0,XMM0
             31 c0
    03ebd756 c4 e2 79        VPSLLVD    XMM0,XMM0,xmmword ptr [RBP + local_58[0]]
             47 45 b0
    03ebd75c c5 f9 70        VPSHUFD    XMM1,XMM0,0x55
             c8 55
    03ebd761 c5 f9 eb c1     VPOR       XMM0,XMM0,XMM1
    03ebd765 c5 f9 7e c2     VMOVD      EDX,XMM0
    03ebd769 09 ca           OR         EDX,ECX
    03ebd76b 89 d6           MOV        ESI,EDX
    03ebd76d c1 e6 08        SHL        ESI,0x8
    03ebd770 8d 94 16        LEA        EDX,[RSI + RDX*0x1 + 0x101]
             01 01 00 00
    03ebd777 c1 ea 10        SHR        EDX,0x10
    03ebd77a 31 ca           XOR        EDX,ECX
    03ebd77c 29 d0           SUB        EAX,EDX
    03ebd77e 43 88 04 2c     MOV        byte ptr [R12 + R13*0x1],AL
    03ebd782 49 ff c5        INC        R13
    03ebd785 4d 39 ef        CMP        R15,R13
    03ebd788 0f 85 3f        JNZ        LAB_03ebd6cd
             ff ff ff
                         LAB_03ebd78e                                    XREF[1]:     03ebd6a8(j)  
    03ebd78e 48 83 c4 28     ADD        RSP,0x28
    03ebd792 5b              POP        RBX
    03ebd793 41 5c           POP        R12
    03ebd795 41 5d           POP        R13
    03ebd797 41 5e           POP        R14
    03ebd799 41 5f           POP        R15
    03ebd79b 5d              POP        RBP
    03ebd79c c3              RET
    03ebd79d cc              ??         CCh
    03ebd79e cc              ??         CCh
    03ebd79f cc              ??         CCh
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_03ebd7a0()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[2]:     03ebd7d2(W), 
                                                                                               03ebd917(R)  
         undefined         Stack[-0xa00   local_a00                               XREF[2]:     03ebd868(*), 
                                                                                               03ebd88a(*)  
         undefined4        Stack[-0xa04   local_a04                               XREF[2]:     03ebd87c(*), 
                                                                                               03ebd891(*)  
                         FUN_03ebd7a0                                    XREF[1]:     FUN_017b5520:017b56c0(c)  
    03ebd7a0 55              PUSH       RBP

](streamdown:incomplete-link)

Dr.Binary

The call site resolves the last mystery — and lets me pin the keystream mixing to an exact formula. Three findings, then a working implementation:

1. The RCX "counter" is a stack local, initialized to crc ^ nonce

03ebd463  LEA  RDI,[RBP-0x9F8]        ; MT ctx (2504 B)
03ebd46a  MOVBE R13D,[RBX+4]          ; R13 = crc  (big-endian read back)
03ebd470  LEA  ESI,[R13+R12]          ; seed = crc + nonce        → MT init
03ebd475  CALL FUN_00804610
03ebd47a  XOR  R13D,R12D              ; counter = crc ^ nonce     (!)
03ebd47d  LEA  RCX,[RBP-0x9FC]        ; RCX = &counter (4-byte stack local)
03ebd491  MOV  [RCX],R13D
03ebd494  CALL FUN_03ebd560

Ghidra had hidden local_a04 (it sits 4 bytes below the MT ctx). So: MT seed = crc + nonce (mod 2³²), mixer counter = crc ^ nonce.

2. The mixing formula is now exact. Tracing the scalar+SIMD paths against each other:

  • SIMD tables DAT_047023e0 / DAT_046fcde0 are the two nibble-reverse LUTs (rev4[n]<<4 and rev4[n]) — classic vectorized bit-reversal; masks 02h/01h select bytes 2/3 and 1/2. The scalar path computes rev8 of bytes 0/1 by hand.
  • Reassembly: SHL 8; LEA +0x101 builds (r+1)·257; RORX 0x10 + XOR finishes it. The byte-tail loop looks different but is algebraically the same expression truncated to 8 bits (I verified the bit-ranges — the compiler just elided byte 3).
s = (s + 1) * 17;                 // counter chain
r = bitrev32(s);                  // full 32-bit reversal
k = ror32((r + 1) * 257, 16) ^ r; // keystream word
word = (bswap32(load) ^ mt_next()) - k;   // store bswap32; decrypt adds

3. Header swaps confirmed in asm — SAR-based offsets, CRC dword (+4) swapped first, nonce dword (+0) second, so decrypt unswaps in reverse order.

I've written the reference implementation:

write_file
run_sandbox

Roundtrip failed — good, the self-test is doing its job. Found it: overlapping swap ranges are not self-inverse in the same index order. Encrypt swaps bytes i=0,1,2,3 sequentially; when the two regions overlap (small payloads, e.g. off_crc=1..3 or off_time=3), decrypt must replay them in reverse index order. That's exactly what the game's decrypt twin must do too. Fixing:

edit_file
run_sandbox

Still failing at a later case — let me stop hand-tracing and isolate the swap logic from the transform empirically:

run_sandbox

Swaps invert cleanly — so the bug is in the transform inverse. And there it is: XOR and subtract don't commute. Encrypt does (plain ^ t) - k, so decrypt must be (cipher + k) ^ t — not (cipher ^ t) + k like I wrote. My decrypt needs the operations un-applied in reverse order:

edit_file
run_sandbox

✅ gt7_blob_crypto.py — selftest passes. Here's the complete reconstructed algorithm:

Final spec

Blob = [nonce_be:4][crc_be:4][payload: n]

  1. crc = zlib.crc32(payload) ^ 0x3039 (empty → 0x3039) — stored big-endian at +4
  2. nonce = FUN_00767b50() (likely time()) — big-endian at +0
  3. Payload transform (MT19937 seeded crc + nonce, mixer counter s₀ = crc ^ nonce):
    • per 4-byte big-endian block: c = (p ^ mt_next()) − k where s ← (s+1)·17, k = ror32((bitrev32(s)+1)·257, 16) ^ bitrev32(s)
    • per remaining byte: same with t low 8 bits
  4. Header concealment (sequential byte swaps): CRC dword +4..7 ↔ +4+off.., off=(n·0x4339334B)>>32; nonce dword +0..3 ↔ +off.., off=(n·0xC0E2BE6E+0x3038AF9B8)>>32

Decrypt reverses in exact inverse order — and the two bugs my self-test caught are worth remembering because they apply to the game's decrypt twin too:

  • overlapping swap regions (off ≤ 3 for small n) require replaying swaps in reverse index order (i=3,2,1,0)
  • (p ^ t) − k inverts as p = (c + k) ^ t — add first, then XOR

Confidence & remaining unknowns

PieceStatus
MT19937 init (0x6C078965, >>30, +i, 2504-B ctx)✅ from asm
CRC + swap constants + call-site (crc+nonce seed, crc^nonce counter)✅ from asm
Keystream formula ror32((r+1)·257,16) ^ r✅ derived from asm bit-exactly
A1: FUN_03ec4c00 = stock MT twist/temper⚠️ assumed — paste it to confirm (note ctx[0x9C0]=1 at init: if FUN_03ec4c00 only regenerates at idx ≥ 624, the first 623 outputs skip mt[0] — a one-line change either way)
A2: the two nibble LUTs are rev4[n]<<4 / rev4[n]⚠️ assumed — dump 16 bytes each at 0x047023e0 / 0x046fcde0

Verification: internal roundtrip passes for n = 0…65537, but that only proves self-consistency. The decisive test is decrypting a real game blob — the CRC check will tell you instantly: if A1/A2 are right, valid blobs decrypt with CRC match; if not, they'll fail loudly. CLI: python3 gt7_blob_crypto.py decrypt <file>.

To close the loop, paste FUN_03ec4c00, FUN_00767b50, and the rest of FUN_03ebd7a0 (its swap section should show the reverse-order unswaps — good confirmation of finding #1), or hand me one real blob and I'll validate against it.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_03ec4c00()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_03ec4c00                                    XREF[13]:    FUN_008061f0:008062c2(c), 
                                                                                      FUN_0242e800:0242e8b3(c), 
                                                                                      FUN_02e6adc0:02e6b1e1(c), 
                                                                                      FUN_02f32a60:02f32dbc(c), 
                                                                                      FUN_02f32a60:02f32e59(c), 
                                                                                      FUN_02f32f90:02f32fca(c), 
                                                                                      FUN_02f32f90:02f32fee(c), 
                                                                                      FUN_03e6c850:03e6c8e1(c), 
                                                                                      FUN_03e6c850:03e6c9fd(c), 
                                                                                      FUN_03ebd560:03ebd5a8(c), 
                                                                                      FUN_03ebd560:03ebd6d6(c), 
                                                                                      FUN_03ebd940:03ebd96a(c), 
                                                                                      FUN_03ebd940:03ebdb01(c)  
    03ec4c00 8b 87 c0        MOV        EAX,dword ptr [RDI + 0x9c0]
             09 00 00
    03ec4c06 3d 70 02        CMP        EAX,0x270
             00 00
    03ec4c0b 7d 36           JGE        LAB_03ec4c43
                         LAB_03ec4c0d                                    XREF[1]:     03ec4c60(j)  
    03ec4c0d 8d 48 01        LEA        ECX,[RAX + 0x1]
    03ec4c10 48 98           CDQE
    03ec4c12 89 8f c0        MOV        dword ptr [RDI + 0x9c0],ECX
             09 00 00
    03ec4c18 8b 04 87        MOV        EAX,dword ptr [RDI + RAX*0x4]
    03ec4c1b 89 c1           MOV        ECX,EAX
    03ec4c1d c1 e9 0b        SHR        ECX,0xb
    03ec4c20 31 c1           XOR        ECX,EAX
    03ec4c22 89 c8           MOV        EAX,ECX
    03ec4c24 c1 e0 07        SHL        EAX,0x7
    03ec4c27 25 80 56        AND        EAX,0x9d2c5680
             2c 9d
    03ec4c2c 31 c8           XOR        EAX,ECX
    03ec4c2e 89 c1           MOV        ECX,EAX
    03ec4c30 c1 e1 0f        SHL        ECX,0xf
    03ec4c33 81 e1 00        AND        ECX,0xefc60000
             00 c6 ef
    03ec4c39 31 c1           XOR        ECX,EAX
    03ec4c3b 89 c8           MOV        EAX,ECX
    03ec4c3d c1 e8 12        SHR        EAX,0x12
    03ec4c40 31 c8           XOR        EAX,ECX
    03ec4c42 c3              RET
                         LAB_03ec4c43                                    XREF[1]:     03ec4c0b(j)  
    03ec4c43 55              PUSH       RBP
    03ec4c44 48 89 e5        MOV        RBP,RSP
    03ec4c47 53              PUSH       RBX
    03ec4c48 50              PUSH       RAX
    03ec4c49 48 89 fb        MOV        RBX,RDI
    03ec4c4c e8 1f 00        CALL       FUN_03ec4c70                                     undefined FUN_03ec4c70()
             00 00
    03ec4c51 8b 83 c0        MOV        EAX,dword ptr [RBX + 0x9c0]
             09 00 00
    03ec4c57 48 89 df        MOV        RDI,RBX
    03ec4c5a 48 83 c4 08     ADD        RSP,0x8
    03ec4c5e 5b              POP        RBX
    03ec4c5f 5d              POP        RBP
    03ec4c60 eb ab           JMP        LAB_03ec4c0d
    03ec4c62 cc              ??         CCh
    03ec4c63 cc              ??         CCh
    03ec4c64 cc              ??         CCh
    03ec4c65 cc              ??         CCh
    03ec4c66 cc              ??         CCh
    03ec4c67 cc              ??         CCh
    03ec4c68 cc              ??         CCh
    03ec4c69 cc              ??         CCh
    03ec4c6a cc              ??         CCh
    03ec4c6b cc              ??         CCh
    03ec4c6c cc              ??         CCh
    03ec4c6d cc              ??         CCh
    03ec4c6e cc              ??         CCh
    03ec4c6f cc              ??         C

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_00767b50()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_00767b50                                    XREF[20]:    eh_163130:00165ea9(c), 
                                                                                      eh_1a05b0:001a847b(c), 
                                                                                      eh_1a05b0:001a84a4(c), 
                                                                                      eh_2e5c10:002e6613(c), 
                                                                                      FUN_003e79a0:003e7bb9(c), 
                                                                                      FUN_00801a60:00801a8d(c), 
                                                                                      FUN_00cb55d0:00cb6756(c), 
                                                                                      FUN_02a74d80:02a74f03(c), 
                                                                                      FUN_02a74d80:02a74f2d(c), 
                                                                                      FUN_02a74d80:02a74f58(c), 
                                                                                      FUN_02a74d80:02a74f60(c), 
                                                                                      FUN_02a75490:02a757f0(c), 
                                                                                      FUN_02a75490:02a75940(c), 
                                                                                      FUN_02a75490:02a7595a(c), 
                                                                                      FUN_02a75490:02a75bb3(c), 
                                                                                      FUN_02a75490:02a75ce7(c), 
                                                                                      FUN_02a75490:02a75d31(c), 
                                                                                      FUN_02ac8c50:02ac90ef(c), 
                                                                                      FUN_02b64d80:02b64f82(c), 
                                                                                      FUN_02f40f30:02f40f53(c), [more]
    00767b50 53              PUSH       RBX
    00767b51 48 8b 35        MOV        RSI,qword ptr [DAT_06c12278]
             20 a7 4a 06
    00767b58 48 8b 3d        MOV        RDI,qword ptr [DAT_06c12270]
             11 a7 4a 06
    00767b5f 48 89 f0        MOV        RAX,RSI
    00767b62 c4 e3 fb        RORX       RBX,RDI,0x9
             f0 df 09
    00767b68 48 89 f2        MOV        RDX,RSI
    00767b6b 48 31 f8        XOR        RAX,RDI
    00767b6e 48 31 c3        XOR        RBX,RAX
    00767b71 c4 e3 fb        RORX       RCX,RAX,0x1c
             f0 c8 1c
    00767b77 48 c1 e0 0e     SHL        RAX,0xe
    00767b7b 48 31 c3        XOR        RBX,RAX
    00767b7e 48 89 f8        MOV        RAX,RDI
    00767b81 f0 48 0f        CMPXCHG1   xmmword ptr [DAT_06c12270]
             c7 0d e6 
             a6 4a 06
    00767b8a 0f 94 c1        SETZ       CL
                         LAB_00767b8d                                    XREF[1]:     00767bc9(j)  
    00767b8d f6 c1 01        TEST       CL,0x1
    00767b90 74 06           JZ         LAB_00767b98
    00767b92 01 fe           ADD        ESI,EDI
    00767b94 89 f0           MOV        EAX,ESI
    00767b96 5b              POP        RBX
    00767b97 c3              RET
                         LAB_00767b98                                    XREF[1]:     00767b90(j)  
    00767b98 48 89 c7        MOV        RDI,RAX
    00767b9b 48 89 d0        MOV        RAX,RDX
    00767b9e 48 89 d6        MOV        RSI,RDX
    00767ba1 48 31 f8        XOR        RAX,RDI
    00767ba4 c4 e3 fb        RORX       RBX,RDI,0x9
             f0 df 09
    00767baa 48 31 c3        XOR        RBX,RAX
    00767bad c4 e3 fb        RORX       RCX,RAX,0x1c
             f0 c8 1c
    00767bb3 48 c1 e0 0e     SHL        RAX,0xe
    00767bb7 48 31 c3        XOR        RBX,RAX
    00767bba 48 89 f8        MOV        RAX,RDI
    00767bbd f0 48 0f        CMPXCHG1   xmmword ptr [DAT_06c12270]
             c7 0d aa 
             a6 4a 06
    00767bc6 0f 94 c1        SETZ       CL
    00767bc9 eb c2           JMP        LAB_00767b8d
    00767bcb cc              ??         CCh
    00767bcc cc              ??         CCh
    00767bcd cc              ??         CCh
    00767bce cc              ??         CCh
    00767bcf cc              ??         CCh
    00767bd0 55              ??         55h    U
    00767bd1 48              ??         48h    H
    00767bd2 89              ??         89h
    00767bd3 e5              ??         E5h
    00767bd4 41              ??         41h    A
    00767bd5 56              ??         56h    V
    00767bd6 53              ??         53h    S
    00767bd7 8b              ??         8Bh
    00767bd8 05              ??         05h
    00767bd9 f3              ??         F3h
    00767bda ad              ??         ADh
    00767bdb cf              ??         CFh
    00767bdc 04              ??         04h
    00767bdd 48              ??         48h    H
    00767bde 8b              ??         8Bh
    00767bdf 0d              ??         0Dh
    00767be0 e4              ??         E4h
    00767be1 ad              ??         ADh
    00767be2 cf              ??         CFh
    00767be3 04              ??         04h
    00767be4 48              ??         48h    H
    00767be5 89              ??         89h
    00767be6 fb              ??         FBh
    00767be7 41              ??         41h    A
    00767be8 be              ??         BEh
    00767be9 14              ??         14h
    00767bea 00              ??         00h
    00767beb 00              ??         00h
    00767bec 00              ??         00h
    00767bed 89              ??         89h
    00767bee 47              ??         47h    G
    00767bef 0c              ??         0Ch
    00767bf0 48              ??         48h    H
    00767bf1 89              ??         89h
    00767bf2 4f              ??         4Fh    O
    00767bf3 04              ??         04h
    00767bf4 e8              ??         E8h
    00767bf5 57              ??         57h    W
    00767bf6 ff              ??         FFh
    00767bf7 ff              ??         FFh
    00767bf8 ff              ??         FFh
    00767bf9 c1              ??         C1h
    00767bfa e8              ??         E8h
    00767bfb 09              ??         09h
    00767bfc c5              ??         C5h
    00767bfd f0              ??         F0h
    00767bfe 57              ??         57h    W
    00767bff c9              ??         C9h
    00767c00 0d              ??         0Dh
    00767c01 00              ??         00h
    00767c02 00              ??         00h
    00767c03 80              ??         80h
    00767c04 3f              ??         3Fh    ?
    00767c05 c5              ??         C5h
    00767c06 f9              ??         F9h
    00767c07 6e              ??         6Eh    n
    00767c08 c0              ??         C0h
    00767c09 c5              ??         C5h
    00767c0a fa              ??         FAh
    00767c0b 58              ??         58h    X
    00767c0c 05              ??         05h
    00767c0d f3              ??         F3h
    00767c0e df              ??         DFh
    00767c0f f8              ??         F8h
    00767c10 03              ??         03h
    00767c11 c5              ??         C5h
    00767c12 fa              ??         FAh
    00767c13 58              ??         58h    X
    00767c14 c1              ??         C1h
    00767c15 c4              ??         C4h
    00767c16 a1              ??         A1h
    00767c17 7a              ??         7Ah    z
    00767c18 11              ??         11h
    00767c19 44              ??         44h    D
    00767c1a 33              ??         33h    3
    00767c1b fc              ??         FCh
    00767c1c 42              ??         42h    B
    00767c1d c6              ??         C6h
    00767c1e 04              ??         04h
    00767c1f 33              ??         33h    3
    00767c20 00              ??         00h
    00767c21 49              ??         49h    I
    00767c22 83              ??         83h
    00767c23 c6              ??         C6h
    00767c24 08              ??         08h
    00767c25 49              ??         49h    I
    00767c26 81              ??         81h
    00767c27 fe              ??         FEh
    00767c28 b4              ??         B4h
    00767c29 00              ??         00h
    00767c2a 00              ??         00h
    00767c2b 00              ??         00h
    00767c2c 75              ??         75h    u
    00767c2d c6              ??         C6h
    00767c2e 48              ??         48h    H
    00767c2f c7              ??         C7h                                              ?  ->  00bc83c7
    00767c30 83              ??         83h                                              ?  ->  0000bc83
    00767c31 bc              ??         BCh                                              ?  ->  000000bc
    00767c32 00              ??         00h
    00767c33 00              ??         00h
    00767c34 00              ??         00h
    00767c35 00              ??         00h
    00767c36 00              ??         00h
    00767c37 00              ??         00h
    00767c38 00              ??         00h
    00767c39 c7              ??         C7h                                              ?  ->  00c483c7
    00767c3a 83              ??         83h                                              ?  ->  0000c483
    00767c3b c4              ??         C4h                                              ?  ->  000000c4
    00767c3c 00              ??         00h
    00767c3d 00              ??         00h
    00767c3e 00              ??         00h
    00767c3f 00              ??         00h
    00767c40 00              ??         00h
    00767c41 00              ??         00h
    00767c42 00              ??         00h
    00767c43 5b              ??         5Bh    [
    00767c44 41              ??         41h    A
    00767c45 5e              ??         5Eh    ^
    00767c46 5d              ??         5Dh    ]
    00767c47 c3              ??         C3h
    00767c48 cc              ??         CCh
    00767c49 cc              ??         CCh
    00767c4a cc              ??         CCh
    00767c4b cc              ??         CCh
    00767c4c cc              ??         CCh
    00767c4d cc              ??         CCh
    00767c4e cc              ??         CCh
    00767c4f cc              ??         CCh
    00767c50 55              ??         55h    U
    00767c51 48              ??         48h    H
    00767c52 89              ??         89h
    00767c53 e5              ??         E5h
    00767c54 53              ??         53h    S
    00767c55 50              ??         50h    P
    00767c56 48              ??         48h    H
    00767c57 89              ??         89h
    00767c58 fb              ??         FBh
    00767c59 e8              ??         E8h
    00767c5a f2              ??         F2h
    00767c5b fe              ??         FEh
    00767c5c ff              ??         FFh
    00767c5d ff              ??         FFh
    00767c5e 88              ??         88h
    00767c5f 03              ??         03h
    00767c60 e8              ??         E8h
    00767c61 eb              ??         EBh
    00767c62 fe              ??         FEh
    00767c63 ff              ??         FFh
    00767c64 ff              ??         FFh
    00767c65 88              ??         88h
    00767c66 43              ??         43h    C
    00767c67 01              ??         01h
    00767c68 e8              ??         E8h
    00767c69 e3              ??         E3h
    00767c6a fe              ??         FEh
    00767c6b ff              ??         FFh
    00767c6c ff              ??         FFh
    00767c6d 88              ??         88h
    00767c6e 43              ??         43h    C
    00767c6f 02              ??         02h
    00767c70 e8              ??         E8h
    00767c71 db              ??         DBh
    00767c72 fe              ??         FEh
    00767c73 ff              ??         FFh
    00767c74 ff              ??         FFh
    00767c75 88              ??         88h
    00767c76 43              ??         43h    C
    00767c77 03              ??         03h
    00767c78 e8              ??         E8h
    00767c79 d3              ??         D3h
    00767c7a fe              ??         FEh
    00767c7b ff              ??         FFh
    00767c7c ff              ??         FFh
    00767c7d 88              ??         88h
    00767c7e 43              ??         43h    C
    00767c7f 04              ??         04h
    00767c80 e8              ??         E8h
    00767c81 cb              ??         CBh
    00767c82 fe              ??         FEh
    00767c83 ff              ??         FFh
    00767c84 ff              ??         FFh
    00767c85 88              ??         88h
    00767c86 43              ??         43h    C
    00767c87 05              ??         05h
    00767c88 e8              ??         E8h
    00767c89 c3              ??         C3h
    00767c8a fe              ??         FEh
    00767c8b ff              ??         FFh
    00767c8c ff              ??         FFh
    00767c8d 88              ??         88h
    00767c8e 43              ??         43h    C
    00767c8f 06              ??         06h
    00767c90 e8              ??         E8h
    00767c91 bb              ??         BBh
    00767c92 fe              ??         FEh
    00767c93 ff              ??         FFh
    00767c94 ff              ??         FFh
    00767c95 88              ??         88h
    00767c96 43              ??         43h    C
    00767c97 07              ??         07h
    00767c98 e8              ??         E8h
    00767c99 b3              ??         B3h
    00767c9a fe              ??         FEh
    00767c9b ff              ??         FFh
    00767c9c ff              ??         FFh
    00767c9d 88              ??         88h
    00767c9e 43              ??         43h    C
    00767c9f 08              ??         08h
    00767ca0 e8              ??         E8h
    00767ca1 ab              ??         ABh
    00767ca2 fe              ??         FEh
    00767ca3 ff              ??         FFh
    00767ca4 ff              ??         FFh
    00767ca5 88              ??         88h
    00767ca6 43              ??         43h    C
    00767ca7 09              ??         09h
    00767ca8 e8              ??         E8h
    00767ca9 a3              ??         A3h
    00767caa fe              ??         FEh
    00767cab ff              ??         FFh
    00767cac ff              ??         FFh
    00767cad 88              ??         88h
    00767cae 43              ??         43h    C
    00767caf 0a              ??         0Ah
    00767cb0 e8              ??         E8h
    00767cb1 9b              ??         9Bh
    00767cb2 fe              ??         FEh
    00767cb3 ff              ??         FFh
    00767cb4 ff              ??         FFh
    00767cb5 88              ??         88h
    00767cb6 43              ??         43h    C
    00767cb7 0b              ??         0Bh
    00767cb8 e8              ??         E8h
    00767cb9 93              ??         93h
    00767cba fe              ??         FEh
    00767cbb ff              ??         FFh
    00767cbc ff              ??         FFh
    00767cbd 88              ??         88h
    00767cbe 43              ??         43h    C
    00767cbf 0c              ??         0Ch
    00767cc0 e8              ??         E8h
    00767cc1 8b              ??         8Bh
    00767cc2 fe              ??         FEh
    00767cc3 ff              ??         FFh
    00767cc4 ff              ??         FFh
    00767cc5 88              ??         88h
    00767cc6 43              ??         43h    C
    00767cc7 0d              ??         0Dh
    00767cc8 e8              ??         E8h
    00767cc9 83              ??         83h
    00767cca fe              ??         FEh
    00767ccb ff              ??         FFh
    00767ccc ff              ??         FFh
    00767ccd 88              ??         88h
    00767cce 43              ??         43h    C
    00767ccf 0e              ??         0Eh
    00767cd0 e8              ??         E8h
    00767cd1 7b              ??         7Bh    {
    00767cd2 fe              ??         FEh
    00767cd3 ff              ??         FFh
    00767cd4 ff              ??         FFh
    00767cd5 48              ??         48h    H
    00767cd6 89              ??         89h
    00767cd7 df              ??         DFh
    00767cd8 88              ??         88h
    00767cd9 43              ??         43h    C
    00767cda 0f              ??         0Fh
    00767cdb e8              ??         E8h
    00767cdc 90              ??         90h
    00767cdd 04              ??         04h
    00767cde 42              ??         42h    B
    00767cdf 00              ??         00h
    00767ce0 48              ??         48h    H
    00767ce1 89              ??         89h
    00767ce2 d8              ??         D8h
    00767ce3 48              ??         48h    H
    00767ce4 83              ??         83h
    00767ce5 c4              ??         C4h
    00767ce6 08              ??         08h
    00767ce7 5b              ??         5Bh    [
    00767ce8 5d              ??         5Dh    ]
    00767ce9 c3              ??         C3h
    00767cea cc              ??         CCh
    00767ceb cc              ??         CCh
    00767cec cc              ??         CCh
    00767ced cc              ??         CCh
    00767cee cc              ??         CCh
    00767cef cc              ??         CCh

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_03ebd7a0()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[2]:     03ebd7d2(W), 
                                                                                               03ebd917(R)  
         undefined         Stack[-0xa00   local_a00                               XREF[2]:     03ebd868(*), 
                                                                                               03ebd88a(*)  
         undefined4        Stack[-0xa04   local_a04                               XREF[2]:     03ebd87c(*), 
                                                                                               03ebd891(*)  
                         FUN_03ebd7a0                                    XREF[1]:     FUN_017b5520:017b56c0(c)  
    03ebd7a0 55              PUSH       RBP
    03ebd7a1 48 89 e5        MOV        RBP,RSP
    03ebd7a4 41 57           PUSH       R15
    03ebd7a6 41 56           PUSH       R14
    03ebd7a8 41 55           PUSH       R13
    03ebd7aa 41 54           PUSH       R12
    03ebd7ac 53              PUSH       RBX
    03ebd7ad 48 81 ec        SUB        RSP,0x9d8
             d8 09 00 00
    03ebd7b4 48 8b 05        MOV        RAX,qword ptr [->__stack_chk_guard]              = 07d7faf8
             d5 16 72 01
    03ebd7bb 48 b9 48        MOV        RCX,-0x3038af9b8
             06 75 fc 
             fc ff ff ff
    03ebd7c5 4c 8d 66 f8     LEA        R12,[RSI + -0x8]
    03ebd7c9 48 89 f3        MOV        RBX,RSI
    03ebd7cc 49 89 fe        MOV        R14,RDI
    03ebd7cf 48 8b 00        MOV        RAX=>__stack_chk_guard,qword ptr [RAX]           = ??
    03ebd7d2 48 89 45 d0     MOV        qword ptr [RBP + local_38],RAX
    03ebd7d6 b8 6e be        MOV        EAX,0xc0e2be6e
             e2 c0
    03ebd7db 48 0f af c6     IMUL       RAX,RSI
    03ebd7df 48 01 c1        ADD        RCX,RAX
    03ebd7e2 8a 07           MOV        AL,byte ptr [RDI]
    03ebd7e4 48 c1 f9 20     SAR        RCX,0x20
    03ebd7e8 8a 14 0f        MOV        DL,byte ptr [RDI + RCX*0x1]
    03ebd7eb 88 17           MOV        byte ptr [RDI],DL
    03ebd7ed 88 04 0f        MOV        byte ptr [RDI + RCX*0x1],AL
    03ebd7f0 8a 47 01        MOV        AL,byte ptr [RDI + 0x1]
    03ebd7f3 8a 54 0f 01     MOV        DL,byte ptr [RDI + RCX*0x1 + 0x1]
    03ebd7f7 88 57 01        MOV        byte ptr [RDI + 0x1],DL
    03ebd7fa 88 44 0f 01     MOV        byte ptr [RDI + RCX*0x1 + 0x1],AL
    03ebd7fe 8a 47 02        MOV        AL,byte ptr [RDI + 0x2]
    03ebd801 8a 54 0f 02     MOV        DL,byte ptr [RDI + RCX*0x1 + 0x2]
    03ebd805 88 57 02        MOV        byte ptr [RDI + 0x2],DL
    03ebd808 88 44 0f 02     MOV        byte ptr [RDI + RCX*0x1 + 0x2],AL
    03ebd80c 8a 47 03        MOV        AL,byte ptr [RDI + 0x3]
    03ebd80f 8a 54 0f 03     MOV        DL,byte ptr [RDI + RCX*0x1 + 0x3]
    03ebd813 88 57 03        MOV        byte ptr [RDI + 0x3],DL
    03ebd816 88 44 0f 03     MOV        byte ptr [RDI + RCX*0x1 + 0x3],AL
    03ebd81a 49 69 c4        IMUL       RAX,R12,0x4339334b
             4b 33 39 43
    03ebd821 8a 4f 04        MOV        CL,byte ptr [RDI + 0x4]
    03ebd824 48 c1 f8 20     SAR        RAX,0x20
    03ebd828 8a 54 07 04     MOV        DL,byte ptr [RDI + RAX*0x1 + 0x4]
    03ebd82c 88 57 04        MOV        byte ptr [RDI + 0x4],DL
    03ebd82f 88 4c 07 04     MOV        byte ptr [RDI + RAX*0x1 + 0x4],CL
    03ebd833 8a 4f 05        MOV        CL,byte ptr [RDI + 0x5]
    03ebd836 8a 54 07 05     MOV        DL,byte ptr [RDI + RAX*0x1 + 0x5]
    03ebd83a 88 57 05        MOV        byte ptr [RDI + 0x5],DL
    03ebd83d 88 4c 07 05     MOV        byte ptr [RDI + RAX*0x1 + 0x5],CL
    03ebd841 8a 4f 06        MOV        CL,byte ptr [RDI + 0x6]
    03ebd844 8a 54 07 06     MOV        DL,byte ptr [RDI + RAX*0x1 + 0x6]
    03ebd848 88 57 06        MOV        byte ptr [RDI + 0x6],DL
    03ebd84b 88 4c 07 06     MOV        byte ptr [RDI + RAX*0x1 + 0x6],CL
    03ebd84f 8a 4f 07        MOV        CL,byte ptr [RDI + 0x7]
    03ebd852 8a 54 07 07     MOV        DL,byte ptr [RDI + RAX*0x1 + 0x7]
    03ebd856 88 57 07        MOV        byte ptr [RDI + 0x7],DL
    03ebd859 88 4c 07 07     MOV        byte ptr [RDI + RAX*0x1 + 0x7],CL
    03ebd85d 44 0f 38        MOVBE      R13D,dword ptr [RDI + 0x4]
             f0 6f 04
    03ebd863 44 0f 38        MOVBE      R15D,dword ptr [RDI]
             f0 3f
    03ebd868 48 8d bd        LEA        RDI=>local_a00,[RBP + -0x9f8]
             08 f6 ff ff
    03ebd86f 43 8d 74        LEA        ESI,[R13 + R15*0x1]
             3d 00
    03ebd874 e8 97 6d        CALL       FUN_00804610                                     undefined FUN_00804610()
             94 fc
    03ebd879 45 31 fd        XOR        R13D,R15D
    03ebd87c 48 8d 8d        LEA        RCX=>local_a04,[RBP + -0x9fc]
             04 f6 ff ff
    03ebd883 49 8d 7e 08     LEA        RDI,[R14 + 0x8]
    03ebd887 4c 89 e6        MOV        RSI,R12
    03ebd88a 48 8d 95        LEA        RDX=>local_a00,[RBP + -0x9f8]
             08 f6 ff ff
    03ebd891 44 89 29        MOV        dword ptr [RCX]=>local_a04,R13D
    03ebd894 e8 a7 00        CALL       FUN_03ebd940                                     undefined FUN_03ebd940()
             00 00
    03ebd899 b9 00 00        MOV        ECX,0x39300000
             30 39
    03ebd89e 41 33 4e 04     XOR        ECX,dword ptr [R14 + 0x4]
    03ebd8a2 b8 ff ff        MOV        EAX,0xffffffff
             ff ff
    03ebd8a7 ba ff ff        MOV        EDX,0xffffffff
             ff ff
    03ebd8ac 41 89 4e 04     MOV        dword ptr [R14 + 0x4],ECX
    03ebd8b0 4d 85 e4        TEST       R12,R12
    03ebd8b3 74 26           JZ         LAB_03ebd8db
    03ebd8b5 be 08 00        MOV        ESI,0x8
             00 00
    03ebd8ba 48 8d 3d        LEA        RDI,[DAT_0506c330]
             6f ea 1a 01
                         LAB_03ebd8c1                                    XREF[1]:     03ebd8d9(j)  
    03ebd8c1 45 8a 04 36     MOV        R8B,byte ptr [R14 + RSI*0x1]
    03ebd8c5 48 ff c6        INC        RSI
    03ebd8c8 41 30 d0        XOR        R8B,DL
    03ebd8cb c1 ea 08        SHR        EDX,0x8
    03ebd8ce 45 0f b6 c0     MOVZX      R8D,R8B
    03ebd8d2 42 33 14 87     XOR        EDX,dword ptr [RDI + R8*0x4]=>DAT_0506c330
    03ebd8d6 48 39 f3        CMP        RBX,RSI
    03ebd8d9 75 e6           JNZ        LAB_03ebd8c1
                         LAB_03ebd8db                                    XREF[1]:     03ebd8b3(j)  
    03ebd8db 89 cf           MOV        EDI,ECX
    03ebd8dd 89 ce           MOV        ESI,ECX
    03ebd8df 41 89 c8        MOV        R8D,ECX
    03ebd8e2 c1 e1 18        SHL        ECX,0x18
    03ebd8e5 c1 ef 08        SHR        EDI,0x8
    03ebd8e8 41 c1 e0 08     SHL        R8D,0x8
    03ebd8ec c1 ee 18        SHR        ESI,0x18
    03ebd8ef 81 e7 00        AND        EDI,0xff00
             ff 00 00
    03ebd8f5 41 81 e0        AND        R8D,0xff0000
             00 00 ff 00
    03ebd8fc 09 f7           OR         EDI,ESI
    03ebd8fe 41 09 f8        OR         R8D,EDI
    03ebd901 44 09 c1        OR         ECX,R8D
    03ebd904 31 d1           XOR        ECX,EDX
    03ebd906 48 8b 15        MOV        RDX=>__stack_chk_guard,qword ptr [->__stack_ch   = ??
             83 15 72 01                                                                 = 07d7faf8
    03ebd90d 83 f9 ff        CMP        ECX,-0x1
    03ebd910 41 0f 44 c4     CMOVZ      EAX,R12D
    03ebd914 48 8b 0a        MOV        RCX,qword ptr [RDX]=>__stack_chk_guard           = ??
    03ebd917 48 3b 4d d0     CMP        RCX,qword ptr [RBP + local_38]
    03ebd91b 75 12           JNZ        LAB_03ebd92f
    03ebd91d 48 81 c4        ADD        RSP,0x9d8
             d8 09 00 00
    03ebd924 5b              POP        RBX
    03ebd925 41 5c           POP        R12
    03ebd927 41 5d           POP        R13
    03ebd929 41 5e           POP        R14
    03ebd92b 41 5f           POP        R15
    03ebd92d 5d              POP        RBP
    03ebd92e c3              RET
                         LAB_03ebd92f                                    XREF[1]:     03ebd91b(j)  
    03ebd92f e8 2c fb        CALL       __stack_chk_fail                                 undefined __stack_chk_fail()
             04 00
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
    03ebd934 0f              ??         0Fh
    03ebd935 0b              ??         0Bh
    03ebd936 cc              ??         CCh
    03ebd937 cc              ??         CCh
    03ebd938 cc              ??         CCh
    03ebd939 cc              ??         CCh
    03ebd93a cc              ??         CCh
    03ebd93b cc              ??         CCh
    03ebd93c cc              ??         CCh
    03ebd93d cc              ??         CCh
    03ebd93e cc              ??         CCh
    03ebd93f cc              ??         CCh

](streamdown:incomplete-link)

Dr.Binary

This paste settles everything — including two genuinely new findings. Decoding:

FUN_03ec4c00 — A1 confirmed, with a quirk. Stock MT19937 temper (>>11, <<7 & 0x9D2C5680, <<15 & 0xEFC60000, >>18), threshold 0x270=624, twist delegated to FUN_03ec4c70. But note: init sets idx=1, and next() reads-then-increments — so the first 623 outputs are mt[1..623] of the freshly seeded state, skipping mt[0] entirely. That changes the keystream, so it must go in the implementation.

FUN_00767b50 — the nonce is not a timestamp. This is xoroshiro128+ (Blackman/Vigna v1.0): state s0,s1 at DAT_06c12270/78, output = low32(s0+s1), update rotl(s0,55) ^ (s0^s1) ^ ((s0^s1)<<14), rotl(s1,36) — and it's thread-safe via lock cmpxchg16b with a retry loop. So the header nonce is a fresh PRNG draw per encryption.

FUN_03ebd7a0 — decrypt header path, fully confirmed:

  • Unswaps nonce first, using total length: (total·0xC0E2BE6E − 0x3038AF9B8)>>32. The addend identity is elegant: 0x3038AF9B8 = 4·0xC0E2BE6E, so ((n+8)m − 4m)>>32 = ((n+4)m)>>32 — identical to encrypt's (n·m + 4m)>>32. ✓
  • Unswaps CRC with payload length, MOVBE reads, mt_init(crc+nonce), counter crc^nonce, transform FUN_03ebd940, then CRC check — which proves the CRC formula exactly: raw CRC-32 (init 0xFFFFFFFF, no final xor) compared against crc_field ^ 0x3039 → crc = crc32_std ^ 0x3039. ✅ Returns payload length n on success, −1 on failure.

New finding — the game can't round-trip its own small blobs. Decrypt replays the byte swaps in ascending order (same as encrypt). That's only a valid inverse when each group's transposition pairs are disjoint. off_crc ∈ {1,2,3} for n = 4–15 and off_time = 3 for n = 1 → for those sizes the game's own CRC check fails and it returns −1. Presumably payloads that small never occur in production. I'll mimic the game byte-exactly rather than "fix" it:

edit_file
edit_file
edit_file
run_sandbox
edit_file

gt7_blob_crypto.py updated and green. Status after this paste:

Confirmed from the binary (was assumption, now fact):

  • ✅ C1 — MT19937 temper/twist stock, but with the idx=1 init quirk: first 623 outputs skip mt[0]. Implemented — this changes the keystream, so it was essential to catch.
  • ✅ C2 — crc = crc32_std(payload) ^ 0x3039, proven by decrypt's own check (raw CRC-32 vs crc_field ^ 0x3039, bswap folded into the compare constants: 0x39300000 big-endian ↔ 0x3039).
  • ✅ C3 — nonce = xoroshiro128+ global PRNG output (low32(s0+s1), rotl 55/<<14/rotl 36, lock cmpxchg16b thread-safety), not a timestamp. Blobs carry a fresh random per encryption — irrelevant for decryption, convenient for forging.

Bonus finding: the addend identity 0x3038AF9B8 = 4·0xC0E2BE6E reconciles encrypt's + with decrypt's − across the total-vs-payload length difference — a nice confirmation that both sides were read correctly.

New quirk documented and mimicked: decrypt replays the concealment swaps in ascending order, which is only self-inverse while swapped pairs stay disjoint — so the game itself cannot round-trip blobs with n = 1 or 4 ≤ n ≤ 15 (its CRC check fails, returns −1). The selftest now asserts game-consistent sizes round-trip and that n=4 fails exactly like the binary would.

Remaining unknowns (all low-risk, one real-blob test settles them):

  • A1 — FUN_03ec4c70 twist is standard (near-certain; paste if you want certainty)
  • A2 — the two nibble LUTs are rev4[n]<<4 / rev4[n] (dump 16 bytes each at 0x047023e0 / 0x046fcde0)
  • A3 — FUN_03ebd940 is (c + k) ^ t (algebraically forced by encrypt's (p ^ t) − k)

Decisive validation: grab any real GT7 blob this module produces (save chunk, network buffer — whatever actually flows through "encrypt"/"decrypt") and run python3 gt7_blob_crypto.py decrypt <file>. A CRC match with sensible output proves A1–A3 in one shot; a mismatch would point at exactly which assumption broke (wrong table → garbage but deterministic; wrong twist → garbage from word ~623 onward, etc.).

If you want, paste FUN_03ec4c70 + the 32 table bytes and I'll tick off A1/A2 for a fully assumption-free implementation.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_03ec4c70()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_03ec4c70                                    XREF[1]:     FUN_03ec4c00:03ec4c4c(c)  
    03ec4c70 8b 17           MOV        EDX,dword ptr [RDI]
    03ec4c72 48 8d 05        LEA        RAX,[DAT_04707690]
             17 2a 84 00
    03ec4c79 31 c9           XOR        ECX,ECX
                         LAB_03ec4c7b                                    XREF[1]:     03ec4cb4(j)  
    03ec4c7b 8b 74 8f 04     MOV        ESI,dword ptr [RDI + RCX*0x4 + 0x4]
    03ec4c7f 81 e2 00        AND        EDX,0x80000000
             00 00 80
    03ec4c85 41 89 f0        MOV        R8D,ESI
    03ec4c88 41 81 e0        AND        R8D,0x7ffffffe
             fe ff ff 7f
    03ec4c8f 41 09 d0        OR         R8D,EDX
    03ec4c92 89 f2           MOV        EDX,ESI
    03ec4c94 83 e6 01        AND        ESI,0x1
    03ec4c97 8b 34 b0        MOV        ESI,dword ptr [RAX + RSI*0x4]=>DAT_04707690
    03ec4c9a 33 b4 8f        XOR        ESI,dword ptr [RDI + RCX*0x4 + 0x634]
             34 06 00 00
    03ec4ca1 41 d1 e8        SHR        R8D,0x1
    03ec4ca4 44 31 c6        XOR        ESI,R8D
    03ec4ca7 89 34 8f        MOV        dword ptr [RDI + RCX*0x4],ESI
    03ec4caa 48 ff c1        INC        RCX
    03ec4cad 48 81 f9        CMP        RCX,0xe3
             e3 00 00 00
    03ec4cb4 75 c5           JNZ        LAB_03ec4c7b
    03ec4cb6 c4 e2 79        VPBROADC   XMM2,dword ptr [RDI + 0x38c]
             58 97 8c 
             03 00 00
    03ec4cbf c4 e2 79        VPBROADC   XMM0,dword ptr [DAT_046f6310]                    = 80000000h
             58 05 48 
             16 83 00
    03ec4cc8 c4 e2 79        VPBROADC   XMM1,dword ptr [DAT_046f5470]                    = 7FFFFFFEh
             58 0d 9f 
             07 83 00
    03ec4cd1 b9 e7 00        MOV        ECX,0xe7
             00 00
                         LAB_03ec4cd6                                    XREF[1]:     03ec4d5d(j)  
    03ec4cd6 8b 74 8f fc     MOV        ESI,dword ptr [RDI + RCX*0x4 + -0x4]
    03ec4cda 48 8b 54        MOV        RDX,qword ptr [RDI + RCX*0x4 + -0xc]
             8f f4
    03ec4cdf 44 8b 04 8f     MOV        R8D,dword ptr [RDI + RCX*0x4]
    03ec4ce3 c4 e1 f9        VMOVQ      XMM3,RDX
             6e da
    03ec4ce8 41 89 d1        MOV        R9D,EDX
    03ec4ceb 48 c1 ea 20     SHR        RDX,0x20
    03ec4cef 41 83 e1 01     AND        R9D,0x1
    03ec4cf3 83 e2 01        AND        EDX,0x1
    03ec4cf6 c4 e3 61        VPINSRD    XMM3,XMM3,ESI,0x2
             22 de 02
    03ec4cfc 83 e6 01        AND        ESI,0x1
    03ec4cff c4 e3 61        VPALIGNR   XMM2,XMM3,XMM2,0xc
             0f d2 0c
    03ec4d05 c4 c3 61        VPINSRD    XMM3,XMM3,R8D,0x3
             22 d8 03
    03ec4d0b 41 83 e0 01     AND        R8D,0x1
    03ec4d0f c5 e9 db d0     VPAND      XMM2,XMM2,XMM0
    03ec4d13 c5 e1 db e1     VPAND      XMM4,XMM3,XMM1
    03ec4d17 c5 d9 eb d2     VPOR       XMM2,XMM4,XMM2
    03ec4d1b c4 a1 79        VMOVD      XMM4,dword ptr [RAX + R9*0x4]=>DAT_04707690
             6e 24 88
    03ec4d21 c5 e9 72        VPSRLD     XMM2,XMM2,0x1
             d2 01
    03ec4d26 c4 e3 59        VPINSRD    XMM4,XMM4,dword ptr [RAX + RDX*0x4]=>DAT_04707
             22 24 90 01
    03ec4d2d c4 e3 59        VPINSRD    XMM4,XMM4,dword ptr [RAX + RSI*0x4]=>DAT_04707
             22 24 b0 02
    03ec4d34 c4 a3 59        VPINSRD    XMM4,XMM4,dword ptr [RAX + R8*0x4]=>DAT_047076
             22 24 80 03
    03ec4d3b c5 d9 ef        VPXOR      XMM4,XMM4,xmmword ptr [RDI + RCX*0x4 + -0x39c]
             a4 8f 64 
             fc ff ff
    03ec4d44 c5 d9 ef d2     VPXOR      XMM2,XMM4,XMM2
    03ec4d48 c5 fa 7f        VMOVDQU    xmmword ptr [RDI + RCX*0x4 + -0x10],XMM2
             54 8f f0
    03ec4d4e 48 83 c1 04     ADD        RCX,0x4
    03ec4d52 c5 f9 6f d3     VMOVDQA    XMM2,XMM3
    03ec4d56 48 81 f9        CMP        RCX,0x273
             73 02 00 00
    03ec4d5d 0f 85 73        JNZ        LAB_03ec4cd6
             ff ff ff
    03ec4d63 8b 17           MOV        EDX,dword ptr [RDI]
    03ec4d65 b9 00 00        MOV        ECX,0x80000000
             00 80
    03ec4d6a 23 8f bc        AND        ECX,dword ptr [RDI + 0x9bc]
             09 00 00
    03ec4d70 89 d6           MOV        ESI,EDX
    03ec4d72 83 e2 01        AND        EDX,0x1
    03ec4d75 8b 04 90        MOV        EAX=>DAT_04707690,dword ptr [RAX + RDX*0x4]
    03ec4d78 33 87 30        XOR        EAX,dword ptr [RDI + eh_630]
             06 00 00
    03ec4d7e 81 e6 fe        AND        ESI,0x7ffffffe
             ff ff 7f
    03ec4d84 09 ce           OR         ESI,ECX
    03ec4d86 d1 ee           SHR        ESI,0x1
    03ec4d88 31 f0           XOR        EAX,ESI
    03ec4d8a 89 87 bc        MOV        dword ptr [RDI + 0x9bc],EAX
             09 00 00
    03ec4d90 c7 87 c0        MOV        dword ptr [RDI + 0x9c0],0x0
             09 00 00 
             00 00 00 00
    03ec4d9a c3              RET
    03ec4d9b cc              ??         CCh
    03ec4d9c cc              ??         CCh
    03ec4d9d cc              ??         CCh
    03ec4d9e cc              ??         CCh
    03ec4d9f cc              ??         CCh
Dr.Binary

FUN_03ec4c70 is the twist — and it's textbook MT19937, implemented in three phases:

Phase 1 — scalar, i = 0…226 (0xE3 iterations):

y = (mt[i] & 0x80000000) | (mt[i+1] & 0x7FFFFFFE);
mt[i] = mt[i+397] ^ (y >> 1) ^ mag01[mt[i+1] & 1];   // mag01 table @ DAT_04707690

The odd-looking 0x7FFFFFFE mask is a compiler optimization, not a deviation: bit 0 is shifted out by >>1 anyway, and mag01 is indexed from the unmasked bit 0 — so it's algebraically identical to the standard 0x7FFFFFFF form. mt[i+0x634/4] = mt[i+397] ✓.

Phase 2 — vectorized, i = 227…622 (99 iterations × 4 lanes): the same recurrence, and the wrap-around is handled exactly like the reference implementation — mt[(i+397) mod 624] becomes mt[i−227], i.e. it reads the freshly written prefix (the XOR against [RDI + RCX*4 − 0x39C] = index RCX−231 = new mt[i−227]). The VPALIGNR chaining carries each group's {mt[i-4..i-1]} upper-bit words into the next iteration, and the per-lane &1 → mag01[] lookups replicate the scalar structure. I traced the lane alignment against the required {mt[j]&UPPER | mt[j+1]&LOWER} and it matches lane-for-lane.

Phase 3 — tail, i = 623: writes mt[623] = new_mt[396] ^ ... — and (623+397) mod 624 = 396 ✓ — then sets ctx[0x9C0] = 0, confirming the index resets to 0 after a twist, exactly as my Python _generate() does.

So A1 is confirmed. No code changes needed — the module's twist was already written standard, and the idx=1 → idx=0 cycle behavior matches. One pedantic item: the only value in the whole scheme I haven't seen is mag01[1] at DAT_04707690+4 — it should be 0x9908B0DF. An 8-byte dump settles it, but the recurrence structure around it leaves little room for surprise.

edit_file

Current state of gt7_blob_crypto.py:

PieceStatus
MT19937 init / temper / twist (incl. idx=1 skip quirk)✅ confirmed from binary
CRC = crc32_std ^ 0x3039✅ confirmed (decrypt's own check)
Header layout + concealment swaps (both directions, game-exact order)✅ confirmed
Keystream: s←(s+1)·17, k = ror32((bitrev32(s)+1)·257,16) ^ bitrev32(s)✅ confirmed bit-exact
Nonce = xoroshiro128+ global PRNG draw✅ confirmed
Nibble-reverse LUTs (DAT_047023e0 / DAT_046fcde0)⚠️ A2 — only remaining data-dependent unknown
FUN_03ebd940 decrypt transform = (c+k) ^ t⚠️ A3 — algebra-forced

The implementation now has exactly one assumption that can change output bytes: A2. Dumping 32 bytes (0x047023e0 and 0x046fcde0) closes it — if they read {0x00,0x80,0x40,0xC0,…} and {0x00,0x08,0x04,0x0C,…} respectively, the reconstruction is 100% assumption-free.

At that point the decisive test is the one that matters anyway: run python3 gt7_blob_crypto.py decrypt <real blob> on anything that flows through the "encrypt"/"decrypt" script bindings. A CRC-passing, sensible plaintext verifies the entire chain in one shot — MT quirk, swap order, keystream, and tables together.

how can i enable the debug camera can you make me a patch?

/* WARNING: Removing unreachable block (ram,0x0042d205) / / WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_0042bb00(long param_1)

{ undefined2 uVar1; byte bVar2; byte bVar3; byte bVar4; long *plVar5; ulong *puVar6; undefined1 auVar7 [16]; ushort uVar8; undefined1 auVar9 [32]; undefined1 auVar10 [32]; char cVar11; char cVar12; undefined1 uVar13; int iVar14; int iVar15; undefined4 uVar16; uint uVar17; uint uVar18; undefined8 uVar19; undefined8 uVar20; long lVar21; long lVar22; long *plVar23; long *plVar24; ulong uVar25; undefined8 *puVar26; uint *puVar27; long *plVar28; long lVar29; long lVar30; undefined1 *puVar31; undefined *puVar32; long lVar33; undefined4 *puVar34; undefined4 *puVar35; undefined8 *puVar36; ulong uVar37; uint *puVar38; long *in_FS_OFFSET; bool bVar39; bool bVar40; float fVar41; float fVar42; double dVar43; undefined1 auVar44 [16]; undefined1 auVar45 [16]; undefined1 auVar46 [16]; undefined1 auVar47 [16]; undefined1 auVar48 [16]; undefined1 in_ZMM3 [64]; undefined1 local_1c0 [24]; undefined1 local_1a8 [24]; undefined1 local_190 [24]; undefined1 local_178 [24]; undefined1 local_160 [16]; long *plStack_150; long *plStack_148; long local_140; long *plStack_138; long lStack_130; long *plStack_128; undefined4 *local_120; undefined8 uStack_118; undefined3 uStack_110; undefined5 uStack_10d; double dStack_108; undefined8 uStack_100; undefined1 uStack_f8; undefined1 uStack_f7; undefined1 uStack_f6; undefined1 uStack_f5; undefined4 uStack_f4; undefined1 uStack_f0; undefined1 uStack_ef; undefined1 uStack_ee; undefined1 uStack_ed; double local_e8; undefined8 local_e0; undefined8 local_d8; undefined4 local_d0; undefined4 *local_c8; undefined4 uStack_c0; undefined4 uStack_bc; long lStack_b8; undefined8 uStack_b0; undefined8 uStack_a8; undefined4 local_a0; undefined *local_80; undefined8 *local_78; undefined1 local_70; ulong local_68; long local_60;

local_60 = ___stack_chk_guard; lVar30 = *(long *)(param_1 + 0x344f8); plVar5 = (long )(param_1 + 0x34480 + lVar30 * 0x28); if ((plVar5 == (long *)0x0) || (cVar11 = ((code )(*plVar5 + 0x158))(plVar5), cVar11 == '\0')) goto LAB_0042bb57; lVar21 = *(long )(param_1 + 0x3648); if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long *)(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = ((code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bba7; LAB_0042bbcc: uVar20 = 0x3f91156f80000000; } else { LAB_0042bba7: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bbcc; lVar21 = *(long )(param_1 + 0x3648); } if (((char )((long )(lVar21 + 0x10) + 0x75) != '\x01') || (cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)), cVar11 == '\0')) goto LAB_0042bbcc; uVar20 = 0; } lVar21 = *(long )(param_1 + 0x3648); lVar30 = param_1 + 0x34480 + lVar30 * 0x28; if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long )(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = (**(code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bc20; LAB_0042bc45: fVar41 = *(float *)(lVar30 + 0x20); } else { LAB_0042bc20: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bc45; lVar21 = *(long )(param_1 + 0x3648); } if ((char )((long )(lVar21 + 0x10) + 0x75) == '\0') goto LAB_0042bc45; cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)); if (cVar11 == '\0') { fVar41 = *(float *)(lVar30 + 0x20); } else { fVar41 = 0.0; } } lVar21 = *(long )(param_1 + 0x9f118); if (lVar21 != 0) { uVar19 = (**(code )(*plVar5 + 0x98))(plVar5); *(undefined8 )((long *)(lVar21 + 8) + 0x38) = uVar19; } uStack_f0 = 0; uStack_ef = 0; local_120 = (undefined4 *)0x0; uStack_118 = 0; lStack_130 = param_1 + 0x9a7f8; local_d8 = 0xbff0000000000000; local_d0 = 0; uStack_c0 = 0; uStack_bc = 0; lStack_b8 = SUB128(ZEXT812(0),4); uStack_b0 = 0; uStack_a8 = 0; local_a0 = 0; uStack_ee = *(undefined1 *)(lVar30 + 0x1c); dVar43 = (double)fVar41; uStack_110 = (undefined3)(param_1 + 0x2f800); uStack_10d = (undefined5)((ulong)(param_1 + 0x2f800) >> 0x18); lVar21 = param_1 + 800; auVar9.8_8 = (undefined8 )(param_1 + 0x346c8); auVar9.0_8 = **(undefined8 )(param_1 + 0x3648); lVar29 = param_1 + 0x34618; local_140 = *(undefined8 *)(param_1 + 0x2f9a8); dStack_108 = (double)(param_1 + 0x9b980); auVar9.16_8 = plVar5; auVar9.24_8 = 0; _local_160 = auVar9 << 0x40; uStack_100 = *(undefined8 *)(param_1 + 0x3650); uVar19 = *(undefined8 *)(param_1 + 0x3660); uStack_f8 = (undefined1)uVar19; uStack_f7 = (undefined1)((ulong)uVar19 >> 8); uStack_f6 = (undefined1)((ulong)uVar19 >> 0x10); uStack_f5 = (undefined1)((ulong)uVar19 >> 0x18); uStack_f4 = (undefined4)((ulong)uVar19 >> 0x20); plStack_138 = (long *)lVar21; plStack_128 = (long *)lVar29; local_e8 = dVar43; local_e0 = uVar20; local_c8 = local_120; thunk_FUN_0042d460(); local_80 = &DAT_066ee0a8; local_78 = &DAT_066f0d98; local_70 = 0; thunk_FUN_0042d460(); eh_e8650("DEBUGMENU.cameraDebug",&local_80,&DAT_066ee0a8); lVar33 = *(long *)local_160.8_8; *(undefined8 )((long )(param_1 + 0x36a8) + 0x2320) = local_160.8_8; if ((((char *)(lVar33 + 8) != '\0') && (plStack_148 != (long *)0x0)) && (cVar11 = ((code )(*plStack_148 + 0x10))(), cVar11 != '\0')) { lVar33 = *(long *)(param_1 + 0x36a8); iVar14 = ((code )(*plStack_148 + 0xc0))(); iVar15 = ((code )(plStack_148 + 0xd0))(); if (((iVar14 != -1) && (iVar15 != -1)) && ((int *)(lVar33 + 0x22f8) != iVar14 || *(int *)(lVar33 + 0x22fc) != iVar15)) { uVar19 = ((code )(plStack_148 + 200))(); FUN_00a1d2c0((undefined8 *)(lVar33 + 0x22c0),uVar19,iVar15); *(int *)(lVar33 + 0x22f8) = iVar14; *(int *)(lVar33 + 0x22fc) = iVar15; } cVar11 = ((code )(*plStack_148 + 0x1b8))(); cVar12 = ((code )(*plStack_148 + 0xe8))(); lVar33 = *(long *)(param_1 + 0x36a8); if ((cVar11 == '\0') || (uStack_ef = true, *(char *)(lVar33 + 0x2300) == '\x01')) { uStack_ef = *(char *)(lVar33 + 0x2301) != cVar12; } *(char *)(lVar33 + 0x2300) = cVar11; *(char *)(lVar33 + 0x2301) = cVar12; *(undefined4 *)(lVar33 + 0x22d0) = 0; uStack_118 = *(undefined8 *)(lVar33 + 0x22d8); local_160.0_8 = lVar33 + 0x2310; local_a0 = *(undefined4 *)(lVar33 + 0x2304); lVar22 = *(long *)(lVar33 + 0x22a0); local_d0 = (undefined4)lVar22; plVar23 = (long )(lVar33 + 0x22c0); if ((long *)*plVar23 != plVar23) { plVar28 = (long *)*plVar23; do { ((code **)((long *)plVar28[5] + 0x40))((long *)plVar28[5],local_160); plVar24 = (long )plVar28[2]; if ((char *)((long)plVar24 + 0x19) == '\0') { plVar28 = (long *)plVar24; if ((char *)((long)plVar28 + 0x19) == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; while (cVar11 == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; } } } else { do { plVar24 = (long )plVar28[1]; if ((char *)((long)plVar24 + 0x19) != '\0') break; bVar39 = plVar28 == (long *)plVar24[2]; plVar28 = plVar24; } while (bVar39); } plVar28 = plVar24; } while (plVar24 != plVar23); lVar33 = *(long *)(param_1 + 0x36a8); lVar22 = *(long )(lVar33 + 0x22a0); } if (lVar22 != 0) { FUN_004255e0(lVar33 + 0x20,local_160,lVar33 + 0x22c0); if (lVar22 * 0x8a0 != 0x8a0) { lVar33 = lVar33 + 0x8c0; lVar22 = lVar22 * 0x8a0 + -0x8a0; do { FUN_004255e0(lVar33,local_160,(long *)(param_1 + 0x36a8) + 0x22c0); lVar33 = lVar33 + 0x8a0; lVar22 = lVar22 + -0x8a0; } while (lVar22 != 0); } lVar33 = *(long *)(param_1 + 0x36a8); } ((code )((long **)(lVar33 + 0x22d8) + 0x20))((long **)(lVar33 + 0x22d8),local_160); } lVar33 = param_1 + 14000; if ((long *)(param_1 + 0x36c0) != 0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { lVar22 = eh_1f3f80(puVar34,"event"); uVar19 = *(undefined8 *)(lVar22 + 8); cVar11 = FUN_00b831c0(uVar19,"ready"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"interior"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"switch"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.start"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.end"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.error"); if (cVar11 == '\0') { ((code )((long **)(param_1 + 0x36c0) + 0x28)) ((long **)(param_1 + 0x36c0),puVar34); goto LAB_0042c563; } uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025dabf0(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1c0,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1c0; } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025da020(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1a8,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1a8; } } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025d9470(lVar33,uVar16,&local_80); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_190,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_190; } } else { cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),&DAT_049bf7ab); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,&DAT_049bf7ab); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x18))(plVar23,uVar16); } cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),"target"); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"target"); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x20))(plVar23,uVar16); } FUN_00b86810(local_178,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_178; } eh_1f5800(puVar31); } else { uVar19 = eh_1f3f80(puVar34,"valid"); uVar13 = FUN_003f4230(uVar19,0); *(undefined1 *)(param_1 + 0x375c) = uVar13; } } else { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"value"); uVar13 = FUN_003f4230(uVar19,0); ((code **)(*plVar23 + 0x10))(plVar23,uVar13); } LAB_0042c563: } } if (local_c8 != (undefined4 *)0x0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { eh_1f5800(puVar34); } uVar37 = lStack_b8 - (long)local_c8; puVar35 = local_c8; if (0xfff < uVar37) { puVar35 = (undefined4 )(local_c8 + -2); uVar37 = uVar37 + 0x27; } operator.delete(puVar35,uVar37); } uStack_f8 = 0; uStack_f7 = 0; uStack_f6 = 0; local_160.12_4 = 0; local_160.0_12 = ZEXT812(0); uStack_118 = 0; plStack_128 = (long *)0x0; uStack_f4 = 0; uStack_f0 = 0; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; lStack_130 = *(undefined8 *)(param_1 + 0x3650); plStack_150 = (long *)(undefined8 )(param_1 + 0x3648); plStack_148 = (long )(undefined8 *)(param_1 + 0x346c8); uStack_110 = (undefined3)lVar29; uStack_10d = (undefined5)((ulong)lVar29 >> 0x18); lVar22 = *(long *)(param_1 + 0x36a8); local_140 = lVar21; plStack_138 = plVar5; local_120 = (undefined4 *)lVar33; dStack_108 = dVar43; uStack_100 = uVar20; if (0 < *(int *)(lVar22 + 0x22a0)) { uVar20 = ((code **)((long *)(lVar22 + 0x20) + 0x18))(lVar22 + 0x20,0); local_160.8_8 = uVar20; } if ((DAT_067d1460 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_067d1460), iVar14 != 0)) { FUN_0097bf90(); __cxa_atexit(FUN_02f3c550,&DAT_067d1338,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_067d1460); } fVar42 = (float)FUN_0042e5e0(&DAT_067d1338,1,&local_80); puVar38 = (uint *)0x0; uStack_f8 = *(float *)(param_1 + 0x2f7e8) < fVar42; uStack_f7 = *(undefined1 *)(param_1 + 0x2f7e1); if (fVar42 <= *(float *)(param_1 + 0x2f7e8)) { uStack_f7 = 0; } *(float *)(param_1 + 0x2f7e8) = fVar42; *(undefined1 *)(param_1 + 0x2f7e1) = local_80.0_1; lVar21 = FUN_0042e050(&DAT_067d1338,0); if (lVar21 != 0) { if (DAT_067d1348 == 0) { fVar42 = 0.0; } else { local_80 = (undefined *)((ulong)local_80 & 0xffffffff00000000); FUN_0042e990(DAT_067d1348,0,&local_80); fVar42 = local_80.0_4 * 1000.0; } puVar27 = *(uint **)(lVar21 + 0x20); if ((puVar27 == *(uint **)(lVar21 + 0x28)) || (fVar42 < (float)*puVar27)) { puVar38 = (uint *)0x0; } else { do { puVar38 = puVar27; puVar27 = puVar38 + 4; if (puVar27 == *(uint **)(lVar21 + 0x28)) break; } while ((float)*puVar27 <= fVar42); uStack_f6 = *(uint )(param_1 + 0x2f7f0) != puVar38; uVar1 = *(undefined2 *)((long)puVar38 + 10); auVar44.2_2 = uVar1; auVar44.0_2 = uVar1; auVar44.4_2 = uVar1; auVar44.6_2 = uVar1; auVar44.8_2 = uVar1; auVar44.10_2 = uVar1; auVar44.12_2 = uVar1; auVar44.14_2 = uVar1; auVar44 = vpand_avx(auVar44,_DAT_046faf40); uStack_f4 = auVar44.0_4; uStack_f0 = (undefined1)puVar38[1]; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; } } plStack_128 = (long *)(param_1 + 0x37a0); (uint **)(param_1 + 0x2f7f0) = puVar38; local_160.0_8 = param_1 + 0x3780; if ((char )(param_1 + 0x2f7e0) == '\x01') { FUN_02383210((undefined8 *)(param_1 + 0x3790),local_160); } if ((DAT_06ba7900 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_06ba7900), iVar14 != 0)) { FUN_00b7f380(&DAT_06ba73a0); __cxa_atexit(FUN_02854f30,&DAT_06ba73a0,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_06ba7900); } auVar9 = _local_160; local_160.0_8 = lVar33; auVar10 = _local_160; plStack_148 = auVar9.24_8; local_160 = auVar10.0_16; plStack_150 = plVar5; local_160.8_8 = lVar29; switch(DAT_06ba7488) { case 1: goto LAB_0042c932; case 2: FUN_028560f0(lVar29,plVar5); break; case 3: FUN_02856180(lVar33,lVar29); break; case 4: FUN_02856410(lVar29); break; case 5: FUN_028564e0(local_160); break; case 6: FUN_02856ac0(local_160); break; case 7: uVar20 = 1; goto LAB_0042c927; case 8: uVar20 = 0; LAB_0042c927: FUN_02856d80(local_160,uVar20); goto LAB_0042c932; case 9: FUN_02856e40(local_160); LAB_0042c932: FUN_02855110(local_160); } lVar21 = ((code )(plVar5 + 0xa8))(); if (lVar21 < 1) { if ((char *)(param_1 + 0x9a8d2) == '\0') { fVar42 = *(float *)(param_1 + 0x9a910); } else { fVar42 = 0.0; } if (1.0 <= fVar42) { fVar42 = 1.0; } lVar21 = (long)(fVar42 * (float)lVar21); } else { plVar23 = (long *)((code )(*plVar5 + 0xb0))(); iVar14 = ((code )(plVar23 + 0x30))(plVar23); lVar21 = (long)iVar14 - (long)(int )((long )((long )(param_1 + 0x346e8) + 8) + 0xd0); } eh_fb2a0((undefined4 *)(param_1 + 0x9f074),param_1 + 0x9a980,lVar21); bVar39 = false; lVar21 = *(long )((long )((long )(param_1 + 0x34620) + 0xc0) + (long)(int )((long )(param_1 + 0x34620) + 0xe0) * 0x10); if (((char )(lVar21 + 0x130374) == '\x01') && ((long *)(lVar21 + 0x1302e0) != 0)) { bVar39 = *(int *)(lVar21 + 0x130340) == 6; } uVar20 = *(undefined8 *)(lVar30 + 8); iVar14 = ((code **)(*plVar5 + 0x28))(); auVar9 = _local_160; local_160.2_6 = 0; local_160.0_2 = (ushort)iVar14; stack0xfffffffffffffea8 = auVar9.8_24; if (0 < iVar14) { iVar15 = 0; lVar30 = *in_FS_OFFSET; LAB_0042cc88: plVar23 = *(long )(lVar30 + -0x98); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { puVar36 = (undefined8 *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((puVar36 + 9 <= (undefined8 *)plVar28[2]) && (plVar28[1] = (long)(puVar36 + 9), puVar36 != (undefined8 *)0x0)) goto LAB_0042ccd3; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar36 = (undefined8 *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[1] = puVar26 + 3; puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < puVar36 + 9) || (puVar26[1] = puVar36 + 9, puVar36 == (undefined8 *)0x0)) { puVar36 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x48,8); } goto LAB_0042ccd3; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); } LAB_0042cfdd: eh_42ba0(local_160); FUN_0042d710(param_1 + 0x9a660,param_1 + 0x34810); cVar11 = ((code )(*plVar5 + 0x10))(); if (cVar11 == '\0' || *(long *)(param_1 + 0x3660) == 0) goto LAB_0042bb57; uVar18 = ((code **)(*plVar5 + 0x30))(); auVar44 = in_ZMM3.0_16; uVar17 = 0xffffffff; if (0 < (int)uVar18) { lVar30 = 8; uVar37 = 0; do { lVar21 = *(long )(param_1 + 0x3660); uVar17 = (uint)uVar37; if ((((0x2f < uVar37) || (((uint )(lVar21 + 0x668 + (uVar37 >> 5) * 4) >> (uVar17 & 0x1f) & 1) == 0)) && (lVar29 = (long)(char *)(lVar21 + 0x608 + uVar37), -1 < lVar29)) && ((plVar5 = *(long )(lVar30 + lVar21 + lVar29 * 8), plVar5 != (long *)0x0 && (cVar11 = ((code )(*plVar5 + 0x250))(plVar5), cVar11 != '\0')))) { cVar11 = ((code **)(plVar5 + 0x1f8))(plVar5); auVar44 = in_ZMM3.0_16; if (cVar11 == '\0') break; } auVar44 = in_ZMM3.0_16; uVar37 = uVar37 + 1; lVar30 = lVar30 + 0x20; uVar17 = 0xffffffff; } while (uVar18 != uVar37); } if ((((long *)(param_1 + 0x3660) == 0) || (lVar30 = *(long )((long *)(param_1 + 0x3660) + 0x678), (int)uVar17 < 0 || lVar30 == 0)) || (plVar5 = *(long **)(lVar30 + 8), (int)plVar5[1] <= (int)uVar17)) { LAB_0042d0e2: _DAT_067100f0 = 0.0; _DAT_067100f4 = 0; _DAT_067100f8 = 0; _DAT_067100fc = 0; DAT_06710100 = 0; DAT_06710104.0_1 = 0; DAT_06710104.3_1 = 1; DAT_06710104.1_1 = '\0'; } else { lVar30 = plVar5; if ((long *)(lVar30 + 0x4b70 + (ulong)uVar17 * 0x4f50) == 0) goto LAB_0042d0e2; auVar46[8] = 0x15; auVar46.0_8 = 0x1515151515151515; auVar46[9] = 0x15; auVar46[10] = 0x15; auVar46[0xb] = 0x15; auVar46[0xc] = 0x15; auVar46[0xd] = 0x15; auVar46[0xe] = 0x15; auVar46[0xf] = 0x15; auVar7 = vpcmpeqd_avx(auVar44,auVar44); lVar30 = *(long *)(lVar30 + (ulong)uVar17 * 0x4f50 + 0x4b88); _DAT_067100f0 = *(float *)(lVar30 + 0x360) + *(float *)(lVar30 + 0x564); _DAT_067100f4 = *(undefined4 *)(lVar30 + 0x100c); _DAT_067100f8 = *(undefined4 *)(lVar30 + 0x1000); _DAT_067100fc = *(undefined4 *)(lVar30 + 0xffc); DAT_06710100 = *(undefined4 *)(lVar30 + 0x10b0); DAT_06710104.0_1 = *(undefined1 *)(lVar30 + 0x10d0); DAT_06710104.3_1 = *(byte *)(lVar30 + 9) >> 2 & 1; bVar2 = *(byte *)(lVar30 + 0x2fb); bVar3 = *(byte *)(lVar30 + 0x4ff); auVar44 = vpinsrb_avx(ZEXT116(bVar2),(uint)bVar3,1); auVar45 = vpinsrb_avx(ZEXT116(bVar2),(uint)(bVar2 & 0xfe),1); bVar2 = *(byte *)(lVar30 + 0x703); bVar4 = *(byte *)(lVar30 + 0x907); auVar45 = vpinsrb_avx(auVar45,(uint)bVar3,2); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar3 & 0xfe),3); auVar44 = vpinsrb_avx(auVar44,(uint)bVar2,2); auVar45 = vpinsrb_avx(auVar45,(uint)bVar2,4); auVar48 = vpinsrb_avx(auVar44,(uint)bVar4,3); auVar44 = vpmaxub_avx(auVar48,auVar46); auVar44 = vpcmpeqb_avx(auVar48,auVar44); auVar48 = vpmovzxbd_avx(auVar48); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar2 & 0xfe),5); auVar47.8_4 = 0x100402; auVar47.0_8 = 0x10040200100402; auVar47.12_4 = 0x100402; auVar45 = vpinsrb_avx(auVar45,(uint)bVar4,6); auVar44 = vpmovsxbd_avx(auVar44 ^ auVar7); auVar7 = vpinsrb_avx(auVar45,(uint)(bVar4 & 0xfe),7); auVar45 = vpsrlvd_avx2(auVar47,auVar48); auVar48.8_8 = 0x204020402040204; auVar48.0_8 = 0x204020402040204; auVar44 = vpand_avx(auVar44,auVar45); auVar45 = vpslld_avx(auVar44,0x1f); auVar44 = vpcmpeqb_avx(auVar7,auVar48); DAT_06710104.1_1 = '\x01'; if ((((SUB161(auVar45 >> 0x1f,0) & 1) == 0 && (SUB161(auVar45 >> 0x3f,0) & 1) == 0) && (SUB161(auVar45 >> 0x5f,0) & 1) == 0) && -1 < auVar45[0xf]) { DAT_06710104.1_1 = ((((((((SUB161(auVar44 >> 7,0) & 1) != 0 || (SUB161(auVar44 >> 0xf,0) & 1) != 0) || (SUB161(auVar44 >> 0x17,0) & 1) != 0) || (SUB161(auVar44 >> 0x1f,0) & 1) != 0) || (SUB161(auVar44 >> 0x27,0) & 1) != 0) || (SUB161(auVar44 >> 0x2f,0) & 1) != 0) || (SUB161(auVar44 >> 0x37,0) & 1) != 0) || (SUB161(auVar44 >> 0x3f,0) & 1) != 0) * '\x02'; } } DAT_06710104.2_1 = DAT_066ea385; local_160.8_8 = &LAB_0298bb50; local_160.0_8 = &PTR_FUN_0546e2b0; plStack_128 = (long *)local_160; lVar30 = *(long *)(param_1 + 0xb98); plVar5 = (long *)(lVar30 + 0x5a0); if (plVar5 == (long *)local_160) { FUN_0042d400(local_160,0); goto LAB_0042bb57; } plVar23 = *(long )(lVar30 + 0x5d8); if (plVar23 != (long *)0x0) { ((code **)(*plVar23 + 0x20))(plVar23,plVar23 != plVar5); *(undefined8 *)(lVar30 + 0x5d8) = 0; if (plStack_128 == (long *)0x0) goto LAB_0042bb57; if (plStack_128 != (long *)local_160) { *(long )(lVar30 + 0x5d8) = plStack_128; goto LAB_0042bb57; } } uVar20 = ((code )(*plStack_128 + 8))(plStack_128,plVar5); *(undefined8 *)(lVar30 + 0x5d8) = uVar20; if (plStack_128 != (long *)0x0) { ((code **)(*plStack_128 + 0x20))(plStack_128,plStack_128 != (long )local_160); } LAB_0042bb57: if (___stack_chk_guard != local_60) { / WARNING: Subroutine does not return */ __stack_chk_fail(); } return; LAB_0042ccd3: *puVar36 = &DAT_0546e0b8; puVar36[1] = param_1; *(int *)(puVar36 + 2) = iVar15; *(float *)((long)puVar36 + 0x14) = fVar41; puVar36[3] = param_1 + 0x34740; puVar36[4] = plVar5; puVar36[5] = param_1 + 0x36a0; puVar36[6] = uVar20; *(bool *)(puVar36 + 7) = bVar39; LOCK(); *(int *)(*plVar23 + 0x10) = *(int *)(*plVar23 + 0x10) + 1; UNLOCK(); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { plVar24 = (long *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((plVar24 + 3 <= (long *)plVar28[2]) && (plVar28[1] = (long)(plVar24 + 3), plVar24 != (long *)0x0)) break; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar26[1] = puVar26 + 3; plVar24 = (long *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < plVar24 + 3) || (puVar26[1] = plVar24 + 3, plVar24 == (long *)0x0)) { plVar24 = (long )eh_dc670((undefined8 *)(*plVar23 + 8),0x18,8); } goto LAB_0042cd5b; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); LAB_0042cd5b: lVar21 = plVar23[1]; *plVar24 = *plVar23; plVar24[1] = lVar21; plVar24[2] = 0; puVar36[8] = plVar24; puVar6 = (ulong *)plVar23[1]; lVar21 = DAT_06c12440; if (puVar6 != (ulong *)0x0) { uVar37 = *puVar6; do { LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | uVar37 & 0xffffffffffff0000; uVar25 = uVar37; } UNLOCK(); lVar21 = DAT_06c12440; uVar37 = uVar25; } while (!bVar40); } do { LOCK(); bVar40 = lVar21 != DAT_06c12440; lVar29 = lVar21 + 1; if (bVar40) { lVar21 = DAT_06c12440; lVar29 = DAT_06c12440; } DAT_06c12440 = lVar29; UNLOCK(); } while (bVar40); uVar37 = (ulong)((uint)lVar21 & 0x3ff); uVar8 = (ushort)((uint)lVar21 >> 9); while ((ushort *)(&DAT_06c12480 + uVar37 * 2) != (uVar8 & 0xfffe)) { nidf_libc_0xf75f5a605191bff9(); } *(undefined1 **)(&DAT_06c13c80 + uVar37 * 0x18) = &LAB_019038f0; *(undefined8 **)(&DAT_06c13c88 + uVar37 * 0x18) = puVar36; *(undefined1 **)(&DAT_06c13c90 + uVar37 * 0x18) = local_160; *(ushort *)(&DAT_06c12480 + uVar37 * 2) = uVar8 | 1; uVar17 = DAT_06c25cc0; do { if ((short)uVar17 < 1) goto LAB_0042cc7a; LOCK(); bVar40 = uVar17 != DAT_06c25cc0; uVar18 = uVar17 - 1 & 0xffff | uVar17 & 0xffff0000; if (bVar40) { uVar17 = DAT_06c25cc0; uVar18 = DAT_06c25cc0; } DAT_06c25cc0 = uVar18; UNLOCK(); } while (bVar40); LOCK(); _DAT_06c25d00 = _DAT_06c25d00 + 1; UNLOCK(); if (DAT_06c25d08 != 0) { if (DAT_06c25d08 < 2) { nidf_libc_0x4e94ff1a958ba44a(); } else { nidf_libc_0x052e6e6b37016bf9(&DAT_06c25d00,1); } } LAB_0042cc7a: iVar15 = iVar15 + 1; if (iVar15 == iVar14) goto LAB_0042cfdd; goto LAB_0042cc88; }

Dr.Binary
web_search

Good news — you don't need to patch FUN_0042bb00 at all. That function is the consumer of the debug camera (it registers "DEBUGMENU.cameraDebug" and processes its ready/interior/switch/motion.* events; the switch(DAT_06ba7488) cases 7/8 are the debug-cam enable/disable commands). The actual gate is the runtime environment string, and the community has already proven this route on both GT Sport and GT7:

The proven approach: flip the environment to debug

GT7 launches in one of three environments — release, beta, debug — selected by a plain UTF-8 string baked into the eboot. The debug environment unlocks the hidden Debug Menu (which contains cameraDebug, demo mode, LAN mode, B-Spec, etc.). Known working patch (GT7 PS4 v1.18, CUSA24769, decrypted ELF, by MrNova95281451):

offset 0x6095990:  72 65 6C 65 61 73 65  →  64 65 62 75 67 00 00
                   ("release")              ("debug\0\0")

Your build is newer, so that offset won't match — but finding yours takes one minute in Ghidra:

  1. Search → For Strings → release
  2. You're looking for the one clustered near beta / debug / develop (the environment table) — typically a short standalone string, not a path or error message
  3. Follow the xref to confirm it's the startup/environment selector (GT Sport's equivalent sat next to the online_save config parser)
  4. Convert that vaddr to a file offset (for the main PT_LOAD it's usually vaddr - segment_vaddr + segment_file_offset; check the program headers)

Patch bytes (in-place, length-safe since debug is shorter than release):

find:    72 65 6C 65 61 73 65 00     "release\0"
write:   64 65 62 75 67 00 00 00     "debug\0\0\0"

After that, in-game: the Debug Menu appears (on the v1.18 build you had to play one Music Rally first to unlock the world map), and under it you'll find the cameraDebug section your function registers — that's what drives the free/debug camera via the switch event and the cases 7/8 dispatcher.

Caveats

  • Offline only. Debug environment + PSN is a ban risk, and debug mode changes other behaviors (LAN mode, demo toggles, QAMode indicator). Use a local/offline account.
  • Don't overwrite unrelated release strings (log format strings, file paths) — verify the xref first.
  • On PS5, if you're using a runtime patch engine (GoldHEN-style XML or a GT7Patcher-like payload) rather than editing the file, the same byte patch works — just expressed as [ utf8, <offset>, "debug\0" ] in the patch list, like the GT Sport example.

If you want, I'll produce the exact patch

Upload the decrypted eboot (or just tell me the title ID + version) to the workspace and I'll:

  1. locate and xref-verify the environment string,
  2. give you the exact file offset,
  3. write you a ready-to-run Python patcher plus a GoldHEN/patch-engine XML snippet.

Alternatively, if you specifically want the free camera without the whole debug environment, the targeted route is forcing the case 7 path (FUN_02856d80(ctx, 1)) or writing the debug camera index at param_1 + 0x344f8 — but that's speculative without seeing who feeds DAT_06ba7488, so I'd start with the environment string, which is the battle-tested path.

i already have the debug menu in the ps5 1.71 version, how do i enable the debug camera while being in game?

Dr.Binary
web_search

There's no documented in-game path for the camera debug page on 1.71 that I could find — the community pages cover Debug Settings (credits, cars, LAN, demo) but not cameraDebug. But your own pasted function tells us exactly how it's supposed to work, so here's the evidence-based picture plus the fallback patch.

How the debug camera is driven (from FUN_0042bb00)

  • This per-frame scene function registers the menu page: eh_e8650("DEBUGMENU.cameraDebug", ...) — so the page exists in the debug menu only while a scene is running (race/replay), not at the world map.
  • The page emits events that this function consumes:
    • switch — carries a window id and a target camera index → calls the camera manager (param_1+0x36c0) methods +0x18/+0x20. This is the actual "activate debug camera X" command.
    • ready (value), interior (valid), motion.start/end/error (window) — state and motion-rig camera plumbing.
  • Separately, the command dispatcher switch(DAT_06ba7488) has case 7 → FUN_02856d80(ctx, 1) (enable) and case 8 → (ctx, 0) (disable), followed by FUN_02855110 (apply). DAT_06ba7488 is a debug-command mailbox — something (menu button or debug key handler) writes a command number into it.

Route 1 — find it in the menu you already have (no patch)

  1. While in a race or replay, open your debug menu (the GT7Patcher-unlocked Options → Debug Settings). If there's a Camera / CameraDebug group, toggle its enable entry — that should fire the switch/case-7 path.
  2. If you only see General/Global/Demo pages, your "Unlock debug Settings" patch exposes the settings subset, not the full DEBUGMENU tree. The full tree comes with the debug environment (release→debug string in the 1.71 eboot — note GT7Patcher requires a clean eboot, so this means a modified eboot.bin on top of the patcher's offline patch, or applying it as a file patch in its XML format).

To find the exact page names/labels in your build, in Ghidra:

  • Search → For Strings → DEBUGMENU. — this enumerates every debug page the binary registers (cameraDebug and siblings), so you'll know what to look for in-game.
  • The page's field labels live near the descriptors DAT_066ee0a8 / DAT_066f0d98 (dump those as pointer arrays → each points to a property record with a name string + type).

Route 2 — targeted patch (bypass the menu)

If the page simply isn't exposed in release environment, force the enable command. The cleanest hook is not the big function but the command path:

  1. In Ghidra: References → Show References to DAT_06ba7488 — find the writer (the command mailbox setter).
  2. Give me the disassembly of the switch dispatch (0042c840–0042c940 region) and the decompilation of FUN_02856d80 + FUN_02855110.

With those I can hand you exact patch bytes — either "stomp DAT_06ba7488 to 7 once per frame where the writer runs" or a small redirect into the case-7 branch. I'd avoid patching the big function's entry branch directly: it's the main camera/scene update, and forcing the debug-cam update every frame without the menu plumbing (and without the camera slot at param_1+0x34480 being selected via +0x344f8) risks a frozen or T-posed camera.

Caveats

  • Debug environment / debug features offline only — don't take it near PSN.
  • Backup save + eboot before string-patching (GT7Patcher's file check will flag a modified eboot; the File Cleaner entry in its README explains how that interacts).

Fastest path to a concrete answer: paste the DEBUGMENU. string list and the references to DAT_06ba7488. From those two I can tell you whether your build exposes the page in release mode and, if not, write the patch.

                         DAT_06ba7488                                    XREF[8]:     FUN_0042bb00:0042c2c0(R), 
                                                                                      FUN_028560f0:0285615d(W), 
                                                                                      FUN_02856180:0285633e(W), 
                                                                                      FUN_02856ac0:02856bcc(W), 
                                                                                      FUN_02856d80:02856e22(W), 
                                                                                      FUN_02856e40:02856e91(W), 
                                                                                      FUN_02857670:0285768c(R), 
                                                                                      FUN_038286e0:038286fc(R)  
    06ba7488 00 00 00 00     undefined4 00000000h
Dr.Binary

That XREF table is very revealing — DAT_06ba7488 is not a one-shot command mailbox, it's a state machine:

  • The only writers are the case handlers themselves (FUN_028560f0 = case 2, FUN_02856180 = case 3, FUN_02856ac0 = case 6, FUN_02856d80 = cases 7/8, FUN_02856e40 = case 9). Each handler runs its step and writes back the next state — that's why FUN_0042bb00's dispatch runs every frame and chains through cases until a handler writes 0 (idle).
  • The other two readers — FUN_02857670 (likely the debug HUD/overlay showing camera state) and FUN_038286e0 (quite possibly the cameraDebug menu page itself, reading state to render its fields) — just observe.

Consequence: since nothing outside the handlers ever writes a nonzero state, the machine is kicked off by something calling a handler directly — i.e., the debug menu's cameraDebug page (or a debug key handler) invokes e.g. FUN_028560f0(...) or FUN_02856d80(ctx, 1) directly, and the per-frame dispatcher takes over from there. That's the "enable debug camera" entry point you're looking for.

What I need next (in priority order):

  1. Caller XREFs of FUN_02856d80, FUN_028560f0, FUN_02856e40, FUN_02855110 — the direct callers are the menu bindings; one of them is your in-game "enable debug camera" button.
  2. Decompile of FUN_02856d80 — shows exactly what enable/disable does and what state it writes back (that decides the patch shape).
  3. Decompile of FUN_038286e0 — if this is the cameraDebug menu page update, it will name every field on that page, which tells us what should appear in-game (and whether it's reachable in the release environment at all).
  4. Decompile of FUN_02857670 — cheap to include; likely the on-screen debug camera state indicator.

Patch plan once I see those, likely one of:

  • A (one-shot trigger): hook the menu-binding site — if the cameraDebug page exists but is greyed/hidden in release env, we patch its visibility/enabled flag. Surgical, no per-frame side effects.
  • B (state injection): if nothing calls the handlers in release env, patch the dispatcher in FUN_0042bb00 so state == 0 falls into case 7 (FUN_02856d80(ctx,1)). Whether that's safe (idempotent) or will fight the normal camera depends on what state FUN_02856d80 writes back — which is exactly what #2 tells us.

Paste #1 and #2 first — those two alone are probably enough for me to give you exact patch bytes.

void FUN_02856e40(undefined8 *param_1)

{ undefined8 uVar1;

uVar1 = (**(code )(*(long *)param_1[1] + 0x290))((long *)param_1[1],0,8,0); if (DAT_06ba748c == '\0') { FUN_02856eb0(param_1,uVar1); } ((code **)(*(long *)param_1[1] + 0x158))((long *)param_1[1],0,0,1); FUN_02857670(*param_1); DAT_06ba7488 = 1; return; }

Dr.Binary

This is the state-machine kick-off step. Decoded:

void FUN_02856e40(ctx)            // state 9: "activate debug camera"
{
    v1 = obj->vtable[0x290/8](obj, 0, 8, 0);   // query something from the camera object (returns a handle/param)
    if (DAT_06ba748c == 0)
        FUN_02856eb0(ctx, v1);                 // stash/process the result (skipped when a flag is set)
    obj->vtable[0x158/8](obj, 0, 0, 1);        // <-- the activation call: (0, 0, 1) smells like SetCamera(view=0, mode=0, active=1)
    FUN_02857670(ctx[0]);                      // debug HUD draw (that's the reader of DAT_06ba7488 from the XREF list)
    DAT_06ba7488 = 1;                          // chain to state 1
}

And here's the neat part — cross-referencing the dispatcher in FUN_0042bb00:

  • case 1 and case 7 both funnel into FUN_02856d80(ctx, 1) (case 7: uVar20 = 1; goto LAB_0042c927 — same call site as case 1). Case 8 is the same with 0 = disable.
  • So state 9 is "prepare + activate view", which chains to state 1/7 = "enable". After FUN_02856d80 writes its write-back (at 02856e22), the machine either parks at 0 or steps into 2–6 (the camera-work states).

State map so far: 0 = idle · 1/7 = enable · 8 = disable · 9 = activate (→1) · 2,3,4,5,6 = per-step camera work · FUN_02857670 = the on-screen state indicator.

That also means my "force case 7 every frame" idea needs one more fact before it's safe: what state does FUN_02856d80 write back at 02856e22?

  • If it writes 0 (done), forcing case 9/7 from idle would re-fire every frame — each frame re-running vtable+0x158(obj,0,0,1), which re-asserts the debug camera. That's likely exactly the behavior you want (persistent free cam), but it would also override the disable path.
  • If it writes 2+, the machine self-sustains after one kick and the patch only needs to inject the state once — much cleaner.

So, paste next (this closes it):

  1. FUN_02856d80 — the enable/disable step + its write-back value
  2. Caller XREFs of FUN_02856e40 and FUN_02856d80 — who kicks the machine (the menu binding)
  3. FUN_038286e0 — still my candidate for the cameraDebug menu page; it may name the in-game fields
  4. Optionally FUN_02856eb0 and FUN_02857670

With #1 and #2 I can give you the final patch: either a one-shot state injection (DAT_06ba7488 = 9) tied to a discoverable trigger, or a persistent-force redirect — with exact bytes against your 1.71 eboot.

void FUN_038286e0(long param_1,undefined8 *param_2)

{ ulong *puVar1; byte *pbVar2; char cVar3; int iVar4; undefined4 uVar5; uint uVar6; long *plVar7; long lVar8; long lVar9; long lVar10; undefined1 auVar11 [16]; undefined1 auVar12 [16];

FUN_00b7f040(); if ((DAT_06ba7488 != 1) && (cVar3 = (**(code )(*(long *)*param_2 + 0xe8))(), cVar3 != '\0')) { return; } iVar4 = ((code )(*(long *)param_2 + 0x170))(); if ((int *)(param_1 + 0xe0) != iVar4) { auVar11.0_12 = ZEXT812(0); auVar11.12_4 = 0; (undefined1 () [16])(param_1 + 200) = auVar11; *(undefined1 *)(param_1 + 0xd8) = 0; *(undefined4 *)(param_1 + 0xdc) = 0xffffffff; *(int *)(param_1 + 0xe0) = iVar4; puVar1 = (ulong )((long *)(param_1 + 8) + 0x214); *puVar1 = *puVar1 & 0xffffffffbfffffff; } plVar7 = (long *)((code )(*(long *)*param_2 + 0x98))(); uVar5 = ((code )(*(long *)*param_2 + 0xa0))(); iVar4 = ((code )(plVar7 + 0x140))(plVar7,uVar5); if ((int *)(param_1 + 0xdc) == iVar4) goto LAB_0382882a; if (0 < iVar4) { uVar5 = ((code )(*(long *)*param_2 + 0xa0))(); lVar8 = ((code )(*plVar7 + 0x148))(plVar7,uVar5); cVar3 = *(char )(lVar8 + 8); if (cVar3 == '\x05') { if ((ulong)(byte *)(lVar8 + 9) < 4) { lVar9 = *(long )(&DAT_047098c0 + (ulong)(byte *)(lVar8 + 9) * 8); goto LAB_0382881b; } } else if (cVar3 == '\x04') { auVar12.0_12 = ZEXT812(0); auVar12.12_4 = 0; (undefined1 () [16])(param_1 + 200) = auVar12; *(undefined1 )(param_1 + 0xd8) = 0; } else if (cVar3 == '\x01') { if ((char )(lVar8 + 9) == '\x01') { lVar9 = 0x100; } else { if ((char *)(lVar8 + 9) != '\x02') goto LAB_03828824; lVar9 = 0x108; } LAB_0382881b: lVar9 = *(long *)(param_1 + lVar9); if (lVar9 != 0) { *(undefined1 *)(param_1 + 0xd8) = 1; lVar10 = param_1 + 0x88; puVar1 = (ulong )((long *)(param_1 + 8) + 0x214); *puVar1 = *puVar1 | 0x40000000; puVar1 = (ulong )((long *)(param_1 + 0x100) + 0x214); *puVar1 = *puVar1 & 0xffffffffbfffffff; puVar1 = (ulong )((long *)(param_1 + 0x108) + 0x214); *puVar1 = *puVar1 & 0xffffffffbfffffff; puVar1 = (ulong )((long *)(param_1 + 0x110) + 0x214); *puVar1 = *puVar1 & 0xffffffffbfffffff; puVar1 = (ulong )((long *)(param_1 + 0x118) + 0x214); *puVar1 = *puVar1 & 0xffffffffbfffffff; puVar1 = (ulong )((long *)(param_1 + 0x120) + 0x214); *puVar1 = *puVar1 & 0xffffffffbfffffff; puVar1 = (ulong )((long *)(param_1 + 0x128) + 0x214); *puVar1 = *puVar1 & 0xffffffffbfffffff; pbVar2 = (byte *)(lVar9 + 0x217); *pbVar2 = *pbVar2 | 0x40; FUN_00894290(lVar10,lVar8 + 10); lVar9 = param_1 + 0xa8; FUN_00894290(lVar9,lVar8 + 0x1fe); if (0xf < *(ulong *)(param_1 + 0xa0)) { lVar10 = *(long )(param_1 + 0x88); } FUN_018c7140((undefined8 *)(param_1 + 0xf0),lVar10); *(ulong )((long *)(param_1 + 0xf0) + 0x214) = *(ulong )((long )(param_1 + 0xf0) + 0x214) & 0xffffffffbfffffff | (ulong)((uint)((long *)(param_1 + 0x98) != 0) << 0x1e); if (0xf < *(ulong *)(param_1 + 0xc0)) { lVar9 = *(long )(param_1 + 0xa8); } FUN_018c7140((undefined8 *)(param_1 + 0xf8),lVar9); *(ulong )((long *)(param_1 + 0xf8) + 0x214) = *(ulong )((long )(param_1 + 0xf8) + 0x214) & 0xffffffffbfffffff | (ulong)((uint)((long )(param_1 + 0xb8) != 0) << 0x1e); FUN_003aa930((undefined8 *)(param_1 + 0x130)); uVar6 = ((code )(*(long *)*param_2 + 0xa0))(); *(ulong *)(param_1 + 200) = (ulong)uVar6; *(undefined8 *)(param_1 + 0xd0) = 10000; } } } LAB_03828824: *(int )(param_1 + 0xdc) = iVar4; LAB_0382882a: if ((((char )(param_1 + 0xd8) == '\x01') && ((long )(param_1 + 200) != 0)) && ((long )(param_1 + 0xd0) != 0)) { if ((param_2[1] == 0) || ((char *)(param_2[1] + 0x20) == '\0')) { uVar6 = ((code **)(*(long *)param_2 + 0xa0))(); if (((long *)(param_1 + 200) <= (long)(ulong)uVar6) && ((long)((ulong)uVar6 - *(long *)(param_1 + 200)) <= *(long )(param_1 + 0xd0))) { return; } } FUN_003aa930((undefined8 *)(param_1 + 0x138)); *(undefined1 *)(param_1 + 0xd8) = 0; } return; }

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_02857670(undefined8 param_1)

{ ulong uVar1; void *pvVar2; undefined1 local_a8 [24]; void *local_90 [3]; ulong local_78; undefined1 local_70 [24]; undefined1 local_58; undefined7 uStack_57; undefined8 local_48; ulong local_40; undefined1 local_38 [24]; long local_20;

local_20 = ___stack_chk_guard; if (DAT_06ba7488 != 0) { DAT_06ba748d = 1; DAT_06ba74b0 = 1; FUN_02660510(local_90,"command",&DAT_04a43ba3); FUN_009a70e0(&local_58,"window",0); FUN_00b7def0(local_a8,param_1,local_90,&local_20); eh_1f5800(local_a8); eh_1f5800(local_38); if (0xf < local_40) { pvVar2 = (void *)CONCAT71(uStack_57,local_58); uVar1 = local_40 + 1; if (0xfff < uVar1) { pvVar2 = *(void **)((long)pvVar2 + -8); uVar1 = local_40 + 0x28; } operator.delete(pvVar2,uVar1); } local_48 = 0; local_40 = 0xf; local_58 = 0; eh_1f5800(local_70); if (0xf < local_78) { uVar1 = local_78 + 1; if (0xfff < uVar1) { local_90[0] = *(void *)((long)local_90[0] + -8); uVar1 = local_78 + 0x28; } operator.delete(local_90[0],uVar1); } } if (___stack_chk_guard == local_20) { return; } / WARNING: Subroutine does not return */ __stack_chk_fail(); }

*_

Dr.Binary

Two corrections and one big confirmation from these:

FUN_038286e0 is not the menu — it's the debug camera's toast system

It watches an event stream (param_2 object) for records of type 1/4/5 carrying two strings, shows them on two UI text elements for 10 s (*(param_1+0xd0) = 10000 — a ms timeout), then hides them. The seven pointer slots (param_1+0x100…0x128, selected via DAT_047098c0 and the subtype byte) are message slots. Motion errors, camera switches — that kind of feedback.

The important line is the gate:

if ((DAT_06ba7488 != 1) && (obj->vtable[0xe8]() != 0)) return;

This toast system only runs while DAT_06ba7488 == 1 — which confirms state 1 = "debug camera active" steady state.

FUN_02857670 is a sender, not a display

It fires a message { "command": <string @ DAT_04a43ba3>, "window": 0 } through a dispatcher and raises the active flags DAT_06ba748d / DAT_06ba74b0 — a notification emitted by the state-9 handler after activating the camera. Worth checking what string DAT_04a43ba3 is; it names who this command goes to.

Corrected state map (I misread the dispatcher earlier)

Re-checking FUN_0042bb00's switch: case 1 does not call FUN_02856d80 — it jumps straight to FUN_02855110 (the per-frame apply). Only cases 7/8 invoke it:

StateMeaning
0idle
1debug camera active — per-frame FUN_02855110 only
2–6transition/work steps
7→ FUN_02856d80(ctx, 1) = enable
8→ FUN_02856d80(ctx, 0) = disable
9→ FUN_02856e40 = activate view (vtable+0x158(obj,0,0,1)) + notify → writes 1

So the whole enable is: one frame with DAT_06ba7488 ∈ {7, 9} — the machine then parks itself at 1 and the debug camera runs until something writes 8.

The patch — now fully shaped, two bytes-from-here options

Option A (find the real trigger): someone calls FUN_02856d80 / FUN_02856e40 directly to kick the machine. Still need the caller XREFs of FUN_02856d80, FUN_02856e40, FUN_028560f0, FUN_02855110. If the caller is the debug menu, we patch its visibility/enabled flag — cleanest possible outcome.

Option B (state injection): the dispatcher reads DAT_06ba7488 at 0042c2c0 (per your XREF listing). If nothing in release env ever kicks it, we patch that read site: "if state == 0, treat as 9 (or 7)". That turns the free cam on in every race/replay automatically; disable then only works until the next scene. To write exact bytes I need the disassembly around 0042c2c0 through the switch's jump table (~0042c2b0–0042c940), plus FUN_02856d80's decompile — its write-back at 02856e22 tells me whether 7 alone is a complete kick (it may skip FUN_02856e40's activation call) or whether 9 is the proper entry.

Paste the caller XREFs (#1) and FUN_02856d80 first — if a real trigger exists, Option A ends this with a two-byte patch; otherwise I'll build Option B from the dispatch disasm.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02856e40()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_02856e40                                    XREF[1]:     FUN_0042bb00:0042c951(c)  
    02856e40 55              PUSH       RBP
    02856e41 48 89 e5        MOV        RBP,RSP
    02856e44 53              PUSH       RBX
    02856e45 50              PUSH       RAX
    02856e46 48 89 fb        MOV        RBX,RDI
    02856e49 48 8b 7f 08     MOV        RDI,qword ptr [RDI + 0x8]
    02856e4d ba 08 00        MOV        EDX,0x8
             00 00
    02856e52 31 f6           XOR        ESI,ESI
    02856e54 31 c9           XOR        ECX,ECX
    02856e56 48 8b 07        MOV        RAX,qword ptr [RDI]
    02856e59 ff 90 90        CALL       qword ptr [RAX + 0x290]
             02 00 00
    02856e5f 80 3d 26        CMP        byte ptr [DAT_06ba748c],0x0
             06 35 04 00
    02856e66 75 0b           JNZ        LAB_02856e73
    02856e68 48 89 df        MOV        RDI,RBX
    02856e6b 48 89 c6        MOV        RSI,RAX
    02856e6e e8 3d 00        CALL       FUN_02856eb0                                     undefined FUN_02856eb0()
             00 00
                         LAB_02856e73                                    XREF[1]:     02856e66(j)  
    02856e73 48 8b 7b 08     MOV        RDI,qword ptr [RBX + 0x8]
    02856e77 b9 01 00        MOV        ECX,0x1
             00 00
    02856e7c 31 f6           XOR        ESI,ESI
    02856e7e 31 d2           XOR        EDX,EDX
    02856e80 48 8b 07        MOV        RAX,qword ptr [RDI]
    02856e83 ff 90 58        CALL       qword ptr [RAX + 0x158]
             01 00 00
    02856e89 48 8b 3b        MOV        RDI,qword ptr [RBX]
    02856e8c e8 df 07        CALL       FUN_02857670                                     undefined FUN_02857670()
             00 00
    02856e91 c7 05 ed        MOV        dword ptr [DAT_06ba7488],0x1
             05 35 04 
             01 00 00 00
    02856e9b 48 83 c4 08     ADD        RSP,0x8
    02856e9f 5b              POP        RBX
    02856ea0 5d              POP        RBP
    02856ea1 c3              RET
    02856ea2 cc              ??         CCh
    02856ea3 cc              ??         CCh
    02856ea4 cc              ??         CCh
    02856ea5 cc              ??         CCh
    02856ea6 cc              ??         CCh
    02856ea7 cc              ??         CCh
    02856ea8 cc              ??         CCh
    02856ea9 cc              ??         CCh
    02856eaa cc              ??         CCh
    02856eab cc              ??         CCh
    02856eac cc              ??         CCh
    02856ead cc              ??         CCh
    02856eae cc              ??         CCh
    02856eaf cc              ??         CCh
Dr.Binary
You stopped this response.

how do i find the caller

Dr.Binary

Fast answer: you already found it — Ghidra printed it in the header you pasted.

FUN_02856e40    XREF[1]:    FUN_0042bb00:0042c951(c)

That's the complete caller list: FUN_02856e40 is called from exactly one place — the case-9 arm of the dispatcher inside FUN_0042bb00 (0042c951). So no menu code calls it directly. How to read those headers:

  • XREF[n]: addr(c) at the top of each function = every reference to it. Suffixes: (c) = call, (R)/(W) = read/write of data, (j) = jump. Same info via right-click symbol → References → Show References to, or Ctrl+Shift+F in the listing.

What this means + where to hunt next

Since nothing calls FUN_02856e40 directly and (per the DAT_06ba7488 xrefs) nothing outside the handlers writes the state, the kick must come from one of these three — check them in this order:

1. XREF headers of the sibling handlers (same trick, 30 seconds): FUN_02856d80, FUN_028560f0, FUN_02856180, FUN_02856410, FUN_028564e0, FUN_02856ac0, FUN_02855110. If any shows a caller other than FUN_0042bb00 — that's your debug-menu binding, and we patch there (Option A, done).

2. Adjacent globals — the struct-write blind spot. Your state block clearly spans 0x06ba7480–0x06ba74c0 (…7488 state u32, …748c flag, …748d flag, …74b0 flag). If some code initializes or writes the whole struct, Ghidra attributes it to the base symbol, not DAT_06ba7488. Check References to DAT_06ba7480 (and to 06ba748c/748d/74b0 — if a setter flips 748d, find its caller). A writer showing _DAT_06ba7488 (with the underscore-overlap warning you've been seeing) is also a candidate — those hide from the normal xref list.

3. Follow the menu string. Search → For Strings → "cameraDebug" → the DEBUGMENU.cameraDebug literal → open its xrefs → that lands you in the page registration; the page's command/exec callback is usually a few pointers away in the same descriptor table (DAT_066ee0a8 / DAT_066f0d98 from the eh_e8650 call). That callback is where a button in the menu would kick the machine — even if it currently only exists in debug-env builds.

If all of that comes up empty

Then release-mode code genuinely never kicks the machine, and we go with Option B: state injection at the read site — the dispatcher loads DAT_06ba7488 at 0042c2c0; a small patch there ("if 0, act as 9") enables the free cam in every race/replay without needing any caller.

For that I still need two things:

  1. Disassembly 0042c2b0 → 0042c960 (the load, the switch jump table, and all case arms) — so I can write exact patch bytes.
  2. FUN_02856d80 decompile — to confirm its write-back value at 02856e22 (whether a state-7 kick alone is complete, or state 9 is the proper entry, since 9 is the one that runs the vtable+0x158(obj,0,0,1) activation call).

Paste the handler XREF headers first — it's the fastest possible branch: one of them likely ends this hunt immediately.

/* WARNING: Removing unreachable block (ram,0x0042d205) / / WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_0042bb00(long param_1)

{ undefined2 uVar1; byte bVar2; byte bVar3; byte bVar4; long *plVar5; ulong *puVar6; undefined1 auVar7 [16]; ushort uVar8; undefined1 auVar9 [32]; undefined1 auVar10 [32]; char cVar11; char cVar12; undefined1 uVar13; int iVar14; int iVar15; undefined4 uVar16; uint uVar17; uint uVar18; undefined8 uVar19; undefined8 uVar20; long lVar21; long lVar22; long *plVar23; long *plVar24; ulong uVar25; undefined8 *puVar26; uint *puVar27; long *plVar28; long lVar29; long lVar30; undefined1 *puVar31; undefined *puVar32; long lVar33; undefined4 *puVar34; undefined4 *puVar35; undefined8 *puVar36; ulong uVar37; uint *puVar38; long *in_FS_OFFSET; bool bVar39; bool bVar40; float fVar41; float fVar42; double dVar43; undefined1 auVar44 [16]; undefined1 auVar45 [16]; undefined1 auVar46 [16]; undefined1 auVar47 [16]; undefined1 auVar48 [16]; undefined1 in_ZMM3 [64]; undefined1 local_1c0 [24]; undefined1 local_1a8 [24]; undefined1 local_190 [24]; undefined1 local_178 [24]; undefined1 local_160 [16]; long *plStack_150; long *plStack_148; long local_140; long *plStack_138; long lStack_130; long *plStack_128; undefined4 *local_120; undefined8 uStack_118; undefined3 uStack_110; undefined5 uStack_10d; double dStack_108; undefined8 uStack_100; undefined1 uStack_f8; undefined1 uStack_f7; undefined1 uStack_f6; undefined1 uStack_f5; undefined4 uStack_f4; undefined1 uStack_f0; undefined1 uStack_ef; undefined1 uStack_ee; undefined1 uStack_ed; double local_e8; undefined8 local_e0; undefined8 local_d8; undefined4 local_d0; undefined4 *local_c8; undefined4 uStack_c0; undefined4 uStack_bc; long lStack_b8; undefined8 uStack_b0; undefined8 uStack_a8; undefined4 local_a0; undefined *local_80; undefined8 *local_78; undefined1 local_70; ulong local_68; long local_60;

local_60 = ___stack_chk_guard; lVar30 = *(long *)(param_1 + 0x344f8); plVar5 = (long )(param_1 + 0x34480 + lVar30 * 0x28); if ((plVar5 == (long *)0x0) || (cVar11 = ((code )(*plVar5 + 0x158))(plVar5), cVar11 == '\0')) goto LAB_0042bb57; lVar21 = *(long )(param_1 + 0x3648); if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long *)(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = ((code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bba7; LAB_0042bbcc: uVar20 = 0x3f91156f80000000; } else { LAB_0042bba7: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bbcc; lVar21 = *(long )(param_1 + 0x3648); } if (((char )((long )(lVar21 + 0x10) + 0x75) != '\x01') || (cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)), cVar11 == '\0')) goto LAB_0042bbcc; uVar20 = 0; } lVar21 = *(long )(param_1 + 0x3648); lVar30 = param_1 + 0x34480 + lVar30 * 0x28; if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long )(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = (**(code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bc20; LAB_0042bc45: fVar41 = *(float *)(lVar30 + 0x20); } else { LAB_0042bc20: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bc45; lVar21 = *(long )(param_1 + 0x3648); } if ((char )((long )(lVar21 + 0x10) + 0x75) == '\0') goto LAB_0042bc45; cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)); if (cVar11 == '\0') { fVar41 = *(float *)(lVar30 + 0x20); } else { fVar41 = 0.0; } } lVar21 = *(long )(param_1 + 0x9f118); if (lVar21 != 0) { uVar19 = (**(code )(*plVar5 + 0x98))(plVar5); *(undefined8 )((long *)(lVar21 + 8) + 0x38) = uVar19; } uStack_f0 = 0; uStack_ef = 0; local_120 = (undefined4 *)0x0; uStack_118 = 0; lStack_130 = param_1 + 0x9a7f8; local_d8 = 0xbff0000000000000; local_d0 = 0; uStack_c0 = 0; uStack_bc = 0; lStack_b8 = SUB128(ZEXT812(0),4); uStack_b0 = 0; uStack_a8 = 0; local_a0 = 0; uStack_ee = *(undefined1 *)(lVar30 + 0x1c); dVar43 = (double)fVar41; uStack_110 = (undefined3)(param_1 + 0x2f800); uStack_10d = (undefined5)((ulong)(param_1 + 0x2f800) >> 0x18); lVar21 = param_1 + 800; auVar9.8_8 = (undefined8 )(param_1 + 0x346c8); auVar9.0_8 = **(undefined8 )(param_1 + 0x3648); lVar29 = param_1 + 0x34618; local_140 = *(undefined8 *)(param_1 + 0x2f9a8); dStack_108 = (double)(param_1 + 0x9b980); auVar9.16_8 = plVar5; auVar9.24_8 = 0; _local_160 = auVar9 << 0x40; uStack_100 = *(undefined8 *)(param_1 + 0x3650); uVar19 = *(undefined8 *)(param_1 + 0x3660); uStack_f8 = (undefined1)uVar19; uStack_f7 = (undefined1)((ulong)uVar19 >> 8); uStack_f6 = (undefined1)((ulong)uVar19 >> 0x10); uStack_f5 = (undefined1)((ulong)uVar19 >> 0x18); uStack_f4 = (undefined4)((ulong)uVar19 >> 0x20); plStack_138 = (long *)lVar21; plStack_128 = (long *)lVar29; local_e8 = dVar43; local_e0 = uVar20; local_c8 = local_120; thunk_FUN_0042d460(); local_80 = &DAT_066ee0a8; local_78 = &DAT_066f0d98; local_70 = 0; thunk_FUN_0042d460(); eh_e8650("DEBUGMENU.cameraDebug",&local_80,&DAT_066ee0a8); lVar33 = *(long *)local_160.8_8; *(undefined8 )((long )(param_1 + 0x36a8) + 0x2320) = local_160.8_8; if ((((char *)(lVar33 + 8) != '\0') && (plStack_148 != (long *)0x0)) && (cVar11 = ((code )(*plStack_148 + 0x10))(), cVar11 != '\0')) { lVar33 = *(long *)(param_1 + 0x36a8); iVar14 = ((code )(*plStack_148 + 0xc0))(); iVar15 = ((code )(plStack_148 + 0xd0))(); if (((iVar14 != -1) && (iVar15 != -1)) && ((int *)(lVar33 + 0x22f8) != iVar14 || *(int *)(lVar33 + 0x22fc) != iVar15)) { uVar19 = ((code )(plStack_148 + 200))(); FUN_00a1d2c0((undefined8 *)(lVar33 + 0x22c0),uVar19,iVar15); *(int *)(lVar33 + 0x22f8) = iVar14; *(int *)(lVar33 + 0x22fc) = iVar15; } cVar11 = ((code )(*plStack_148 + 0x1b8))(); cVar12 = ((code )(*plStack_148 + 0xe8))(); lVar33 = *(long *)(param_1 + 0x36a8); if ((cVar11 == '\0') || (uStack_ef = true, *(char *)(lVar33 + 0x2300) == '\x01')) { uStack_ef = *(char *)(lVar33 + 0x2301) != cVar12; } *(char *)(lVar33 + 0x2300) = cVar11; *(char *)(lVar33 + 0x2301) = cVar12; *(undefined4 *)(lVar33 + 0x22d0) = 0; uStack_118 = *(undefined8 *)(lVar33 + 0x22d8); local_160.0_8 = lVar33 + 0x2310; local_a0 = *(undefined4 *)(lVar33 + 0x2304); lVar22 = *(long *)(lVar33 + 0x22a0); local_d0 = (undefined4)lVar22; plVar23 = (long )(lVar33 + 0x22c0); if ((long *)*plVar23 != plVar23) { plVar28 = (long *)*plVar23; do { ((code **)((long *)plVar28[5] + 0x40))((long *)plVar28[5],local_160); plVar24 = (long )plVar28[2]; if ((char *)((long)plVar24 + 0x19) == '\0') { plVar28 = (long *)plVar24; if ((char *)((long)plVar28 + 0x19) == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; while (cVar11 == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; } } } else { do { plVar24 = (long )plVar28[1]; if ((char *)((long)plVar24 + 0x19) != '\0') break; bVar39 = plVar28 == (long *)plVar24[2]; plVar28 = plVar24; } while (bVar39); } plVar28 = plVar24; } while (plVar24 != plVar23); lVar33 = *(long *)(param_1 + 0x36a8); lVar22 = *(long )(lVar33 + 0x22a0); } if (lVar22 != 0) { FUN_004255e0(lVar33 + 0x20,local_160,lVar33 + 0x22c0); if (lVar22 * 0x8a0 != 0x8a0) { lVar33 = lVar33 + 0x8c0; lVar22 = lVar22 * 0x8a0 + -0x8a0; do { FUN_004255e0(lVar33,local_160,(long *)(param_1 + 0x36a8) + 0x22c0); lVar33 = lVar33 + 0x8a0; lVar22 = lVar22 + -0x8a0; } while (lVar22 != 0); } lVar33 = *(long *)(param_1 + 0x36a8); } ((code )((long **)(lVar33 + 0x22d8) + 0x20))((long **)(lVar33 + 0x22d8),local_160); } lVar33 = param_1 + 14000; if ((long *)(param_1 + 0x36c0) != 0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { lVar22 = eh_1f3f80(puVar34,"event"); uVar19 = *(undefined8 *)(lVar22 + 8); cVar11 = FUN_00b831c0(uVar19,"ready"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"interior"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"switch"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.start"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.end"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.error"); if (cVar11 == '\0') { ((code )((long **)(param_1 + 0x36c0) + 0x28)) ((long **)(param_1 + 0x36c0),puVar34); goto LAB_0042c563; } uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025dabf0(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1c0,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1c0; } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025da020(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1a8,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1a8; } } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025d9470(lVar33,uVar16,&local_80); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_190,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_190; } } else { cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),&DAT_049bf7ab); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,&DAT_049bf7ab); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x18))(plVar23,uVar16); } cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),"target"); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"target"); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x20))(plVar23,uVar16); } FUN_00b86810(local_178,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_178; } eh_1f5800(puVar31); } else { uVar19 = eh_1f3f80(puVar34,"valid"); uVar13 = FUN_003f4230(uVar19,0); *(undefined1 *)(param_1 + 0x375c) = uVar13; } } else { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"value"); uVar13 = FUN_003f4230(uVar19,0); ((code **)(*plVar23 + 0x10))(plVar23,uVar13); } LAB_0042c563: } } if (local_c8 != (undefined4 *)0x0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { eh_1f5800(puVar34); } uVar37 = lStack_b8 - (long)local_c8; puVar35 = local_c8; if (0xfff < uVar37) { puVar35 = (undefined4 )(local_c8 + -2); uVar37 = uVar37 + 0x27; } operator.delete(puVar35,uVar37); } uStack_f8 = 0; uStack_f7 = 0; uStack_f6 = 0; local_160.12_4 = 0; local_160.0_12 = ZEXT812(0); uStack_118 = 0; plStack_128 = (long *)0x0; uStack_f4 = 0; uStack_f0 = 0; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; lStack_130 = *(undefined8 *)(param_1 + 0x3650); plStack_150 = (long *)(undefined8 )(param_1 + 0x3648); plStack_148 = (long )(undefined8 *)(param_1 + 0x346c8); uStack_110 = (undefined3)lVar29; uStack_10d = (undefined5)((ulong)lVar29 >> 0x18); lVar22 = *(long *)(param_1 + 0x36a8); local_140 = lVar21; plStack_138 = plVar5; local_120 = (undefined4 *)lVar33; dStack_108 = dVar43; uStack_100 = uVar20; if (0 < *(int *)(lVar22 + 0x22a0)) { uVar20 = ((code **)((long *)(lVar22 + 0x20) + 0x18))(lVar22 + 0x20,0); local_160.8_8 = uVar20; } if ((DAT_067d1460 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_067d1460), iVar14 != 0)) { FUN_0097bf90(); __cxa_atexit(FUN_02f3c550,&DAT_067d1338,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_067d1460); } fVar42 = (float)FUN_0042e5e0(&DAT_067d1338,1,&local_80); puVar38 = (uint *)0x0; uStack_f8 = *(float *)(param_1 + 0x2f7e8) < fVar42; uStack_f7 = *(undefined1 *)(param_1 + 0x2f7e1); if (fVar42 <= *(float *)(param_1 + 0x2f7e8)) { uStack_f7 = 0; } *(float *)(param_1 + 0x2f7e8) = fVar42; *(undefined1 *)(param_1 + 0x2f7e1) = local_80.0_1; lVar21 = FUN_0042e050(&DAT_067d1338,0); if (lVar21 != 0) { if (DAT_067d1348 == 0) { fVar42 = 0.0; } else { local_80 = (undefined *)((ulong)local_80 & 0xffffffff00000000); FUN_0042e990(DAT_067d1348,0,&local_80); fVar42 = local_80.0_4 * 1000.0; } puVar27 = *(uint **)(lVar21 + 0x20); if ((puVar27 == *(uint **)(lVar21 + 0x28)) || (fVar42 < (float)*puVar27)) { puVar38 = (uint *)0x0; } else { do { puVar38 = puVar27; puVar27 = puVar38 + 4; if (puVar27 == *(uint **)(lVar21 + 0x28)) break; } while ((float)*puVar27 <= fVar42); uStack_f6 = *(uint )(param_1 + 0x2f7f0) != puVar38; uVar1 = *(undefined2 *)((long)puVar38 + 10); auVar44.2_2 = uVar1; auVar44.0_2 = uVar1; auVar44.4_2 = uVar1; auVar44.6_2 = uVar1; auVar44.8_2 = uVar1; auVar44.10_2 = uVar1; auVar44.12_2 = uVar1; auVar44.14_2 = uVar1; auVar44 = vpand_avx(auVar44,_DAT_046faf40); uStack_f4 = auVar44.0_4; uStack_f0 = (undefined1)puVar38[1]; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; } } plStack_128 = (long *)(param_1 + 0x37a0); (uint **)(param_1 + 0x2f7f0) = puVar38; local_160.0_8 = param_1 + 0x3780; if ((char )(param_1 + 0x2f7e0) == '\x01') { FUN_02383210((undefined8 *)(param_1 + 0x3790),local_160); } if ((DAT_06ba7900 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_06ba7900), iVar14 != 0)) { FUN_00b7f380(&DAT_06ba73a0); __cxa_atexit(FUN_02854f30,&DAT_06ba73a0,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_06ba7900); } auVar9 = _local_160; local_160.0_8 = lVar33; auVar10 = _local_160; plStack_148 = auVar9.24_8; local_160 = auVar10.0_16; plStack_150 = plVar5; local_160.8_8 = lVar29; switch(DAT_06ba7488) { case 1: goto LAB_0042c932; case 2: FUN_028560f0(lVar29,plVar5); break; case 3: FUN_02856180(lVar33,lVar29); break; case 4: FUN_02856410(lVar29); break; case 5: FUN_028564e0(local_160); break; case 6: FUN_02856ac0(local_160); break; case 7: uVar20 = 1; goto LAB_0042c927; case 8: uVar20 = 0; LAB_0042c927: FUN_02856d80(local_160,uVar20); goto LAB_0042c932; case 9: FUN_02856e40(local_160); LAB_0042c932: FUN_02855110(local_160); } lVar21 = ((code )(plVar5 + 0xa8))(); if (lVar21 < 1) { if ((char *)(param_1 + 0x9a8d2) == '\0') { fVar42 = *(float *)(param_1 + 0x9a910); } else { fVar42 = 0.0; } if (1.0 <= fVar42) { fVar42 = 1.0; } lVar21 = (long)(fVar42 * (float)lVar21); } else { plVar23 = (long *)((code )(*plVar5 + 0xb0))(); iVar14 = ((code )(plVar23 + 0x30))(plVar23); lVar21 = (long)iVar14 - (long)(int )((long )((long )(param_1 + 0x346e8) + 8) + 0xd0); } eh_fb2a0((undefined4 *)(param_1 + 0x9f074),param_1 + 0x9a980,lVar21); bVar39 = false; lVar21 = *(long )((long )((long )(param_1 + 0x34620) + 0xc0) + (long)(int )((long )(param_1 + 0x34620) + 0xe0) * 0x10); if (((char )(lVar21 + 0x130374) == '\x01') && ((long *)(lVar21 + 0x1302e0) != 0)) { bVar39 = *(int *)(lVar21 + 0x130340) == 6; } uVar20 = *(undefined8 *)(lVar30 + 8); iVar14 = ((code **)(*plVar5 + 0x28))(); auVar9 = _local_160; local_160.2_6 = 0; local_160.0_2 = (ushort)iVar14; stack0xfffffffffffffea8 = auVar9.8_24; if (0 < iVar14) { iVar15 = 0; lVar30 = *in_FS_OFFSET; LAB_0042cc88: plVar23 = *(long )(lVar30 + -0x98); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { puVar36 = (undefined8 *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((puVar36 + 9 <= (undefined8 *)plVar28[2]) && (plVar28[1] = (long)(puVar36 + 9), puVar36 != (undefined8 *)0x0)) goto LAB_0042ccd3; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar36 = (undefined8 *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[1] = puVar26 + 3; puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < puVar36 + 9) || (puVar26[1] = puVar36 + 9, puVar36 == (undefined8 *)0x0)) { puVar36 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x48,8); } goto LAB_0042ccd3; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); } LAB_0042cfdd: eh_42ba0(local_160); FUN_0042d710(param_1 + 0x9a660,param_1 + 0x34810); cVar11 = ((code )(*plVar5 + 0x10))(); if (cVar11 == '\0' || *(long *)(param_1 + 0x3660) == 0) goto LAB_0042bb57; uVar18 = ((code **)(*plVar5 + 0x30))(); auVar44 = in_ZMM3.0_16; uVar17 = 0xffffffff; if (0 < (int)uVar18) { lVar30 = 8; uVar37 = 0; do { lVar21 = *(long )(param_1 + 0x3660); uVar17 = (uint)uVar37; if ((((0x2f < uVar37) || (((uint )(lVar21 + 0x668 + (uVar37 >> 5) * 4) >> (uVar17 & 0x1f) & 1) == 0)) && (lVar29 = (long)(char *)(lVar21 + 0x608 + uVar37), -1 < lVar29)) && ((plVar5 = *(long )(lVar30 + lVar21 + lVar29 * 8), plVar5 != (long *)0x0 && (cVar11 = ((code )(*plVar5 + 0x250))(plVar5), cVar11 != '\0')))) { cVar11 = ((code **)(plVar5 + 0x1f8))(plVar5); auVar44 = in_ZMM3.0_16; if (cVar11 == '\0') break; } auVar44 = in_ZMM3.0_16; uVar37 = uVar37 + 1; lVar30 = lVar30 + 0x20; uVar17 = 0xffffffff; } while (uVar18 != uVar37); } if ((((long *)(param_1 + 0x3660) == 0) || (lVar30 = *(long )((long *)(param_1 + 0x3660) + 0x678), (int)uVar17 < 0 || lVar30 == 0)) || (plVar5 = *(long **)(lVar30 + 8), (int)plVar5[1] <= (int)uVar17)) { LAB_0042d0e2: _DAT_067100f0 = 0.0; _DAT_067100f4 = 0; _DAT_067100f8 = 0; _DAT_067100fc = 0; DAT_06710100 = 0; DAT_06710104.0_1 = 0; DAT_06710104.3_1 = 1; DAT_06710104.1_1 = '\0'; } else { lVar30 = plVar5; if ((long *)(lVar30 + 0x4b70 + (ulong)uVar17 * 0x4f50) == 0) goto LAB_0042d0e2; auVar46[8] = 0x15; auVar46.0_8 = 0x1515151515151515; auVar46[9] = 0x15; auVar46[10] = 0x15; auVar46[0xb] = 0x15; auVar46[0xc] = 0x15; auVar46[0xd] = 0x15; auVar46[0xe] = 0x15; auVar46[0xf] = 0x15; auVar7 = vpcmpeqd_avx(auVar44,auVar44); lVar30 = *(long *)(lVar30 + (ulong)uVar17 * 0x4f50 + 0x4b88); _DAT_067100f0 = *(float *)(lVar30 + 0x360) + *(float *)(lVar30 + 0x564); _DAT_067100f4 = *(undefined4 *)(lVar30 + 0x100c); _DAT_067100f8 = *(undefined4 *)(lVar30 + 0x1000); _DAT_067100fc = *(undefined4 *)(lVar30 + 0xffc); DAT_06710100 = *(undefined4 *)(lVar30 + 0x10b0); DAT_06710104.0_1 = *(undefined1 *)(lVar30 + 0x10d0); DAT_06710104.3_1 = *(byte *)(lVar30 + 9) >> 2 & 1; bVar2 = *(byte *)(lVar30 + 0x2fb); bVar3 = *(byte *)(lVar30 + 0x4ff); auVar44 = vpinsrb_avx(ZEXT116(bVar2),(uint)bVar3,1); auVar45 = vpinsrb_avx(ZEXT116(bVar2),(uint)(bVar2 & 0xfe),1); bVar2 = *(byte *)(lVar30 + 0x703); bVar4 = *(byte *)(lVar30 + 0x907); auVar45 = vpinsrb_avx(auVar45,(uint)bVar3,2); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar3 & 0xfe),3); auVar44 = vpinsrb_avx(auVar44,(uint)bVar2,2); auVar45 = vpinsrb_avx(auVar45,(uint)bVar2,4); auVar48 = vpinsrb_avx(auVar44,(uint)bVar4,3); auVar44 = vpmaxub_avx(auVar48,auVar46); auVar44 = vpcmpeqb_avx(auVar48,auVar44); auVar48 = vpmovzxbd_avx(auVar48); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar2 & 0xfe),5); auVar47.8_4 = 0x100402; auVar47.0_8 = 0x10040200100402; auVar47.12_4 = 0x100402; auVar45 = vpinsrb_avx(auVar45,(uint)bVar4,6); auVar44 = vpmovsxbd_avx(auVar44 ^ auVar7); auVar7 = vpinsrb_avx(auVar45,(uint)(bVar4 & 0xfe),7); auVar45 = vpsrlvd_avx2(auVar47,auVar48); auVar48.8_8 = 0x204020402040204; auVar48.0_8 = 0x204020402040204; auVar44 = vpand_avx(auVar44,auVar45); auVar45 = vpslld_avx(auVar44,0x1f); auVar44 = vpcmpeqb_avx(auVar7,auVar48); DAT_06710104.1_1 = '\x01'; if ((((SUB161(auVar45 >> 0x1f,0) & 1) == 0 && (SUB161(auVar45 >> 0x3f,0) & 1) == 0) && (SUB161(auVar45 >> 0x5f,0) & 1) == 0) && -1 < auVar45[0xf]) { DAT_06710104.1_1 = ((((((((SUB161(auVar44 >> 7,0) & 1) != 0 || (SUB161(auVar44 >> 0xf,0) & 1) != 0) || (SUB161(auVar44 >> 0x17,0) & 1) != 0) || (SUB161(auVar44 >> 0x1f,0) & 1) != 0) || (SUB161(auVar44 >> 0x27,0) & 1) != 0) || (SUB161(auVar44 >> 0x2f,0) & 1) != 0) || (SUB161(auVar44 >> 0x37,0) & 1) != 0) || (SUB161(auVar44 >> 0x3f,0) & 1) != 0) * '\x02'; } } DAT_06710104.2_1 = DAT_066ea385; local_160.8_8 = &LAB_0298bb50; local_160.0_8 = &PTR_FUN_0546e2b0; plStack_128 = (long *)local_160; lVar30 = *(long *)(param_1 + 0xb98); plVar5 = (long *)(lVar30 + 0x5a0); if (plVar5 == (long *)local_160) { FUN_0042d400(local_160,0); goto LAB_0042bb57; } plVar23 = *(long )(lVar30 + 0x5d8); if (plVar23 != (long *)0x0) { ((code **)(*plVar23 + 0x20))(plVar23,plVar23 != plVar5); *(undefined8 *)(lVar30 + 0x5d8) = 0; if (plStack_128 == (long *)0x0) goto LAB_0042bb57; if (plStack_128 != (long *)local_160) { *(long )(lVar30 + 0x5d8) = plStack_128; goto LAB_0042bb57; } } uVar20 = ((code )(*plStack_128 + 8))(plStack_128,plVar5); *(undefined8 *)(lVar30 + 0x5d8) = uVar20; if (plStack_128 != (long *)0x0) { ((code **)(*plStack_128 + 0x20))(plStack_128,plStack_128 != (long )local_160); } LAB_0042bb57: if (___stack_chk_guard != local_60) { / WARNING: Subroutine does not return */ __stack_chk_fail(); } return; LAB_0042ccd3: *puVar36 = &DAT_0546e0b8; puVar36[1] = param_1; *(int *)(puVar36 + 2) = iVar15; *(float *)((long)puVar36 + 0x14) = fVar41; puVar36[3] = param_1 + 0x34740; puVar36[4] = plVar5; puVar36[5] = param_1 + 0x36a0; puVar36[6] = uVar20; *(bool *)(puVar36 + 7) = bVar39; LOCK(); *(int *)(*plVar23 + 0x10) = *(int *)(*plVar23 + 0x10) + 1; UNLOCK(); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { plVar24 = (long *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((plVar24 + 3 <= (long *)plVar28[2]) && (plVar28[1] = (long)(plVar24 + 3), plVar24 != (long *)0x0)) break; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar26[1] = puVar26 + 3; plVar24 = (long *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < plVar24 + 3) || (puVar26[1] = plVar24 + 3, plVar24 == (long *)0x0)) { plVar24 = (long )eh_dc670((undefined8 *)(*plVar23 + 8),0x18,8); } goto LAB_0042cd5b; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); LAB_0042cd5b: lVar21 = plVar23[1]; *plVar24 = *plVar23; plVar24[1] = lVar21; plVar24[2] = 0; puVar36[8] = plVar24; puVar6 = (ulong *)plVar23[1]; lVar21 = DAT_06c12440; if (puVar6 != (ulong *)0x0) { uVar37 = *puVar6; do { LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | uVar37 & 0xffffffffffff0000; uVar25 = uVar37; } UNLOCK(); lVar21 = DAT_06c12440; uVar37 = uVar25; } while (!bVar40); } do { LOCK(); bVar40 = lVar21 != DAT_06c12440; lVar29 = lVar21 + 1; if (bVar40) { lVar21 = DAT_06c12440; lVar29 = DAT_06c12440; } DAT_06c12440 = lVar29; UNLOCK(); } while (bVar40); uVar37 = (ulong)((uint)lVar21 & 0x3ff); uVar8 = (ushort)((uint)lVar21 >> 9); while ((ushort *)(&DAT_06c12480 + uVar37 * 2) != (uVar8 & 0xfffe)) { nidf_libc_0xf75f5a605191bff9(); } *(undefined1 **)(&DAT_06c13c80 + uVar37 * 0x18) = &LAB_019038f0; *(undefined8 **)(&DAT_06c13c88 + uVar37 * 0x18) = puVar36; *(undefined1 **)(&DAT_06c13c90 + uVar37 * 0x18) = local_160; *(ushort *)(&DAT_06c12480 + uVar37 * 2) = uVar8 | 1; uVar17 = DAT_06c25cc0; do { if ((short)uVar17 < 1) goto LAB_0042cc7a; LOCK(); bVar40 = uVar17 != DAT_06c25cc0; uVar18 = uVar17 - 1 & 0xffff | uVar17 & 0xffff0000; if (bVar40) { uVar17 = DAT_06c25cc0; uVar18 = DAT_06c25cc0; } DAT_06c25cc0 = uVar18; UNLOCK(); } while (bVar40); LOCK(); _DAT_06c25d00 = _DAT_06c25d00 + 1; UNLOCK(); if (DAT_06c25d08 != 0) { if (DAT_06c25d08 < 2) { nidf_libc_0x4e94ff1a958ba44a(); } else { nidf_libc_0x052e6e6b37016bf9(&DAT_06c25d00,1); } } LAB_0042cc7a: iVar15 = iVar15 + 1; if (iVar15 == iVar14) goto LAB_0042cfdd; goto LAB_0042cc88; }

Dr.Binary

That's the same decompile you pasted earlier — but reading it again against everything we've since learned produces a new, near-zero-effort patch candidate that doesn't need the switch disassembly at all. Two structural facts from this function make it work:

Fact 1 — state 1 is sticky and safe. Case 1 runs only FUN_02855110(ctx) — the per-frame debug-camera apply — and FUN_02855110 is not among the writers of DAT_06ba7488. So once the state is 1, nothing in this path ever resets it (only an explicit case-8 disable would).

Fact 2 — everything else already runs without the state machine. The debug-menu registration, the debug window/viewport setup (the big plStack_148 block), and the event processing all execute every frame under the top gate (camera table entry valid + vtable+0x158``), independent of DAT_06ba7488. The state machine only gates the transition handlers (2–9) and the steady-state apply (1). State 0 = "everything primed, but never applied."

The 4-byte experiment: preset the state to 1

DAT_06ba7488 is a static initialized to 00000000. Change its initial value to 01000000 and the debug camera's steady-state update runs wherever the top gate passes:

vaddr 0x06BA7488:  00 00 00 00  →  01 00 00 00

How: in Ghidra, navigate to 0x06ba7488 in the listing, right-click → Patch Instruction won't work for data — instead use the Bytes view (Window → Bytes), select the 4 bytes, and overwrite with 01 00 00 00. For a hex-editor patch of the actual file, you need the file offset, not the vaddr: click the address in the listing and read the offset from the Bytes view header (...0x06ba7488 maps to a file offset via the PT_LOAD segment — Ghidra shows the mapping directly in the Bytes window's address column annotations). Backup the eboot first.

What to expect:

  • Best case: in a race/replay you get the debug camera (free view) — because the window/menu/event machinery was already live and only the apply was missing.
  • Nothing happens: the top gate is failing in release env — i.e., the entry at param_1+0x34480 + idx*0x28 selected by +0x344f8 isn't the debug camera (or vtable+0x158 returns 0). Then the camera never gets selected, and we're back to needing either the debug environment string or the trigger hunt.
  • Crash: unlikely — case 1 only calls FUN_02855110 on a validated object — but revert by restoring 00000000.

Revert = restore the 4 zero bytes. Fully reversible, no code bytes touched.

While you test, two 2-minute checks

  1. In-game: enter a race, then open your debug menu and scroll all pages — cameraDebug registers only while a scene is running, so it can't exist at the world map. If a Camera page exists there, its toggle is the intended enable and none of this patching is needed.
  2. In Ghidra: Search → For Strings → "DEBUGMENU." — enumerate every debug page registered in your build. That list tells us definitively whether cameraDebug (and what else) ships in release mode.

If the 4-byte patch does nothing

Then paste these two things and I'll finish Option B (state injection at the dispatch):

  • FUN_02856d80 decompile — specifically the constant it writes at 02856e22 (decides whether a kick is state 7 or 9),
  • the raw listing from 0042c2b0 to 0042c960 in FUN_0042bb00 — open the listing, click 0042c2b0, select down to 0042c960, copy-paste the text (it's the load of DAT_06ba7488, the jump table, and the case arms). From that I'll write the exact patch bytes for "if state == 0, act as 9".

And the usual: offline only, back up the eboot and your save before patching.

this is the static eboot how do i get the correct address at runtime ps5 gt7

Dr.Binary

Short version: runtime address = module base + static vaddr (PS5 game ELFs are position-independent, loaded at an ASLR base each launch — the static addresses you see in Ghidra are offsets from that base). You never patch a "runtime address" directly; you patch base + offset, and the tooling resolves the base for you.

1. Confirm the image base is 0 (one-time check)

In Ghidra: Window → Memory Map. If the first block starts at 0x00000000 (typical for decrypted PS5 eboot ELFs), then:

module_offset = Ghidra_vaddr          # e.g. 0x06BA7488 → offset 0x6BA7488
runtime_addr  = module_base + module_offset

2. Getting module_base at runtime on PS5

If you're using GT7Patcher (which you are, on 1.71): you don't need the base at all — the engine resolves the eboot module base itself and applies patches as image offsets. Your 4-byte state patch is just a patch entry at offset 0x6BA7488 (see the XML format below). Same for any code patch — that's why every published GT7 patch is a flat offset.

If you're writing your own payload (ps5-payload-sdk):

#include <ps5/kernel.h>
KernelModuleInfo info;
sceKernelFindModuleByName("eboot.bin", &info);   // main module
void *base = info.start;                          // runtime base
uint8_t *target = (uint8_t *)base + 0x6BA7488;    // = your Ghidra address

(Exact API name/struct per the SDK version you use; some payloads instead walk the module list via sceKernelGetModuleList.)

If you're using a cheat/memory tool without module resolution: pattern-scan instead — pick 16–32 bytes around the target from the Ghidra listing (pick something unique: mixed immediates + opcode bytes), search the process memory, and found_addr - pattern_offset_in_range = runtime address of that point. Re-derive each launch; the base changes with ASLR.

3. The trap: file offset ≠ vaddr

There are two different "offsets" and mixing them is the #1 mistake:

You're patching...Offset typeExample for the state global
The file on disk (hex editor, GT7Patcher "file patch" / File-Cleaner-verified eboot edits)file offset = block_file_off + (vaddr − block_vaddr) from Memory Map0x6BA7488 maps through the data segment's header — not necessarily 0x6BA7488
Process memory at runtime (patch engine, payload, cheat engine)image offset = the vaddr itself (base-0 ELF)0x6BA7488

For PS4 GT7 v1.18 the community's "Offset: 6095990" was a file offset in the decrypted ELF. In Ghidra, click 0x06ba7488 in the listing and look at the Bytes view — its header/annotations show the corresponding file offset directly. Code in the first RX segment often has file offset ≈ vaddr, but the data segment almost never does.

4. Concrete patch entries for your case

GT7Patcher-style (runtime, image offset):

- [ bytes, 0x6BA7488, "01000000" ]     # debug camera state = 1 (steady/apply)

Hex-editor (file): look up the file offset for 0x06ba7488 per §3, write 01 00 00 00.

5. Fastest way to get exact numbers

Upload the decrypted eboot to the workspace and I'll parse the program headers and hand you:

  • the exact file offset for 0x06BA7488 (and 0x06ba748c/748d/74b0 flags if you want the companion toggles),
  • ready-to-use patch entries in GT7Patcher XML format,
  • optionally the release→debug environment string offset for 1.71 so you can try the full debug menu route in the same session.

That kills all the mapping guesswork in one pass — and you'll want it anyway if the state preset does nothing and we move on to the dispatch-injection patch, since those code bytes need the same offset math.

4 byte patch doesnt do anything.

void FUN_02856d80(undefined8 *param_1,int param_2)

{ long lVar1; ulong uVar2; ulong uVar3;

uVar3 = DAT_06ba7498; if (param_2 == 0) { lVar1 = (**(code )(*(long *)param_1[1] + 0x1b8))((long *)param_1[1],0); uVar3 = lVar1 + DAT_06ba74a0 + DAT_06ba7498; uVar2 = ((code )(*(long *)param_1[1] + 0x290))((long *)param_1[1],0,8,0); if (uVar3 <= uVar2) { uVar3 = uVar2; } } if (DAT_06ba748c == '\0') { FUN_02856eb0(param_1,uVar3); } ((code **)(*(long *)param_1[1] + 0x158)) ((long *)param_1[1],0,((uVar3 - DAT_06ba74a0) * 1000) / 0x3c,0); FUN_02857670(*param_1); DAT_06ba7488 = 1; return; } *

Dr.Binary

This function rewrites my state-machine interpretation — and it changes what we're even looking at:

FUN_02856d80 decoded: this is a timeline seek, not enable/disable

uVar3 = DAT_06ba7498;                                  // saved "target frame"
if (param_2 == 0) {                                    // case 8 variant:
    cur = obj->vtable[0x1b8](0);                       //   current position
    uVar3 = cur + DAT_06ba74a0 + DAT_06ba7498;         //   shifted target
    now = obj->vtable[0x290](0, 8, 0);                 //   "now" (frames)
    if (uVar3 <= now) uVar3 = now;                     //   clamp to now
}
if (DAT_06ba748c == 0)
    FUN_02856eb0(ctx, uVar3);                          // commit the target
obj->vtable[0x158](obj, 0, ((uVar3 - DAT_06ba74a0) * 1000) / 0x3c, 0);
                                                       // seek: (frames·1000)/60 = milliseconds
FUN_02857670(*param_1);                                // emit command message
DAT_06ba7488 = 1;                                      // BOTH variants end in state 1

The ×1000/0x3c is the giveaway: frames at 60 fps converted to milliseconds. So vtable+0x158(obj, 0, ms, flag) is a seek (state 9's call was (0, 0, 1) = "jump to live/zero"), DAT_06ba7498/74a0 are frame-based timeline positions, and cases 7/8 are "jump the camera to time T" — both landing in state 1. FUN_02856eb0 (called from state 9 with vtable+0x290 = "now") is almost certainly the writer of DAT_06ba7498 — i.e., state 9 = "mark current replay time as the scrub target."

Revised verdict: DEBUGMENU.cameraDebug is a replay-camera-work debugger — timeline scrubbing, motion-rig events (motion.start/end/error), toast feedback. It's the tool PD devs used to debug cinematic camera keyframing, not a free spectator camera. That reframes your goal.

Why the 4-byte patch did nothing — two candidates

  1. Offset mismatch (check first, 30 seconds): did you patch at the file offset or at the raw vaddr? If you hex-edited the eboot at 0x6BA7488 without converting vaddr→file offset through the data segment's program header, you wrote 4 bytes somewhere harmless. Verify in Ghidra's Bytes view that the file bytes at the mapped offset actually show 01 00 00 00.
  2. The top gate fails in release env: the entire subsystem (including case 1) only runs when *(param_1+0x34480 + idx*0x28) is a valid object and vtable+0x158 passes — i.e., the debug camera object must exist and be selected. If release mode never constructs/selects it, state 1 never gets consumed — patch was correct but unreachable.

Where this leaves the hunt

Given what this subsystem actually is, I'd stop pushing on cameraDebug and re-scope:

  1. Enumerate the debug pages: Search → For Strings → "DEBUGMENU." — paste the list. If there's a free-camera page, it'll be named there (and cameraDebug's sibling pages tell us what the in-race debug menu actually offers).
  2. Search for a free camera directly: strings like FreeCamera, free_cam, CameraFree, photoDebug, Spectator, DebugCam — PD ships lots of dormant tooling.
  3. The outstanding handler XREFs (asked twice now, still pending): caller lists of FUN_028560f0, FUN_02856180, FUN_02856410, FUN_028564e0, FUN_02856ac0, FUN_02855110 — one non-dispatcher caller anywhere = the actual menu binding for this subsystem, which also tells us whether it's even wired in release env.

Also worth knowing: what were you actually trying to patch — a hex edit of the file (which offset did you use?) or a runtime patch entry through GT7Patcher? That determines whether reason #1 above is even in play.

And for honesty's sake: if the real goal is a free camera while driving, the shortest known-good paths in GT7 are the debug environment's replay/photo camera tooling (release→debug string) rather than this scrubber — the string patch on 1.71 is the same recipe as the v1.18 one, just a different offset, and I can locate it from the eboot if you upload it.

  • WARNING: Globals starting with '_' overlap smaller symbols at the same address */

undefined8 FUN_02742790(undefined8 *param_1,int param_2,undefined8 param_3,undefined8 param_4, undefined1 param_5)

{ undefined1 auVar1 [16]; undefined1 uVar2; undefined8 uVar3; uint uVar4; uint uVar5; undefined8 uVar6; undefined8 extraout_XMM0_Qb; undefined1 auVar7 [64]; undefined1 auVar8 [64]; undefined1 auVar9 [16]; undefined1 local_68 [16]; undefined4 local_58; undefined4 local_54; undefined1 local_50; undefined1 local_4f; undefined1 local_4e; undefined1 local_4d; undefined4 local_4c; undefined4 local_48; long local_38; undefined1 extraout_var [56]; undefined1 extraout_var_00 [56];

uVar4 = param_2 + 1; local_38 = ___stack_chk_guard; uVar3 = 0xfffffffe; if (uVar4 < 0x15) { if (param_2 == -1) { param_2 = *(int )((long)param_1 + 0x1c4); } if (-1 < param_2) { local_4c.0_2 = CONCAT11(1,((uint *)(param_1 + 0x38) >> (uVar4 & 0x1f) & 1) != 0); local_4c = (uint)(ushort)local_4c; uVar3 = FUN_003f0670(param_3,"throttle"); uVar6 = FUN_004ea2e0(0,uVar3); uVar3 = FUN_003f0670(param_3,"brake"); uVar4 = FUN_004ea2e0(0,uVar3); uVar3 = FUN_003f0670(param_3,"steering"); uVar5 = FUN_004ea2e0(0,uVar3); uVar3 = FUN_003f0670(param_3,"side_brake"); auVar7.0_8 = FUN_004ea2e0(0,uVar3); auVar7.8_56 = extraout_var; auVar1.8_8 = extraout_XMM0_Qb; auVar1.0_8 = uVar6; auVar1 = vinsertps_avx(auVar1,ZEXT416(uVar4),0x10); auVar1 = vinsertps_avx(auVar1,ZEXT416(uVar5),0x20); auVar1 = vinsertps_avx(auVar1,auVar7.0_16,0x30); auVar1 = vmaxps_avx(auVar1,_DAT_046ff8d0); local_68 = vminps_avx(auVar1,_DAT_04702680); uVar3 = FUN_003f0670(param_3,&DAT_04846d32); local_58 = FUN_003e8a80(uVar3,0); uVar3 = FUN_003f0670(param_3,"local_frame_count"); local_54 = FUN_004ee510(uVar3,0); uVar3 = FUN_003f0670(param_3,"cancel_tcs"); local_4f = FUN_003e8a80(uVar3,0); uVar3 = FUN_003f0670(param_3,"cancel_asm"); local_4e = FUN_003e8a80(uVar3,0); uVar3 = FUN_003f0670(param_3,"cancel_extra_mu"); local_4d = FUN_003e8a80(uVar3,0); uVar3 = FUN_003f0670(param_3,"gear_shift"); local_50 = FUN_003e8a80(uVar3,0); uVar3 = FUN_003f0670(param_3,"steer_lpf"); uVar2 = FUN_003e8a80(uVar3,0); local_4c.0_3 = CONCAT12(uVar2,(ushort)local_4c); uVar3 = FUN_003f0670(param_3,"boost100"); uVar5 = FUN_003e8a80(uVar3,0); uVar5 = ~((int)uVar5 >> 0x1f) & uVar5; uVar4 = 0x96; if ((int)uVar5 < 0x96) { uVar4 = uVar5; } local_4c = CONCAT13((char)uVar4,(undefined3)local_4c); uVar3 = FUN_003f0670(param_3,"shift_up_mod"); auVar8.0_8 = FUN_004ea2e0(0,uVar3); auVar8.8_56 = extraout_var_00; auVar9.0_12 = ZEXT812(0); auVar9.12_4 = 0; auVar1 = vmaxss_avx(auVar9,auVar8.0_16); local_48 = auVar1.0_4; uVar3 = FUN_026fefa0(param_1,param_2,local_68,param_4,param_5); } } if (___stack_chk_guard == local_38) { return uVar3; } / WARNING: Subroutine does not return */ __stack_chk_fail(); }

*_

Dr.Binary

Different subsystem entirely — and a much more interesting one. FUN_02742790 is the drive-command executor: it takes a parameter dictionary and injects driver inputs into a car slot.

Decoded

// param_1 = driver-controller object, param_2 = car slot, param_3 = parameter dict
if (param_2 + 1 < 0x15) {                  // car index ∈ [-1 .. 19] — a full 20-car grid
    if (param_2 == -1)
        param_2 = *(int *)(obj + 0x1c4);   // -1 = "default car" slot
    if (param_2 >= 0) {
        flag = (obj->bitmask@+0x38 >> (param_2+1)) & 1;   // per-slot enable bit

        throttle   = clamp01(dict["throttle"]);    // 4 floats packed,
        brake      = clamp01(dict["brake"]);       // clamped [0,1] via
        steering   = clamp01(dict["steering"]);    // vmaxps/vminps
        side_brake = clamp01(dict["side_brake"]);

        local_58   = dict[DAT_04846d32];           // ← unknown key name, check the string
        local_54   = dict["local_frame_count"];    // int
        cancel_tcs = dict["cancel_tcs"];           // bools
        cancel_asm = dict["cancel_asm"];
        cancel_mu  = dict["cancel_extra_mu"];
        gear_shift = dict["gear_shift"];
        steer_lpf  = dict["steer_lpf"];
        boost100   = min(dict["boost100"], 150);   // capped at 0x96
        shift_up_mod = max(0.0, dict["shift_up_mod"]);

        FUN_026fefa0(*param_1, param_2, packed_inputs, param_4, param_5);  // ← the actual input writer
    }
}
return -2 if index invalid;

Packed command struct: [throttle, brake, steering, side_brake] floats + [slot-flag, 1, steer_lpf, boost100] bytes + shift_up_mod float.

Why this matters for your hunt

  1. This is the endpoint of the dict-command system — the same mechanism the cameraDebug page uses ("switch" events with "target", read via identical dict lookups). So the debug command pipeline is real and parameterized: pages send named-key commands, executors like this consume them.
  2. It's the AI/driver-injection path — whoever calls this can drive any car on the grid programmatically: throttle/brake/steer per slot, TC/ASM cancellation, boost. That's the B-Spec/demo/remote-debug driver. If your end goal shifted from "free camera" to "control the car" (which the community debug-menu videos do with a driver page), this function is the whole feature — patch or command it and you have remote control of any slot.
  3. It proves release-mode reachability is worth re-checking — if you found this near debug-menu code, the DEBUGMENU tree in your build is richer than "General/Global/Demo".

To pin it down, paste:

  1. XREFs of FUN_02742790 — the callers are the command router (debug menu handler vs. AI driver vs. network debug channel). This also finally answers the "who kicks the camera state machine" question, since they're likely siblings in the same dispatcher.
  2. The string at DAT_04846d32 — click it in Ghidra and read what key it is.
  3. FUN_026fefa0 decompile — the actual input applier; that's where an autopilot patch would live (e.g., force throttle=1.0 on slot 0).
  4. Still outstanding from before: the DEBUGMENU.* string list, and whether you've spotted a Camera/Driver page in-race in your debug menu.

One caution: driving commands on your own car in online lobbies = instantaneous ban territory. Offline/test modes only.*

void FUN_025af4c0(long param_1,long param_2,byte param_3,int param_4,byte param_5)

{ long lVar1; char *pcVar2;

FUN_00566560(); if (*(long )(param_2 + 0x390 + (ulong)(uint)(param_4 << 4)) == 0) { eh_af90(param_1,"PLAYER"); } else { lVar1 = param_2 + 0x3d8 + (ulong)(uint)(param_4 * 0x30); eh_af90(param_1,lVar1); eh_af90(param_1 + 0x20,lVar1 + 0x20); if ((long *)(param_1 + 0x10) != 0) goto LAB_025af56b; pcVar2 = "Player.BSpec"; if (param_5 != 0) { pcVar2 = "Player.ASpec"; } eh_af90(param_1,pcVar2); } eh_af90(param_1 + 0x20,&DAT_048b0fe2); LAB_025af56b: *(byte )(param_1 + 0x40) = param_3 & param_5; return; } can we enable the full bspec mode?

Dr.Binary

Short decode first, then the answer to "can we enable it":

What FUN_025af4c0 is

It's the driver nameplate/label builder — purely cosmetic, not the gate:

slot = param_4;
if (*(long *)(ctx + 0x390 + slot*0x10) == 0)
    emit("PLAYER");                          // no driver profile → generic label
else {
    emit(ctx + 0x3d8 + slot*0x30);           // driver name      (0x30-stride array)
    emit(ctx + 0x3f8 + slot*0x30);           // surname
    emit(param_5 ? "Player.ASpec" : "Player.BSpec");   // human vs AI-driver tag
}
out[0x40] = param_3 & param_5;               // combined flag for the caller

So it tags drivers as A-Spec (human) vs B-Spec (AI driver) in the UI — it reflects B-Spec state, it doesn't control it. The real gates (whether the AI can take your car, whether the B-Spec option appears in race setup) live elsewhere.

Can full B-Spec be enabled? Yes — via the debug environment

This is the one feature where the community has already mapped the route: B-Spec is gated behind the debug environment, exactly like LAN mode, demo mode, and the sky options menu. From the GT7Patcher author's own testing on PS5:

"The game has three environments: release, beta, and debug. Swapping release with debug enables… In a custom race, you have B-Spec and a sky options menu… In quick race mode, B-Spec is basically an autopilot…"

So the patch you've been circling this whole conversation — the environment string — unlocks B-Spec, LAN mode, the demo icon, and the fuller debug menu (likely including the cameraDebug page) in one shot:

find:    "release\0"   (the environment selector string, xref-verified)
write:   "debug\0\0\0"

For your 1.71 eboot the offset differs from the v1.18 PS4 value (0x6095990) — you find it in Ghidra via Search → For Strings → "release", picking the one clustered next to beta/debug/develop, then follow the xref to confirm it's the environment selector. Or upload the decrypted eboot here and I'll hand you the exact file offset + a GT7Patcher-format patch entry.

What to expect (manage expectations)

Per the 2022 findings on the equivalent build:

  • B-Spec works: the AI takes over your car in quick/custom race.
  • It's an unfinished debug feature — limited in-race controls (mostly camera switching), and a rolling start additionally exposes replay camera angles.
  • It's clearly the testbed that became Sophy — don't expect the polished B-Spec of GT5/6.

Caveats (same as always, but now more important)

  • Debug environment + PSN = ban risk. This one actually changes race behavior — offline/local account only.
  • Backup save and eboot. The env string patch also flips other behavior (demo toggles, LAN mode appearing, QAMode indicators), so don't be surprised by extra menu entries.

If you want to verify the gate in your binary first

Two quick searches tell you everything:

  1. Search → For Strings → "BSpec" / "B-Spec" — the race-setup UI strings; their xrefs lead to the menu gate that checks the environment.
  2. References to the environment string itself (from step above) — the function that reads it is the master debug-mode check; every hidden feature branches through it.

That single string patch is almost certainly the answer to both this question and your original camera one — want to upload the 1.71 eboot so I can give you the exact offsets?

theres no commands for the driver though

Dr.Binary

Right — and that matches what's known about this feature. You've hit the actual ceiling of GT7's hidden B-Spec:

GT7's B-Spec is a stub autopilot, not the GT5/6 feature. The GT7Patcher author (who tested it on this exact version) described it precisely:

"In quick race mode, B-Spec is basically an autopilot with no commands, there's some options to tweak certain settings, though only the RGB channels are functional."

So what exists is: a B-Spec toggle in the quick/custom race setup (debug environment only), the AI takes over your car, you can change camera views — and that's it. There is no pace control, no pit orders, no overtake permits, no race-engineer UI anywhere in this build. The nameplate function you pasted (Player.BSpec tag) is all the UI surface there is. It's the unfinished testbed that later became Sophy — PD never built the command layer for it.

Your three realistic options

1. Use it as-is. Debug environment → quick race → B-Spec toggle → autopilot. Fun for screenshots/replays, but no orders. No patch can add a UI that was never compiled in.

2. Wire your own commands (the real modding route). The low-level command path does exist in code — FUN_02742790 (the throttle/brake/steering dict injector) and FUN_026fefa0 beneath it are how every AI car on the grid is driven. Whether you can use it depends on one question, and it's the same XREF question from before:

Does FUN_02742790 have callers in this build?

  • If yes (e.g., a Sophy agent, demo-mode driver, or debug IPC feeding it) → there's a live channel; a patch could redirect/hijack it to feed your inputs.
  • If no callers → it's dead code, and the only way in is a runtime payload of your own that calls it periodically: hook a per-frame function, build the parameter dict (the string-keyed table those FUN_003f0670 lookups use), call FUN_02742790(obj, slot, dict, ...). Doable with a PS5 payload + the offset math we discussed, but it's a genuine project, not a byte patch.

3. Check the Sophy angle. 1.71 contains the Race Together/Sophy code. Search strings for Sophy / sophy in Ghidra — if there are debug toggles for it, that's a working AI-driver with more capable behavior than the B-Spec stub, possibly exposed somewhere in the debug settings.

My suggestion

Do the environment string patch first if you haven't (B-Spec toggle + LAN + demo + likely the fuller debug menu including cameraDebug — one patch, four features), see what the in-race B-Spec options actually offer, and paste the FUN_02742790 XREF list. From those two data points I can tell you whether option 2 is a weekend or a white whale.

how can i find switchable cameras? /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_02657ac0(undefined4 *param_1,long param_2,int *param_3)

{ undefined8 uVar1; char cVar2; undefined1 uVar3; undefined4 uVar4; undefined4 uVar5; undefined4 *puVar6; ulong uVar7; void *local_98 [2]; undefined4 local_88 [2]; void **local_80; undefined4 local_78; void *local_70 [3]; ulong local_58; undefined1 local_50 [24]; long local_38;

local_38 = __stack_chk_guard; puVar6 = &DAT_06c55ad8; if ((param_3 == 4) && ((long *)(param_3 + 2) != 0)) { puVar6 = (undefined4 )FUN_003f0670((long *)(param_3 + 2),"command"); } uVar1 = *(undefined8 )(puVar6 + 2); cVar2 = FUN_00b831c0(uVar1,"setCheckVR"); if (cVar2 == '\0') { cVar2 = FUN_00b831c0(uVar1,"saveDefaultCamera"); if (cVar2 != '\0') { FUN_02657d50(param_2); goto LAB_02657bad; } cVar2 = FUN_00b831c0(uVar1,"getDefaultCamera"); if (cVar2 == '\0') { if (___stack_chk_guard == local_38) { FUN_02659b10(param_1,(undefined8 *)(param_2 + 8),param_3); return; } goto LAB_02657d02; } cVar2 = FUN_003eff80(param_3,(undefined8 *)(param_3 + 2),"scenario"); if (cVar2 == '\0') goto LAB_02657bad; uVar5 = *(undefined4 *)(param_2 + 0x94); puVar6 = &DAT_06c55ad8; if ((param_3 == 4) && ((long *)(param_3 + 2) != 0)) { puVar6 = (undefined4 )FUN_003f0670((long )(param_3 + 2),"scenario"); } uVar4 = FUN_003e8a80(puVar6,0); uVar5 = FUN_02657dd0(uVar5,uVar4); FUN_009a70e0(local_70,&DAT_049bf7ab,uVar5); FUN_009a2010(local_98,local_70,&local_38); local_88[0] = 4; local_78 = 1; local_80 = local_98; eh_1f9a60(param_1,local_98); eh_1f5800(local_88); eh_8ef0(local_98,local_98,(undefined8 *)((long)local_98[0] + 8)); operator.delete(local_98[0],0x58); eh_1f5800(local_50); if (0xf < local_58) { uVar7 = local_58 + 1; if (0xfff < uVar7) { local_70[0] = *(void **)((long)local_70[0] + -8); uVar7 = local_58 + 0x28; } operator.delete(local_70[0],uVar7); } } else { cVar2 = FUN_003eff80(param_3,(undefined8 *)(param_3 + 2),"value"); if (cVar2 != '\0') { puVar6 = &DAT_06c55ad8; if ((param_3 == 4) && ((long *)(param_3 + 2) != 0)) { puVar6 = (undefined4 )FUN_003f0670((long *)(param_3 + 2),"value"); } uVar3 = FUN_003f4230(puVar6,0); *(undefined1 *)(param_2 + 0x98) = uVar3; } LAB_02657bad: param_1 = 0; param_1[4] = 1; } if (___stack_chk_guard == local_38) { return; } LAB_02657d02: / WARNING: Subroutine does not return / __stack_chk_fail(); }

Dr.Binary

Nice find — you're now inside a debug-menu page handler for cameras (same dict-command pattern as everything else). Decoded:

cmd = dict["command"];
if      (cmd == "setCheckVR")       dict["value"] → *(ctx+0x98)     // VR check flag
else if (cmd == "saveDefaultCamera") FUN_02657d50(ctx);            // persist current
else if (cmd == "getDefaultCamera") FUN_02657d50(ctx);            // (same path here)
else if (dict has "scenario") {
    target = FUN_02657dd0(*(ctx+0x94), dict["scenario"]);         // scenario id → camera target
    emit_event({"target": target});                                // sends the switch event
}
else FUN_02659b10(param_1, *(ctx+8), param_3);                     // ← ALL other commands

So this page supports setCheckVR / saveDefaultCamera / getDefaultCamera / scenario:<id> — and everything else routes into FUN_02659b10. That default handler is the one you want: it will contain the remaining command string comparisons ("camera", "switch", …), i.e. the literal list of what this page can switch.

How to enumerate switchable cameras — four concrete angles

1. Name the page + get the full command list (cheapest, do first)

  • References → Show References to FUN_02657ac0 → the registration site → the "DEBUGMENU.<name>" string next to it.
  • Paste FUN_02659b10. Every FUN_00b831c0(uVar1, "…") compare in it is a command name; those names are the menu's actual buttons.

2. The scenario→camera mapping table FUN_02657dd0(current_scenario, requested) computes the switch target. Decompile it — it's almost certainly a small lookup table (scenario id → camera index). That table is your "switchable cameras" list for this page, with indices you can then force.

3. The camera instance table (from FUN_0042bb00) The scene holds camera objects at param_1+0x34480 (stride 0x28), current index at +0x344f8. So:

  • References to param_1+0x344f8-style field accesses → whoever writes the current camera index = the switch mechanism (and its callers = how the game decides what's switchable).
  • Dump the entries' object vtables — each vtable identifies a camera class; the count of distinct classes ≈ the camera roster.
  • The camera manager (param_1+0x36c0, methods +0x10 "value", +0x18 "window", +0x20 "target" from the switch event) — dump that class's vtable; look for a getCount/getName method. If the debug UI lists cameras, a name-string method exists — that's the canonical roster.

4. String sweep for camera type names Search → For Strings → "camera" (case-insensitive) and filter for enum-ish entries; also try the PD-specific vocabulary: CameraWork, camera_work, bumper, chase, cockpit, interior, trackside, tvcam, heli, drone, panorama, photo, scape. Race camera cycle lists often appear as adjacent string arrays — the debug UI and the HUD camera-cycle both render from such tables.

Suggested order

Paste FUN_02659b10 first — one paste likely names every command on this page. Then FUN_02657dd0 for the scenario→camera table. With those two plus the page name, we'll know exactly which cameras are switchable, by which index, and from there it's usually a small step to either firing the switch event with an arbitrary target (if the page is reachable in your debug menu) or patching the default camera index directly.

One caution to keep expectations calibrated: pages like this are replay/scenario camera tooling (the scenario mapping suggests it switches the cinematic replay cameras, similar to the cameraDebug scrubber we just analyzed) — switchable replay cameras are genuinely useful, but if your end target is a free camera while driving, the thing to look for in FUN_02659b10's command list is anything like free, manual, look, or orbit.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02657ac0()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[4]:     02657ae5(W), 
                                                                                               02657bbe(R), 
                                                                                               02657be9(R), 
                                                                                               02657c61(*)  
         undefined         Stack[-0x50]:1 local_50                                XREF[1]:     02657cc2(*)  
         undefined8        Stack[-0x58]:8 local_58                                XREF[1]:     02657cce(R)  
         undefined8        Stack[-0x70]:8 local_70                                XREF[2]:     02657c4c(*), 
                                                                                               02657cdc(R)  
         undefined4        Stack[-0x78]:4 local_78                                XREF[1]:     02657c8c(W)  
         undefined8        Stack[-0x80]:8 local_80                                XREF[1]:     02657c88(W)  
         undefined4        Stack[-0x88]:4 local_88                                XREF[2]:     02657c77(*), 
                                                                                               02657c81(*)  
         undefined8        Stack[-0x98]:8 local_98                                XREF[3]:     02657c65(*), 
                                                                                               02657ca1(R), 
                                                                                               02657cb4(*)  
                         FUN_02657ac0                                    XREF[1]:     FUN_00b7ffd0:00b8267c(c)  
    02657ac0 55              PUSH       RBP
    02657ac1 48 89 e5        MOV        RBP,RSP
    02657ac4 41 57           PUSH       R15
    02657ac6 41 56           PUSH       R14
    02657ac8 41 55           PUSH       R13
    02657aca 41 54           PUSH       R12
    02657acc 53              PUSH       RBX
    02657acd 48 83 ec 68     SUB        RSP,0x68
    02657ad1 4c 8b 2d        MOV        R13,qword ptr [->__stack_chk_guard]              = 07d7faf8
             b8 73 f8 02
    02657ad8 49 89 d7        MOV        R15,RDX
    02657adb 49 89 f6        MOV        R14,RSI
    02657ade 48 89 fb        MOV        RBX,RDI
    02657ae1 49 8b 45 00     MOV        RAX,qword ptr [R13]=>__stack_chk_guard           = ??
    02657ae5 48 89 45 d0     MOV        qword ptr [RBP + local_38],RAX
    02657ae9 48 8d 05        LEA        RAX,[DAT_06c55ad8]
             e8 df 5f 04
    02657af0 83 3a 04        CMP        dword ptr [RDX],0x4
    02657af3 75 15           JNZ        LAB_02657b0a
    02657af5 49 8b 7f 08     MOV        RDI,qword ptr [R15 + 0x8]
    02657af9 48 85 ff        TEST       RDI,RDI
    02657afc 74 0c           JZ         LAB_02657b0a
    02657afe 48 8d 35        LEA        RSI,[s_command_0476d0ed]                         = "command"
             e8 55 11 02
    02657b05 e8 66 8b        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
                         LAB_02657b0a                                    XREF[2]:     02657af3(j), 02657afc(j)  
    02657b0a 4c 8b 60 08     MOV        R12,qword ptr [RAX + 0x8]=>DAT_06c55ae0
    02657b0e 48 8d 35        LEA        RSI,[s_setCheckVR_0485d7cf]                      = "setCheckVR"
             ba 5c 20 02
    02657b15 4c 89 e7        MOV        RDI,R12
    02657b18 e8 a3 b6        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02657b1d 84 c0           TEST       AL,AL
    02657b1f 74 4f           JZ         LAB_02657b70
    02657b21 41 8b 3f        MOV        EDI,dword ptr [R15]
    02657b24 49 8b 77 08     MOV        RSI,qword ptr [R15 + 0x8]
    02657b28 48 8d 15        LEA        RDX,[s_value_0491db9d]                           = "value"
             6e 60 2c 02
    02657b2f e8 4c 84        CALL       FUN_003eff80                                     undefined FUN_003eff80()
             d9 fd
    02657b34 84 c0           TEST       AL,AL
    02657b36 74 75           JZ         LAB_02657bad
    02657b38 41 83 3f 04     CMP        dword ptr [R15],0x4
    02657b3c 48 8d 3d        LEA        RDI,[DAT_06c55ad8]
             95 df 5f 04
    02657b43 75 1b           JNZ        LAB_02657b60
    02657b45 49 8b 47 08     MOV        RAX,qword ptr [R15 + 0x8]
    02657b49 48 85 c0        TEST       RAX,RAX
    02657b4c 74 12           JZ         LAB_02657b60
    02657b4e 48 8d 35        LEA        RSI,[s_value_0491db9d]                           = "value"
             48 60 2c 02
    02657b55 48 89 c7        MOV        RDI,RAX
    02657b58 e8 13 8b        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
    02657b5d 48 89 c7        MOV        RDI,RAX
                         LAB_02657b60                                    XREF[2]:     02657b43(j), 02657b4c(j)  
    02657b60 31 f6           XOR        ESI,ESI
    02657b62 e8 c9 c6        CALL       FUN_003f4230                                     undefined FUN_003f4230()
             d9 fd
    02657b67 41 88 86        MOV        byte ptr [R14 + 0x98],AL
             98 00 00 00
    02657b6e eb 3d           JMP        LAB_02657bad
                         LAB_02657b70                                    XREF[1]:     02657b1f(j)  
    02657b70 48 8d 35        LEA        RSI,[s_saveDefaultCamera_0480e938]               = "saveDefaultCamera"
             c1 6d 1b 02
    02657b77 4c 89 e7        MOV        RDI,R12
    02657b7a e8 41 b6        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02657b7f 84 c0           TEST       AL,AL
    02657b81 75 54           JNZ        LAB_02657bd7
    02657b83 48 8d 35        LEA        RSI,[s_getDefaultCamera_0474e581]                = "getDefaultCamera"
             f7 69 0f 02
    02657b8a 4c 89 e7        MOV        RDI,R12
    02657b8d e8 2e b6        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02657b92 84 c0           TEST       AL,AL
    02657b94 74 4b           JZ         LAB_02657be1
    02657b96 41 8b 3f        MOV        EDI,dword ptr [R15]
    02657b99 49 8b 77 08     MOV        RSI,qword ptr [R15 + 0x8]
    02657b9d 48 8d 15        LEA        RDX,[s_scenario_049f540e]                        = "scenario"
             6a d8 39 02
    02657ba4 e8 d7 83        CALL       FUN_003eff80                                     undefined FUN_003eff80()
             d9 fd
    02657ba9 84 c0           TEST       AL,AL
    02657bab 75 5f           JNZ        LAB_02657c0c
                         LAB_02657bad                                    XREF[3]:     02657b36(j), 02657b6e(j), 
                                                                                      02657bdf(j)  
    02657bad c7 03 00        MOV        dword ptr [RBX],0x0
             00 00 00
    02657bb3 c7 43 10        MOV        dword ptr [RBX + 0x10],0x1
             01 00 00 00
                         LAB_02657bba                                    XREF[2]:     02657cd6(j), 02657cfd(j)  
    02657bba 49 8b 45 00     MOV        RAX,qword ptr [R13]=>__stack_chk_guard           = ??
    02657bbe 48 3b 45 d0     CMP        RAX,qword ptr [RBP + local_38]
    02657bc2 0f 85 3a        JNZ        LAB_02657d02
             01 00 00
    02657bc8 48 83 c4 68     ADD        RSP,0x68
    02657bcc 5b              POP        RBX
    02657bcd 41 5c           POP        R12
    02657bcf 41 5d           POP        R13
    02657bd1 41 5e           POP        R14
    02657bd3 41 5f           POP        R15
    02657bd5 5d              POP        RBP
    02657bd6 c3              RET
                         LAB_02657bd7                                    XREF[1]:     02657b81(j)  
    02657bd7 4c 89 f7        MOV        RDI,R14
    02657bda e8 71 01        CALL       FUN_02657d50                                     undefined FUN_02657d50()
             00 00
    02657bdf eb cc           JMP        LAB_02657bad
                         LAB_02657be1                                    XREF[1]:     02657b94(j)  
    02657be1 49 8b 76 08     MOV        RSI,qword ptr [R14 + 0x8]
    02657be5 49 8b 45 00     MOV        RAX,qword ptr [R13]=>__stack_chk_guard           = ??
    02657be9 48 3b 45 d0     CMP        RAX,qword ptr [RBP + local_38]
    02657bed 0f 85 0f        JNZ        LAB_02657d02
             01 00 00
    02657bf3 48 89 df        MOV        RDI,RBX
    02657bf6 4c 89 fa        MOV        RDX,R15
    02657bf9 48 83 c4 68     ADD        RSP,0x68
    02657bfd 5b              POP        RBX
    02657bfe 41 5c           POP        R12
    02657c00 41 5d           POP        R13
    02657c02 41 5e           POP        R14
    02657c04 41 5f           POP        R15
    02657c06 5d              POP        RBP
    02657c07 e9 04 1f        JMP        FUN_02659b10                                     undefined FUN_02659b10()
             00 00
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
                         LAB_02657c0c                                    XREF[1]:     02657bab(j)  
    02657c0c 41 83 3f 04     CMP        dword ptr [R15],0x4
    02657c10 45 8b b6        MOV        R14D,dword ptr [R14 + 0x94]
             94 00 00 00
    02657c17 48 8d 3d        LEA        RDI,[DAT_06c55ad8]
             ba de 5f 04
    02657c1e 75 1b           JNZ        LAB_02657c3b
    02657c20 49 8b 47 08     MOV        RAX,qword ptr [R15 + 0x8]
    02657c24 48 85 c0        TEST       RAX,RAX
    02657c27 74 12           JZ         LAB_02657c3b
    02657c29 48 8d 35        LEA        RSI,[s_scenario_049f540e]                        = "scenario"
             de d7 39 02
    02657c30 48 89 c7        MOV        RDI,RAX
    02657c33 e8 38 8a        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
    02657c38 48 89 c7        MOV        RDI,RAX
                         LAB_02657c3b                                    XREF[2]:     02657c1e(j), 02657c27(j)  
    02657c3b 31 f6           XOR        ESI,ESI
    02657c3d e8 3e 0e        CALL       FUN_003e8a80                                     undefined FUN_003e8a80()
             d9 fd
    02657c42 44 89 f7        MOV        EDI,R14D
    02657c45 89 c6           MOV        ESI,EAX
    02657c47 e8 84 01        CALL       FUN_02657dd0                                     undefined FUN_02657dd0()
             00 00
    02657c4c 4c 8d 7d 98     LEA        R15=>local_70,[RBP + -0x68]
    02657c50 48 8d 35        LEA        RSI,[DAT_049bf7ab]                               = 74h    t
             54 7b 36 02
    02657c57 89 c2           MOV        EDX,EAX
    02657c59 4c 89 ff        MOV        RDI,R15
    02657c5c e8 7f f4        CALL       FUN_009a70e0                                     undefined FUN_009a70e0()
             34 fe
    02657c61 48 8d 55 d0     LEA        RDX=>local_38,[RBP + -0x30]
    02657c65 4c 8d b5        LEA        R14=>local_98,[RBP + -0x90]
             70 ff ff ff
    02657c6c 4c 89 fe        MOV        RSI,R15
    02657c6f 4c 89 f7        MOV        RDI,R14
    02657c72 e8 99 a3        CALL       FUN_009a2010                                     undefined FUN_009a2010()
             34 fe
    02657c77 4c 8d 7d 80     LEA        R15=>local_88,[RBP + -0x80]
    02657c7b 48 89 df        MOV        RDI,RBX
    02657c7e 4c 89 f6        MOV        RSI,R14
    02657c81 41 c7 07        MOV        dword ptr [R15]=>local_88,0x4
             04 00 00 00
    02657c88 4d 89 77 08     MOV        qword ptr [R15 + local_80],R14
    02657c8c 41 c7 47        MOV        dword ptr [R15 + local_78],0x1
             10 01 00 
             00 00
    02657c94 e8 c7 1d        CALL       eh_1f9a60                                        undefined eh_1f9a60()
             ba fd
    02657c99 4c 89 ff        MOV        RDI,R15
    02657c9c e8 5f db        CALL       eh_1f5800                                        undefined eh_1f5800()
             b9 fd
    02657ca1 49 8b 47 f0     MOV        RAX,qword ptr [R15 + local_98]
    02657ca5 4c 89 f7        MOV        RDI,R14
    02657ca8 4c 89 f6        MOV        RSI,R14
    02657cab 48 8b 50 08     MOV        RDX,qword ptr [RAX + 0x8]
    02657caf e8 3c 12        CALL       eh_8ef0                                          undefined eh_8ef0()
             9b fd
    02657cb4 49 8b 7f f0     MOV        RDI=>local_98,qword ptr [R15 + -0x10]
    02657cb8 be 58 00        MOV        ESI,0x58
             00 00
    02657cbd e8 de 25        CALL       <EXTERNAL>::operator.delete                      void operator.delete(void * para
             8b 01
    02657cc2 48 8d 5d b8     LEA        RBX=>local_50,[RBP + -0x48]
    02657cc6 48 89 df        MOV        RDI,RBX
    02657cc9 e8 32 db        CALL       eh_1f5800                                        undefined eh_1f5800()
             b9 fd
    02657cce 48 8b 43 f8     MOV        RAX,qword ptr [RBX + local_58]
    02657cd2 48 83 f8 10     CMP        RAX,0x10
    02657cd6 0f 82 de        JC         LAB_02657bba
             fe ff ff
    02657cdc 48 8b 7d 98     MOV        RDI,qword ptr [RBP + local_70]
    02657ce0 48 8d 70 01     LEA        RSI,[RAX + 0x1]
    02657ce4 48 81 fe        CMP        RSI,0x1000
             00 10 00 00
    02657ceb 72 0b           JC         LAB_02657cf8
    02657ced 48 8b 7f f8     MOV        RDI,qword ptr [RDI + -0x8]
    02657cf1 48 83 c0 28     ADD        RAX,0x28
    02657cf5 48 89 c6        MOV        RSI,RAX
                         LAB_02657cf8                                    XREF[1]:     02657ceb(j)  
    02657cf8 e8 a3 25        CALL       <EXTERNAL>::operator.delete                      void operator.delete(void * para
             8b 01
    02657cfd e9 b8 fe        JMP        LAB_02657bba
             ff ff
                         LAB_02657d02                                    XREF[2]:     02657bc2(j), 02657bed(j)  
    02657d02 e8 59 57        CALL       __stack_chk_fail                                 undefined __stack_chk_fail()
             8b 01
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
    02657d07 0f              ??         0Fh
    02657d08 0b              ??         0Bh
    02657d09 4c              ??         4Ch    L
    02657d0a 8d              ??         8Dh
    02657d0b 75              ??         75h    u
    02657d0c b8              ??         B8h
    02657d0d 48              ??         48h    H
    02657d0e 89              ??         89h
    02657d0f c3              ??         C3h
    02657d10 4c              ??         4Ch    L
    02657d11 89              ??         89h
    02657d12 f7              ??         F7h
    02657d13 e8              ??         E8h
    02657d14 e8              ??         E8h
    02657d15 da              ??         DAh
    02657d16 b9              ??         B9h
    02657d17 fd              ??         FDh
    02657d18 49              ??         49h    I
    02657d19 8b              ??         8Bh
    02657d1a 46              ??         46h    F
    02657d1b f8              ??         F8h
    02657d1c 48              ??         48h    H
    02657d1d 83              ??         83h
    02657d1e f8              ??         F8h
    02657d1f 10              ??         10h
    02657d20 72              ??         72h    r
    02657d21 21              ??         21h    !
    02657d22 48              ??         48h    H
    02657d23 8b              ??         8Bh
    02657d24 7d              ??         7Dh    }
    02657d25 98              ??         98h
    02657d26 48              ??         48h    H
    02657d27 8d              ??         8Dh
    02657d28 70              ??         70h    p
    02657d29 01              ??         01h
    02657d2a 48              ??         48h    H
    02657d2b 81              ??         81h
    02657d2c fe              ??         FEh
    02657d2d 00              ??         00h
    02657d2e 10              ??         10h
    02657d2f 00              ??         00h
    02657d30 00              ??         00h
    02657d31 72              ??         72h    r
    02657d32 0b              ??         0Bh
    02657d33 48              ??         48h    H
    02657d34 8b              ??         8Bh
    02657d35 7f              ??         7Fh    
    02657d36 f8              ??         F8h
    02657d37 48              ??         48h    H
    02657d38 83              ??         83h
    02657d39 c0              ??         C0h
    02657d3a 28              ??         28h    (
    02657d3b 48              ??         48h    H
    02657d3c 89              ??         89h
    02657d3d c6              ??         C6h
    02657d3e e8              ??         E8h
    02657d3f 5d              ??         5Dh    ]
    02657d40 25              ??         25h    %
    02657d41 8b              ??         8Bh
    02657d42 01              ??         01h
    02657d43 48              ??         48h    H
    02657d44 89              ??         89h
    02657d45 df              ??         DFh
    02657d46 e8              ??         E8h
    02657d47 f5              ??         F5h
    02657d48 59              ??         59h    Y
    02657d49 8b              ??         8Bh
    02657d4a 01              ??         01h
    02657d4b 0f              ??         0Fh
    02657d4c 0b              ??         0Bh
    02657d4d cc              ??         CCh
    02657d4e cc              ??         CCh
    02657d4f cc              ??         CCh
Dr.Binary

Good — this disasm adds three concrete new facts:

1. The dispatcher is identified. FUN_02657ac0 XREF[1]: FUN_00b7ffd0:00b8267c(c) — this page handler is called from FUN_00b7ffd0, which is the debug-menu command router (same 00b7/00b8 neighborhood as FUN_00b831c0/FUN_00b7def0 we've seen all conversation). That function is the map of the entire debug menu:

Open FUN_00b7ffd0 — every call site in it routes to one page handler. Collect the handlers + the strings near each = the complete list of debug pages and their commands, in one read. That definitively answers "what can this build switch/toggle" — camera pages included — without any guessing.

2. DAT_049bf7ab is "target". The disasm shows LEA RSI,[DAT_049bf7ab] with first byte 0x74 't', used to build the emitted event — and it's the same key FUN_0042bb00's switch-event handler reads (FUN_003eff80(..., "target") → camera manager +0x20). So this page emits {"target": N} and the camera manager consumes it. The chain is complete:

menu page "scenario:<id>" → FUN_02657dd0(cur_scn, scn) → {"target": N} → camera mgr +0x20

3. Confirmed command set on this page: setCheckVR (value → ctx+0x98), saveDefaultCamera, getDefaultCamera (both → FUN_02657d50), scenario (→ target mapping), everything else → FUN_02659b10 (tail-called).

Two pastes and this page is fully mapped

  1. FUN_02659b10 — the rest of the camera commands. Its FUN_00b831c0(x, "…") string compares are the page's remaining buttons, verbatim.
  2. FUN_02657dd0 — the scenario→camera-target mapping. If it's a table lookup (likely DAT_0xxxxx + id*8 style), that table is the switchable-camera roster with indices — exactly what you asked for.

And keep the earlier lede in mind: FUN_00b7ffd0's call-site list is the master enumeration. If you paste its disassembly (or just the list of CALL targets + neighboring strings), I can categorize every debug page in the 1.71 build in one pass — camera, driver, cameraDebug, and anything else hiding in there.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02659b10()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[2]:     02659b35(W), 
                                                                                               02659ba1(R)  
         undefined4        Stack[-0x40]:4 local_40                                XREF[1]:     02659ddb(W)  
         undefined8        Stack[-0x48]:8 local_48                                XREF[1]:     02659de8(R)  
         undefined4        Stack[-0x50]:4 local_50                                XREF[4]:     02659dcd(*), 
                                                                                               02659dd4(*), 
                                                                                               02659dec(*), 
                                                                                               02659df7(*)  
                         FUN_02659b10                                    XREF[1]:     FUN_02657ac0:02657c07(c)  
    02659b10 55              PUSH       RBP
    02659b11 48 89 e5        MOV        RBP,RSP
    02659b14 41 57           PUSH       R15
    02659b16 41 56           PUSH       R14
    02659b18 41 55           PUSH       R13
    02659b1a 41 54           PUSH       R12
    02659b1c 53              PUSH       RBX
    02659b1d 48 83 ec 28     SUB        RSP,0x28
    02659b21 4c 8b 2d        MOV        R13,qword ptr [->__stack_chk_guard]              = 07d7faf8
             68 53 f8 02
    02659b28 49 89 d7        MOV        R15,RDX
    02659b2b 49 89 f6        MOV        R14,RSI
    02659b2e 48 89 fb        MOV        RBX,RDI
    02659b31 49 8b 45 00     MOV        RAX,qword ptr [R13]=>__stack_chk_guard           = ??
    02659b35 48 89 45 d0     MOV        qword ptr [RBP + local_38],RAX
    02659b39 48 8d 05        LEA        RAX,[DAT_06c55ad8]
             98 bf 5f 04
    02659b40 83 3a 04        CMP        dword ptr [RDX],0x4
    02659b43 75 15           JNZ        LAB_02659b5a
    02659b45 49 8b 7f 08     MOV        RDI,qword ptr [R15 + 0x8]
    02659b49 48 85 ff        TEST       RDI,RDI
    02659b4c 74 0c           JZ         LAB_02659b5a
    02659b4e 48 8d 35        LEA        RSI,[s_command_0476d0ed]                         = "command"
             98 35 11 02
    02659b55 e8 16 6b        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
                         LAB_02659b5a                                    XREF[2]:     02659b43(j), 02659b4c(j)  
    02659b5a 4c 8b 60 08     MOV        R12,qword ptr [RAX + 0x8]=>DAT_06c55ae0
    02659b5e 48 8d 35        LEA        RSI,[s_startPlay_049a1298]                       = "startPlay"
             33 77 34 02
    02659b65 4c 89 e7        MOV        RDI,R12
    02659b68 e8 53 96        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659b6d 84 c0           TEST       AL,AL
    02659b6f 0f 85 ba        JNZ        LAB_02659d2f
             01 00 00
    02659b75 48 8d 35        LEA        RSI,[s_stopPlay_04985fc5]                        = "stopPlay"
             49 c4 32 02
    02659b7c 4c 89 e7        MOV        RDI,R12
    02659b7f e8 3c 96        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659b84 84 c0           TEST       AL,AL
    02659b86 74 32           JZ         LAB_02659bba
    02659b88 41 c6 86        MOV        byte ptr [R14 + 0x3c9],0x1
             c9 03 00 
             00 01
                         LAB_02659b90                                    XREF[10]:    02659bd5(j), 02659c9c(j), 
                                                                                      02659caa(j), 02659cdb(j), 
                                                                                      02659d2a(j), 02659e24(j), 
                                                                                      02659e3a(j), 02659e48(j), 
                                                                                      02659eac(j), 02659ec1(j)  
    02659b90 c7 03 00        MOV        dword ptr [RBX],0x0
             00 00 00
    02659b96 c7 43 10        MOV        dword ptr [RBX + 0x10],0x1
             01 00 00 00
    02659b9d 49 8b 45 00     MOV        RAX,qword ptr [R13]=>__stack_chk_guard           = ??
    02659ba1 48 3b 45 d0     CMP        RAX,qword ptr [RBP + local_38]
    02659ba5 0f 85 1b        JNZ        LAB_02659ec6
             03 00 00
    02659bab 48 83 c4 28     ADD        RSP,0x28
    02659baf 5b              POP        RBX
    02659bb0 41 5c           POP        R12
    02659bb2 41 5d           POP        R13
    02659bb4 41 5e           POP        R14
    02659bb6 41 5f           POP        R15
    02659bb8 5d              POP        RBP
    02659bb9 c3              RET
                         LAB_02659bba                                    XREF[1]:     02659b86(j)  
    02659bba 48 8d 35        LEA        RSI,[s_prepareRecord_0480bbc3]                   = "prepareRecord"
             02 20 1b 02
    02659bc1 4c 89 e7        MOV        RDI,R12
    02659bc4 e8 f7 95        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659bc9 84 c0           TEST       AL,AL
    02659bcb 74 0a           JZ         LAB_02659bd7
    02659bcd 41 c6 86        MOV        byte ptr [R14 + DAT_00000418],0x1                = CCh
             18 04 00 
             00 01
    02659bd5 eb b9           JMP        LAB_02659b90
                         LAB_02659bd7                                    XREF[1]:     02659bcb(j)  
    02659bd7 48 8d 35        LEA        RSI,[s_startRecord_0480c154]                     = "startRecord"
             76 25 1b 02
    02659bde 4c 89 e7        MOV        RDI,R12
    02659be1 e8 da 95        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659be6 84 c0           TEST       AL,AL
    02659be8 0f 85 5f        JNZ        LAB_02659e4d
             02 00 00
    02659bee 48 8d 35        LEA        RSI,[s_stopRecord_048c8ace]                      = "stopRecord"
             d9 ee 26 02
    02659bf5 4c 89 e7        MOV        RDI,R12
    02659bf8 e8 c3 95        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659bfd 84 c0           TEST       AL,AL
    02659bff 0f 85 ac        JNZ        LAB_02659eb1
             02 00 00
    02659c05 48 8d 35        LEA        RSI,[s_notifyInstantReplay_048787ac]             = "notifyInstantReplay"
             a0 eb 21 02
    02659c0c 4c 89 e7        MOV        RDI,R12
    02659c0f e8 ac 95        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659c14 84 c0           TEST       AL,AL
    02659c16 0f 84 93        JZ         LAB_02659caf
             00 00 00
    02659c1c 41 83 3f 04     CMP        dword ptr [R15],0x4
    02659c20 48 8d 3d        LEA        RDI,[DAT_06c55ad8]
             b1 be 5f 04
    02659c27 75 1b           JNZ        LAB_02659c44
    02659c29 49 8b 47 08     MOV        RAX,qword ptr [R15 + 0x8]
    02659c2d 48 85 c0        TEST       RAX,RAX
    02659c30 74 12           JZ         LAB_02659c44
    02659c32 48 8d 35        LEA        RSI,[s_offset_04a10426]                          = "offset"
             ed 67 3b 02
    02659c39 48 89 c7        MOV        RDI,RAX
    02659c3c e8 2f 6a        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
    02659c41 48 89 c7        MOV        RDI,RAX
                         LAB_02659c44                                    XREF[2]:     02659c27(j), 02659c30(j)  
    02659c44 31 f6           XOR        ESI,ESI
    02659c46 e8 35 ee        CALL       FUN_003e8a80                                     undefined FUN_003e8a80()
             d8 fd
    02659c4b 48 98           CDQE
    02659c4d 48 8d 15        LEA        RDX,[DAT_04a43ba3]                               = 6Ch    l
             4f 9f 3e 02
    02659c54 49 89 86        MOV        qword ptr [R14 + eh_420],RAX
             20 04 00 00
    02659c5b 41 8b 3f        MOV        EDI,dword ptr [R15]
    02659c5e 49 8b 77 08     MOV        RSI,qword ptr [R15 + 0x8]
    02659c62 e8 19 63        CALL       FUN_003eff80                                     undefined FUN_003eff80()
             d9 fd
    02659c67 84 c0           TEST       AL,AL
    02659c69 74 37           JZ         LAB_02659ca2
    02659c6b 41 83 3f 04     CMP        dword ptr [R15],0x4
    02659c6f 48 8d 3d        LEA        RDI,[DAT_06c55ad8]
             62 be 5f 04
    02659c76 75 1b           JNZ        LAB_02659c93
    02659c78 49 8b 47 08     MOV        RAX,qword ptr [R15 + 0x8]
    02659c7c 48 85 c0        TEST       RAX,RAX
    02659c7f 74 12           JZ         LAB_02659c93
    02659c81 48 8d 35        LEA        RSI,[DAT_04a43ba3]                               = 6Ch    l
             1b 9f 3e 02
    02659c88 48 89 c7        MOV        RDI,RAX
    02659c8b e8 e0 69        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
    02659c90 48 89 c7        MOV        RDI,RAX
                         LAB_02659c93                                    XREF[2]:     02659c76(j), 02659c7f(j)  
    02659c93 31 f6           XOR        ESI,ESI
    02659c95 e8 96 a5        CALL       FUN_003f4230                                     undefined FUN_003f4230()
             d9 fd
    02659c9a 84 c0           TEST       AL,AL
    02659c9c 0f 84 ee        JZ         LAB_02659b90
             fe ff ff
                         LAB_02659ca2                                    XREF[1]:     02659c69(j)  
    02659ca2 41 c6 86        MOV        byte ptr [R14 + 0x430],0x1
             30 04 00 
             00 01
    02659caa e9 e1 fe        JMP        LAB_02659b90
             ff ff
                         LAB_02659caf                                    XREF[1]:     02659c16(j)  
    02659caf 48 8d 35        LEA        RSI,[s_bypass_049bc3b3]                          = "bypass"
             fd 26 36 02
    02659cb6 4c 89 e7        MOV        RDI,R12
    02659cb9 e8 02 95        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659cbe 84 c0           TEST       AL,AL
    02659cc0 0f 84 63        JZ         LAB_02659e29
             01 00 00
    02659cc6 41 8b 3f        MOV        EDI,dword ptr [R15]
    02659cc9 49 8b 77 08     MOV        RSI,qword ptr [R15 + 0x8]
    02659ccd 48 8d 15        LEA        RDX,[s_value_0491db9d]                           = "value"
             c9 3e 2c 02
    02659cd4 e8 a7 62        CALL       FUN_003eff80                                     undefined FUN_003eff80()
             d9 fd
    02659cd9 84 c0           TEST       AL,AL
    02659cdb 0f 84 af        JZ         LAB_02659b90
             fe ff ff
    02659ce1 41 83 3f 04     CMP        dword ptr [R15],0x4
    02659ce5 48 8d 3d        LEA        RDI,[DAT_06c55ad8]
             ec bd 5f 04
    02659cec 75 1b           JNZ        LAB_02659d09
    02659cee 49 8b 47 08     MOV        RAX,qword ptr [R15 + 0x8]
    02659cf2 48 85 c0        TEST       RAX,RAX
    02659cf5 74 12           JZ         LAB_02659d09
    02659cf7 48 8d 35        LEA        RSI,[s_value_0491db9d]                           = "value"
             9f 3e 2c 02
    02659cfe 48 89 c7        MOV        RDI,RAX
    02659d01 e8 6a 69        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
    02659d06 48 89 c7        MOV        RDI,RAX
                         LAB_02659d09                                    XREF[2]:     02659cec(j), 02659cf5(j)  
    02659d09 31 f6           XOR        ESI,ESI
    02659d0b e8 20 a5        CALL       FUN_003f4230                                     undefined FUN_003f4230()
             d9 fd
    02659d10 89 c1           MOV        ECX,EAX
    02659d12 80 f1 01        XOR        CL,0x1
    02659d15 41 22 8e        AND        CL,byte ptr [R14 + 0x3c8]
             c8 03 00 00
    02659d1c 41 88 8e        MOV        byte ptr [R14 + 0x3cb],CL
             cb 03 00 00
    02659d23 41 88 86        MOV        byte ptr [R14 + 0x3c8],AL
             c8 03 00 00
    02659d2a e9 61 fe        JMP        LAB_02659b90
             ff ff
                         LAB_02659d2f                                    XREF[1]:     02659b6f(j)  
    02659d2f 41 c6 86        MOV        byte ptr [R14 + DAT_00000418],0x0                = CCh
             18 04 00 
             00 00
    02659d37 48 8d 15        LEA        RDX,[DAT_049384ae]                               = 70h    p
             70 e7 2d 02
    02659d3e 41 8b 3f        MOV        EDI,dword ptr [R15]
    02659d41 49 8b 77 08     MOV        RSI,qword ptr [R15 + 0x8]
    02659d45 e8 36 62        CALL       FUN_003eff80                                     undefined FUN_003eff80()
             d9 fd
    02659d4a 84 c0           TEST       AL,AL
    02659d4c 74 3c           JZ         LAB_02659d8a
    02659d4e 41 83 3f 04     CMP        dword ptr [R15],0x4
    02659d52 48 8d 05        LEA        RAX,[DAT_06c55ad8]
             7f bd 5f 04
    02659d59 75 15           JNZ        LAB_02659d70
    02659d5b 49 8b 7f 08     MOV        RDI,qword ptr [R15 + 0x8]
    02659d5f 48 85 ff        TEST       RDI,RDI
    02659d62 74 0c           JZ         LAB_02659d70
    02659d64 48 8d 35        LEA        RSI,[DAT_049384ae]                               = 70h    p
             43 e7 2d 02
    02659d6b e8 00 69        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
                         LAB_02659d70                                    XREF[2]:     02659d59(j), 02659d62(j)  
    02659d70 48 8b 70 08     MOV        RSI,qword ptr [RAX + 0x8]=>DAT_06c55ae0
    02659d74 49 8d be        LEA        RDI,[R14 + 0x380]
             80 03 00 00
    02659d7b 48 83 7e        CMP        qword ptr [RSI + 0x18],0x10
             18 10
    02659d80 72 03           JC         LAB_02659d85
    02659d82 48 8b 36        MOV        RSI,qword ptr [RSI]
                         LAB_02659d85                                    XREF[1]:     02659d80(j)  
    02659d85 e8 06 12        CALL       eh_af90                                          undefined eh_af90()
             9b fd
                         LAB_02659d8a                                    XREF[1]:     02659d4c(j)  
    02659d8a 41 8b 3f        MOV        EDI,dword ptr [R15]
    02659d8d 49 8b 77 08     MOV        RSI,qword ptr [R15 + 0x8]
    02659d91 48 8d 15        LEA        RDX,[s_replayEvents_04a43ba8]                    = "replayEvents"
             10 9e 3e 02
    02659d98 e8 e3 61        CALL       FUN_003eff80                                     undefined FUN_003eff80()
             d9 fd
    02659d9d 84 c0           TEST       AL,AL
    02659d9f 74 5f           JZ         LAB_02659e00
    02659da1 41 83 3f 04     CMP        dword ptr [R15],0x4
    02659da5 4d 8d a6        LEA        R12,[R14 + 0x380]
             80 03 00 00
    02659dac 48 8d 35        LEA        RSI,[DAT_06c55ad8]
             25 bd 5f 04
    02659db3 75 18           JNZ        LAB_02659dcd
    02659db5 49 8b 7f 08     MOV        RDI,qword ptr [R15 + 0x8]
    02659db9 48 85 ff        TEST       RDI,RDI
    02659dbc 74 0f           JZ         LAB_02659dcd
    02659dbe 48 8d 35        LEA        RSI,[s_replayEvents_04a43ba8]                    = "replayEvents"
             e3 9d 3e 02
    02659dc5 e8 a6 68        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
    02659dca 48 89 c6        MOV        RSI,RAX
                         LAB_02659dcd                                    XREF[2]:     02659db3(j), 02659dbc(j)  
    02659dcd 4c 8d 7d b8     LEA        R15=>local_50,[RBP + -0x48]
    02659dd1 4c 89 ff        MOV        RDI,R15
    02659dd4 41 c7 07        MOV        dword ptr [R15]=>local_50,0x0
             00 00 00 00
    02659ddb 41 c7 47        MOV        dword ptr [R15 + local_40],0x1
             10 01 00 
             00 00
    02659de3 e8 78 bb        CALL       eh_1f5960                                        undefined eh_1f5960()
             b9 fd
    02659de8 49 8b 57 08     MOV        RDX,qword ptr [R15 + local_48]
    02659dec 41 8b 37        MOV        ESI,dword ptr [R15]=>local_50
    02659def 4c 89 e7        MOV        RDI,R12
    02659df2 e8 f9 00        CALL       FUN_02659ef0                                     undefined FUN_02659ef0()
             00 00
    02659df7 48 8d 7d b8     LEA        RDI=>local_50,[RBP + -0x48]
    02659dfb e8 00 ba        CALL       eh_1f5800                                        undefined eh_1f5800()
             b9 fd
                         LAB_02659e00                                    XREF[1]:     02659d9f(j)  
    02659e00 49 8d be        LEA        RDI,[R14 + 0x380]
             80 03 00 00
    02659e07 e8 04 02        CALL       FUN_0265a010                                     undefined FUN_0265a010()
             00 00
    02659e0c 66 41 c7        MOV        word ptr [R14 + 0x3c8],0x0
             86 c8 03 
             00 00 00 00
    02659e16 49 8b 86        MOV        RAX,qword ptr [R14 + 0x3a8]
             a8 03 00 00
    02659e1d 49 89 86        MOV        qword ptr [R14 + 0x3c0],RAX
             c0 03 00 00
    02659e24 e9 67 fd        JMP        LAB_02659b90
             ff ff
                         LAB_02659e29                                    XREF[1]:     02659cc0(j)  
    02659e29 48 8d 35        LEA        RSI,[DAT_04a43ba3]                               = 6Ch    l
             73 9d 3e 02
    02659e30 4c 89 e7        MOV        RDI,R12
    02659e33 e8 88 93        CALL       FUN_00b831c0                                     undefined FUN_00b831c0()
             52 fe
    02659e38 84 c0           TEST       AL,AL
    02659e3a 0f 84 50        JZ         LAB_02659b90
             fd ff ff
    02659e40 41 c6 86        MOV        byte ptr [R14 + 0x3ca],0x1
             ca 03 00 
             00 01
    02659e48 e9 43 fd        JMP        LAB_02659b90
             ff ff
                         LAB_02659e4d                                    XREF[1]:     02659be8(j)  
    02659e4d 41 c6 86        MOV        byte ptr [R14 + DAT_00000418],0x1                = CCh
             18 04 00 
             00 01
    02659e55 48 8d 15        LEA        RDX,[DAT_049384ae]                               = 70h    p
             52 e6 2d 02
    02659e5c 41 8b 3f        MOV        EDI,dword ptr [R15]
    02659e5f 49 8b 77 08     MOV        RSI,qword ptr [R15 + 0x8]
    02659e63 e8 18 61        CALL       FUN_003eff80                                     undefined FUN_003eff80()
             d9 fd
    02659e68 84 c0           TEST       AL,AL
    02659e6a 74 38           JZ         LAB_02659ea4
    02659e6c 41 83 3f 04     CMP        dword ptr [R15],0x4
    02659e70 48 8d 05        LEA        RAX,[DAT_06c55ad8]
             61 bc 5f 04
    02659e77 75 15           JNZ        LAB_02659e8e
    02659e79 49 8b 7f 08     MOV        RDI,qword ptr [R15 + 0x8]
    02659e7d 48 85 ff        TEST       RDI,RDI
    02659e80 74 0c           JZ         LAB_02659e8e
    02659e82 48 8d 35        LEA        RSI,[DAT_049384ae]                               = 70h    p
             25 e6 2d 02
    02659e89 e8 e2 67        CALL       FUN_003f0670                                     undefined FUN_003f0670()
             d9 fd
                         LAB_02659e8e                                    XREF[2]:     02659e77(j), 02659e80(j)  
    02659e8e 48 8b 70 08     MOV        RSI,qword ptr [RAX + 0x8]=>DAT_06c55ae0
    02659e92 48 83 7e        CMP        qword ptr [RSI + 0x18],0x10
             18 10
    02659e97 72 03           JC         LAB_02659e9c
    02659e99 48 8b 36        MOV        RSI,qword ptr [RSI]
                         LAB_02659e9c                                    XREF[1]:     02659e97(j)  
    02659e9c 4c 89 f7        MOV        RDI,R14
    02659e9f e8 ec 10        CALL       eh_af90                                          undefined eh_af90()
             9b fd
                         LAB_02659ea4                                    XREF[1]:     02659e6a(j)  
    02659ea4 4c 89 f7        MOV        RDI,R14
    02659ea7 e8 04 05        CALL       FUN_0265a3b0                                     undefined FUN_0265a3b0()
             00 00
    02659eac e9 df fc        JMP        LAB_02659b90
             ff ff
                         LAB_02659eb1                                    XREF[1]:     02659bff(j)  
    02659eb1 4c 89 f7        MOV        RDI,R14
    02659eb4 41 c6 86        MOV        byte ptr [R14 + DAT_00000418],0x0                = CCh
             18 04 00 
             00 00
    02659ebc e8 3f 06        CALL       FUN_0265a500                                     undefined FUN_0265a500()
             00 00
    02659ec1 e9 ca fc        JMP        LAB_02659b90
             ff ff
                         LAB_02659ec6                                    XREF[1]:     02659ba5(j)  
    02659ec6 e8 95 35        CALL       __stack_chk_fail                                 undefined __stack_chk_fail()
             8b 01
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
    02659ecb 0f              ??         0Fh
    02659ecc 0b              ??         0Bh
    02659ecd 48              ??         48h    H
    02659ece 8d              ??         8Dh
    02659ecf 7d              ??         7Dh    }
    02659ed0 b8              ??         B8h
    02659ed1 48              ??         48h    H
    02659ed2 89              ??         89h
    02659ed3 c3              ??         C3h
    02659ed4 e8              ??         E8h
    02659ed5 27              ??         27h    '
    02659ed6 b9              ??         B9h
    02659ed7 b9              ??         B9h
    02659ed8 fd              ??         FDh
    02659ed9 48              ??         48h    H
    02659eda 89              ??         89h
    02659edb df              ??         DFh
    02659edc e8              ??         E8h
    02659edd 5f              ??         5Fh    _
    02659ede 38              ??         38h    8
    02659edf 8b              ??         8Bh
    02659ee0 01              ??         01h
    02659ee1 0f              ??         0Fh
    02659ee2 0b              ??         0Bh
    02659ee3 cc              ??         CCh
    02659ee4 cc              ??         CCh
    02659ee5 cc              ??         CCh
    02659ee6 cc              ??         CCh
    02659ee7 cc              ??         CCh
    02659ee8 cc              ??         CCh
    02659ee9 cc              ??         CCh
    02659eea cc              ??         CCh
    02659eeb cc              ??         CCh
    02659eec cc              ??         CCh
    02659eed cc              ??         CCh
    02659eee cc              ??         CCh
    02659eef cc              ??         CCh
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02659ef0()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[2]:     02659f36(W), 
                                                                                               02659fe7(R)  
                         FUN_02659ef0                                    XREF[1]:     FUN_02659b10:02659df2(c)  
    02659ef0 55              PUSH       RBP
    02659ef1 48 89 e5        MOV        RBP,RSP
    02659ef4 41 57           PUSH       R15
    02659ef6 41 56           PUSH       R14
    02659ef8 41 55           PUSH       R13
    02659efa 41 54           PUSH       R12
    02659efc 53              PUSH       RBX
    02659efd 50              PUSH       RAX
    02659efe 48 8b 87        MOV        RAX,qword ptr [RDI + 0x80]
             80 00 00 00
    02659f05 48 89 fb        MOV        RBX,RDI
    02659f08 48 3b 87        CMP        RAX,qword ptr [RDI + 0x88]
             88 00 00 00
    02659f0f 74 07           JZ         LAB_02659f18
    02659f11 48 89 83        MOV        qword ptr [RBX + 0x88],RAX
             88 00 00 00
                         LAB_02659f18                                    XREF[1]:     02659f0f(j)  
    02659f18 4c 8b 22        MOV        R12,qword ptr [RDX]
    02659f1b 4c 8b 6a 08     MOV        R13,qword ptr [RDX + 0x8]
    02659f1f 4d 39 ec        CMP        R12,R13
    02659f22 0f 84 ca        JZ         LAB_02659ff2
             00 00 00
    02659f28 48 8d 83        LEA        RAX,[RBX + 0x80]
             80 00 00 00
    02659f2f 4c 8d 35        LEA        R14,[DAT_06c55ad8]
             a2 bb 5f 04
    02659f36 48 89 45 d0     MOV        qword ptr [RBP + local_38],RAX
                         LAB_02659f3a                                    XREF[1]:     02659fb6(j)  
    02659f3a 41 83 3c        CMP        dword ptr [R12],0x5
             24 05
    02659f3f 49 8b 44        MOV        RAX,qword ptr [R12 + 0x8]
             24 08
    02659f44 4c 89 f7        MOV        RDI=>DAT_06c55ad8,R14
    02659f47 0f 95 c1        SETNZ      CL
    02659f4a 48 85 c0        TEST       RAX,RAX
    02659f4d 0f 94 c2        SETZ       DL
    02659f50 08 ca           OR         DL,CL
    02659f52 75 0b           JNZ        LAB_02659f5f
    02659f54 48 8b 38        MOV        RDI,qword ptr [RAX]
    02659f57 48 39 78 08     CMP        qword ptr [RAX + 0x8],RDI
    02659f5b 49 0f 44 fe     CMOVZ      RDI=>DAT_06c55ad8,R14
                         LAB_02659f5f                                    XREF[1]:     02659f52(j)  
    02659f5f 31 f6           XOR        ESI,ESI
    02659f61 e8 1a eb        CALL       FUN_003e8a80                                     undefined FUN_003e8a80()
             d8 fd
    02659f66 41 83 3c        CMP        dword ptr [R12],0x5
             24 05
    02659f6b 41 89 c7        MOV        R15D,EAX
    02659f6e 49 8b 44        MOV        RAX,qword ptr [R12 + 0x8]
             24 08
    02659f73 4c 89 f7        MOV        RDI=>DAT_06c55ad8,R14
    02659f76 0f 95 c1        SETNZ      CL
    02659f79 48 85 c0        TEST       RAX,RAX
    02659f7c 0f 94 c2        SETZ       DL
    02659f7f 08 ca           OR         DL,CL
    02659f81 74 37           JZ         LAB_02659fba
                         LAB_02659f83                                    XREF[2]:     02659fdf(j), 02659fe5(j)  
    02659f83 31 f6           XOR        ESI,ESI
    02659f85 e8 f6 ea        CALL       FUN_003e8a80                                     undefined FUN_003e8a80()
             d8 fd
    02659f8a 48 8b b3        MOV        RSI,qword ptr [RBX + 0x88]
             88 00 00 00
    02659f91 48 c1 e0 20     SHL        RAX,0x20
    02659f95 44 89 fa        MOV        EDX,R15D
    02659f98 48 09 c2        OR         RDX,RAX
    02659f9b 48 3b b3        CMP        RSI,qword ptr [RBX + 0x90]
             90 00 00 00
    02659fa2 74 43           JZ         LAB_02659fe7
    02659fa4 48 89 16        MOV        qword ptr [RSI],RDX
    02659fa7 48 83 83        ADD        qword ptr [RBX + 0x88],0x8
             88 00 00 
             00 08
                         LAB_02659faf                                    XREF[1]:     02659ff0(j)  
    02659faf 49 83 c4 18     ADD        R12,0x18
    02659fb3 4d 39 ec        CMP        R12,R13
    02659fb6 75 82           JNZ        LAB_02659f3a
    02659fb8 eb 38           JMP        LAB_02659ff2
                         LAB_02659fba                                    XREF[1]:     02659f81(j)  
    02659fba 48 8b 38        MOV        RDI,qword ptr [RAX]
    02659fbd 48 8b 40 08     MOV        RAX,qword ptr [RAX + 0x8]
    02659fc1 48 b9 ab        MOV        RCX,-0x5555555555555555
             aa aa aa 
             aa aa aa aa
    02659fcb 48 29 f8        SUB        RAX,RDI
    02659fce 48 c1 f8 03     SAR        RAX,0x3
    02659fd2 48 0f af c1     IMUL       RAX,RCX
    02659fd6 48 83 f8 02     CMP        RAX,0x2
    02659fda 73 05           JNC        LAB_02659fe1
    02659fdc 4c 89 f7        MOV        RDI=>DAT_06c55ad8,R14
    02659fdf eb a2           JMP        LAB_02659f83
                         LAB_02659fe1                                    XREF[1]:     02659fda(j)  
    02659fe1 48 83 c7 18     ADD        RDI,0x18
    02659fe5 eb 9c           JMP        LAB_02659f83
                         LAB_02659fe7                                    XREF[1]:     02659fa2(j)  
    02659fe7 48 8b 7d d0     MOV        RDI,qword ptr [RBP + local_38]
    02659feb e8 30 a4        CALL       FUN_01b14420                                     undefined FUN_01b14420()
             4b ff
    02659ff0 eb bd           JMP        LAB_02659faf
                         LAB_02659ff2                                    XREF[2]:     02659f22(j), 02659fb8(j)  
    02659ff2 48 83 c4 08     ADD        RSP,0x8
    02659ff6 5b              POP        RBX
    02659ff7 41 5c           POP        R12
    02659ff9 41 5d           POP        R13
    02659ffb 41 5e           POP        R14
    02659ffd 41 5f           POP        R15
    02659fff 5d              POP        RBP
    0265a000 c3              RET
    0265a001 cc              ??         CCh
    0265a002 cc              ??         CCh
    0265a003 cc              ??         CCh
    0265a004 cc              ??         CCh
    0265a005 cc              ??         CCh
    0265a006 cc              ??         CCh
    0265a007 cc              ??         CCh
    0265a008 cc              ??         CCh
    0265a009 cc              ??         CCh
    0265a00a cc              ??         CCh
    0265a00b cc              ??         CCh
    0265a00c cc              ??         CCh
    0265a00d cc              ??         CCh
    0265a00e cc              ??         CCh
    0265a00f cc              ??         CCh
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_0265a010()
         undefined         <UNASSIGNED>   <RETURN>
         undefined         Stack[-0x30]:1 local_30                                XREF[1]:     0265a075(*)  
         undefined8        Stack[-0x60]:8 local_60                                XREF[2]:     0265a038(W), 
                                                                                               0265a067(R)  
         undefined8        Stack[-0x390   local_390                               XREF[11]:    0265a0ca(R), 
                                                                                               0265a0e4(R), 
                                                                                               0265a0f1(R), 
                                                                                               0265a11d(R), 
                                                                                               0265a137(R), 
                                                                                               0265a144(R), 
                                                                                               0265a160(R), 
                                                                                               0265a1a6(R), 
                                                                                               0265a1f3(R), 
                                                                                               0265a316(R), 
                                                                                               0265a323(R)  
         undefined4        Stack[-0x3a0   local_3a0                               XREF[7]:     0265a04e(*), 
                                                                                               0265a05e(*), 
                                                                                               0265a09b(*), 
                                                                                               0265a153(*), 
                                                                                               0265a213(*), 
                                                                                               0265a330(*), 
                                                                                               0265a33d(*)  
         undefined8        Stack[-0x3e8   local_3e8                               XREF[1]:     0265a0c5(R)  
         undefined         Stack[-0x3f0   local_3f0                               XREF[1]:     0265a091(*)  
         undefined4        Stack[-0x3f4   local_3f4                               XREF[2]:     0265a0f9(*), 
                                                                                               0265a10c(R)  
         undefined1[16]    Stack[-0x408   local_408                               XREF[1,1]:   0265a1c6(W), 
                                                                                               0265a285(R)  
         undefined1        Stack[-0x40b   local_40b                               XREF[1]:     0265a1c1(W)  
         undefined1[21]    Stack[-0x420   local_420                               XREF[2,1]:   0265a180(*), 
                                                                                               0265a1b2(*), 
                                                                                               0265a1b8(W)  
         undefined8        Stack[-0x428   local_428                               XREF[4]:     0265a185(*), 
                                                                                               0265a236(R), 
                                                                                               0265a24b(W), 
                                                                                               0265a26b(W)  
         undefined1        Stack[-0x429   local_429                               XREF[3]:     0265a1e9(W), 
                                                                                               0265a200(*), 
                                                                                               0265a25e(R)  
         undefined8        Stack[-0x438   local_438                               XREF[2]:     0265a176(W), 
                                                                                               0265a273(R)  
         undefined8        Stack[-0x440   local_440                               XREF[3]:     0265a110(W), 
                                                                                               0265a1e4(R), 
                                                                                               0265a254(R)  
         undefined8        Stack[-0x448   local_448                               XREF[3]:     0265a19d(W), 
                                                                                               0265a229(R), 
                                                                                               0265a23f(W)  
         undefined8        Stack[-0x450   local_450                               XREF[3]:     0265a171(W), 
                                                                                               0265a224(R), 
                                                                                               0265a2bd(R)  
         undefined8        Stack[-0x458   local_458                               XREF[4]:     0265a194(W), 
                                                                                               0265a262(R), 
                                                                                               0265a2c9(W), 
                                                                                               0265a306(W)  
         undefined4        Stack[-0x45c   local_45c                               XREF[3]:     0265a18c(W), 
                                                                                               0265a2c2(R), 
                                                                                               0265a2de(W)  
                         FUN_0265a010                                    XREF[1]:     FUN_02659b10:02659e07(c)  
    0265a010 55              PUSH       RBP

](streamdown:incomplete-link)

Dr.Binary

That paste completes this page's command table — and it confirms what these debug camera pages actually are:

Full command set of this page (camera/replay authoring tool)

CommandActionContext fields touched
startPlayclear rec-flag; optional string (DAT_049384ae, starts with 'p' — likely "path") → ctx+0x380; collect dict["replayEvents"]; then FUN_0265a010 = start playback+0x3c8 ← 0, +0x3c0 ← +0x3a8
stopPlayctx+0x3c9 = 1stop flag
prepareRecordctx+0x418 = 1
startRecordctx+0x418 = 1; optional name string → eh_af90(ctx, …); FUN_0265a3b0 = begin recording
stopRecordctx+0x418 = 0; FUN_0265a500
notifyInstantReplaydict["offset"] → ctx+0x420; optional bool key DAT_04a43ba3 (starts with 'l') — false ⇒ ctx+0x430 = 1instant-replay marker
bypassdict["value"] → edge-detect into +0x3c8/+0x3cbbypass flag
DAT_04a43ba3 (as a command)ctx+0x3ca = 1

FUN_02659ef0 collects replayEvents — an array of 0x18-byte entries (or an inline array; the 0xAAAAAAAAAAAAAAAB multiply is the classic ÷3 for the 24-byte stride), each yielding a packed (int,int) pair → a vector at ctx+0x88. Those pairs are almost certainly (camera/cut id, frame) — the camera-cut schedule for a replay.

Verdict: this is the replay camera-work recorder/player — the tool PD devs used to record, scrub, and play back cinematic replay cameras (saveDefaultCamera/getDefaultCamera/scenario from the parent handler fit perfectly). Together with cameraDebug (timeline seek) it's now clear: PD's debug camera pages are replay-authoring tools, not a free camera. That's two full pages mapped, neither is what you're after.

Two tiny things to read while you're in there: click DAT_049384ae ('p'…) and DAT_04a43ba3 ('l'…) — the full strings will name the record path key and the live/loop flag, and DAT_04a43ba3 being both a value in FUN_02857670's emitted message and a command here means the playback state round-trips through the menu.

Where switchable cameras actually live

Since the debug pages are a dead end for your goal, aim at the gameplay camera system:

  1. FUN_02657dd0 — still the one I want most. It maps scenario id → camera target; paste it. If it's a DAT_xxx + id*8 table, dump the table — that's a concrete camera roster with indices.
  2. The camera manager class (param_1+0x36c0 in FUN_0042bb00 — methods +0x10 value, +0x18 window, +0x20 target). Click the object in the decompile → Ghidra resolves its vtable → dump the vtable. Look for getCount/getName-style methods and the bounds check in +0x20 — the clamp is the switchable count.
  3. The gameplay camera cycle list — string search (case-insensitive) for bumper, chase, cockpit, hood, interior, trackside, tvcam, heli, CameraWork. PD keeps camera mode names as plain strings somewhere — the cycle list and the debug roster both render from them.
  4. Who writes param_1+0x344f8 (current camera index in the scene, table at +0x34480, stride 0x28) — that's the live switch mechanism; its callers show what indices are legal in-game.

Paste FUN_02657dd0 plus the string-search hits and we'll have the actual camera list with indices — then forcing a specific camera is a one-value patch.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02657dd0()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_02657dd0                                    XREF[1]:     FUN_02657ac0:02657c47(c)  
    02657dd0 55              PUSH       RBP
    02657dd1 48 89 e5        MOV        RBP,RSP
    02657dd4 41 57           PUSH       R15
    02657dd6 41 56           PUSH       R14
    02657dd8 53              PUSH       RBX
    02657dd9 50              PUSH       RAX
    02657dda 41 89 fe        MOV        R14D,EDI
    02657ddd 89 f7           MOV        EDI,ESI
    02657ddf 89 f3           MOV        EBX,ESI
    02657de1 e8 5a 00        CALL       FUN_02657e40                                     undefined FUN_02657e40()
             00 00
    02657de6 4c 8b 78 28     MOV        R15,qword ptr [RAX + 0x28]
    02657dea 89 df           MOV        EDI,EBX
    02657dec e8 4f 00        CALL       FUN_02657e40                                     undefined FUN_02657e40()
             00 00
    02657df1 48 8b 40 28     MOV        RAX,qword ptr [RAX + 0x28]
    02657df5 49 63 ce        MOVSXD     RCX,R14D
    02657df8 4c 63 34 88     MOVSXD     R14,dword ptr [RAX + RCX*0x4]
    02657dfc 31 c0           XOR        EAX,EAX
    02657dfe 4d 85 f6        TEST       R14,R14
    02657e01 78 11           JS         LAB_02657e14
    02657e03 49 8b 4f 18     MOV        RCX,qword ptr [R15 + 0x18]
    02657e07 49 2b 4f 10     SUB        RCX,qword ptr [R15 + 0x10]
    02657e0b 48 c1 f9 02     SAR        RCX,0x2
    02657e0f 4c 39 f1        CMP        RCX,R14
    02657e12 77 0b           JA         LAB_02657e1f
                         LAB_02657e14                                    XREF[2]:     02657e01(j), 02657e32(j)  
    02657e14 48 83 c4 08     ADD        RSP,0x8
    02657e18 5b              POP        RBX
    02657e19 41 5e           POP        R14
    02657e1b 41 5f           POP        R15
    02657e1d 5d              POP        RBP
    02657e1e c3              RET
                         LAB_02657e1f                                    XREF[1]:     02657e12(j)  
    02657e1f 89 df           MOV        EDI,EBX
    02657e21 e8 1a 00        CALL       FUN_02657e40                                     undefined FUN_02657e40()
             00 00
    02657e26 48 8b 40 28     MOV        RAX,qword ptr [RAX + 0x28]
    02657e2a 48 8b 40 10     MOV        RAX,qword ptr [RAX + 0x10]
    02657e2e 42 8b 04 b0     MOV        EAX,dword ptr [RAX + R14*0x4]
    02657e32 eb e0           JMP        LAB_02657e14
    02657e34 cc              ??         CCh
    02657e35 cc              ??         CCh
    02657e36 cc              ??         CCh
    02657e37 cc              ??         CCh
    02657e38 cc              ??         CCh
    02657e39 cc              ??         CCh
    02657e3a cc              ??         CCh
    02657e3b cc              ??         CCh
    02657e3c cc              ??         CCh
    02657e3d cc              ??         CCh
    02657e3e cc              ??         CCh
    02657e3f cc              ??         CCh
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02657e40()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_02657e40                                    XREF[3]:     FUN_02657dd0:02657de1(c), 
                                                                                      FUN_02657dd0:02657dec(c), 
                                                                                      FUN_02657dd0:02657e21(c)  
    02657e40 55              PUSH       RBP
Dr.Binary

This one decodes cleanly — and it's a per-scenario camera-transition table:

FUN_02657dd0(cur_scn, requested_scn) decoded

obj = FUN_02657e40(requested_scn);        // scenario registry lookup
vec = obj->field_0x28;                    // std::vector<int>  (begin @+0x10, end @+0x18)

idx = vec[cur_scn];                       // indexed by the scenario you're LEAVING
if (idx < 0 || idx >= vec.size())         // bounds check → 0 on failure
    return 0;
return vec.begin[idx];                    // = the camera target to emit

Both registry lookups use the requested scenario; the vector is then indexed by the current scenario id. So each scenario owns an int[] meaning: "if you're coming from scenario N, switch to camera vec[N]" — a transition matrix. The returned value goes out as {"target": <int>} to the camera manager (+0x20), exactly as we saw in the scenario command handler.

Three consequences for your hunt

  1. The roster is per-scenario and heap-populated. The vector<int> at obj+0x28 is filled at load time — static analysis of the eboot can't read its contents. You have two routes:

    • Runtime dump: with a debugger/cheat tool, read the vector (begin/end pointers at +0x10/+0x18) for each scenario id — that's the literal switchable-camera list, ready to replay via the scenario command.
    • Find the loader: whoever does push_back on obj+0x28 parses the source data (probably an asset/config file, not code constants) — reference-hunt writes to +0x28/+0x10 near the registry functions.
  2. FUN_02657e40 is the registry — paste it. It reveals the global table (base address + object stride) and whether scenario objects are lazily created or pre-sized. From the base/stride you can enumerate every scenario object's +0x28 at runtime.

  3. To interpret the target ints, decompile the camera manager's +0x20 method (the "target" consumer from FUN_0042bb00's switch handler) — its bounds check and internal indexing tell you whether these ids are camera slots, camera-work entries, or scenario-local cams.

Perspective check

This remains replay/scenario tooling — a transition matrix for cinematic scenarios, consistent with everything else on these pages (startRecord/startPlay camera-work recorder, cameraDebug timeline scrubber). For gameplay cameras (chase/bumper/cockpit cycling, hidden trackside cams, etc.), the two leads that still matter are unchanged:

  • the camera manager vtable (from param_1+0x36c0) — its getCount/getName methods and the bounds check in +0x20 give the real in-race roster,
  • string sweeps for bumper / chase / cockpit / CameraWork / tvcam / trackside.

Paste FUN_02657e40 next — it's the last piece of this subsystem, and then I'd pivot to the camera manager vtable dump, which is where a gameplay free/hidden camera would actually live.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02657e40()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_02657e40                                    XREF[3]:     FUN_02657dd0:02657de1(c), 
                                                                                      FUN_02657dd0:02657dec(c), 
                                                                                      FUN_02657dd0:02657e21(c)  
    02657e40 55              PUSH       RBP
    02657e41 48 89 e5        MOV        RBP,RSP
    02657e44 41 57           PUSH       R15
    02657e46 41 56           PUSH       R14
    02657e48 41 55           PUSH       R13
    02657e4a 41 54           PUSH       R12
    02657e4c 53              PUSH       RBX
    02657e4d 50              PUSH       RAX
    02657e4e 4c 8b 25        MOV        R12,qword ptr [DAT_066f0758]
             03 89 09 04
    02657e55 45 31 f6        XOR        R14D,R14D
    02657e58 49 8b 54        MOV        RDX,qword ptr [R12 + 0x8]
             24 08
    02657e5d 80 7a 19 00     CMP        byte ptr [RDX + 0x19],0x0
    02657e61 74 20           JZ         LAB_02657e83
    02657e63 48 89 d3        MOV        RBX,RDX
    02657e66 4c 89 e0        MOV        RAX,R12
                         LAB_02657e69                                    XREF[1]:     02657ead(j)  
    02657e69 80 78 19 00     CMP        byte ptr [RAX + 0x19],0x0
    02657e6d 75 40           JNZ        LAB_02657eaf
    02657e6f 3b 78 20        CMP        EDI,dword ptr [RAX + 0x20]
    02657e72 7c 3b           JL         LAB_02657eaf
    02657e74 48 83 c4 08     ADD        RSP,0x8
    02657e78 5b              POP        RBX
    02657e79 41 5c           POP        R12
    02657e7b 41 5d           POP        R13
    02657e7d 41 5e           POP        R14
    02657e7f 41 5f           POP        R15
    02657e81 5d              POP        RBP
    02657e82 c3              RET
                         LAB_02657e83                                    XREF[1]:     02657e61(j)  
    02657e83 4c 89 e0        MOV        RAX,R12
                         LAB_02657e86                                    XREF[1]:     02657ea2(j)  
    02657e86 8b 4a 20        MOV        ECX,dword ptr [RDX + 0x20]
    02657e89 48 89 d3        MOV        RBX,RDX
    02657e8c 31 d2           XOR        EDX,EDX
    02657e8e 39 f9           CMP        ECX,EDI
    02657e90 0f 9c c2        SETL       DL
    02657e93 48 0f 4d c3     CMOVGE     RAX,RBX
    02657e97 c1 e2 04        SHL        EDX,0x4
    02657e9a 48 8b 14 13     MOV        RDX,qword ptr [RBX + RDX*0x1]
    02657e9e 80 7a 19 00     CMP        byte ptr [RDX + 0x19],0x0
    02657ea2 74 e2           JZ         LAB_02657e86
    02657ea4 45 31 f6        XOR        R14D,R14D
    02657ea7 39 f9           CMP        ECX,EDI
    02657ea9 41 0f 9d c6     SETGE      R14B
    02657ead eb ba           JMP        LAB_02657e69
                         LAB_02657eaf                                    XREF[2]:     02657e6d(j), 02657e72(j)  
    02657eaf 48 b8 55        MOV        RAX,0x555555555555555
             55 55 55 
             55 55 55 05
    02657eb9 48 39 05        CMP        qword ptr [DAT_066f0760],RAX
             a0 88 09 04
    02657ec0 74 43           JZ         LAB_02657f05
    02657ec2 41 89 fd        MOV        R13D,EDI
    02657ec5 bf 30 00        MOV        EDI,0x30
             00 00
    02657eca e8 31 24        CALL       <EXTERNAL>::operator.new                         void * operator.new(ulong param_1)
             8b 01
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
    02657ecf 48              ??         48h    H
    02657ed0 89              ??         89h
    02657ed1 df              ??         DFh
    02657ed2 44              ??         44h    D
    02657ed3 89              ??         89h
    02657ed4 f6              ??         F6h
    02657ed5 48              ??         48h    H
    02657ed6 89              ??         89h
    02657ed7 c2              ??         C2h
    02657ed8 44              ??         44h    D
    02657ed9 89              ??         89h
    02657eda 68              ??         68h    h
    02657edb 20              ??         20h     
    02657edc 48              ??         48h    H
    02657edd c7              ??         C7h
    02657ede 40              ??         40h    @
    02657edf 28              ??         28h    (
    02657ee0 00              ??         00h
    02657ee1 00              ??         00h
    02657ee2 00              ??         00h
    02657ee3 00              ??         00h
    02657ee4 4c              ??         4Ch    L
    02657ee5 89              ??         89h
    02657ee6 20              ??         20h     
    02657ee7 4c              ??         4Ch    L
    02657ee8 89              ??         89h
    02657ee9 60              ??         60h    `
    02657eea 08              ??         08h
    02657eeb 4c              ??         4Ch    L
    02657eec 89              ??         89h
    02657eed 60              ??         60h    `
    02657eee 10              ??         10h
    02657eef 49              ??         49h    I
    02657ef0 89              ??         89h
    02657ef1 c7              ??         C7h
    02657ef2 66              ??         66h    f
    02657ef3 c7              ??         C7h
    02657ef4 40              ??         40h    @
    02657ef5 18              ??         18h
    02657ef6 00              ??         00h
    02657ef7 00              ??         00h
    02657ef8 e8              ??         E8h
    02657ef9 c3              ??         C3h
    02657efa 7f              ??         7Fh    
    02657efb 53              ??         53h    S
    02657efc fe              ??         FEh
    02657efd 4c              ??         4Ch    L
    02657efe 89              ??         89h
    02657eff f8              ??         F8h
    02657f00 e9              ??         E9h
    02657f01 6f              ??         6Fh    o
    02657f02 ff              ??         FFh
    02657f03 ff              ??         FFh
    02657f04 ff              ??         FFh
                         LAB_02657f05                                    XREF[1]:     02657ec0(j)  
    02657f05 e8 b6 9d        CALL       FUN_016d1cc0                                     undefined FUN_016d1cc0()
             07 ff
    02657f0a 0f 0b           UD2
    02657f0c cc              ??         CCh
    02657f0d cc              ??         CCh
    02657f0e cc              ??         CCh
    02657f0f cc              ??         CCh
Dr.Binary

Registry decoded — this is the last structural piece of the scenario subsystem:

FUN_02657e40(scenario_id) = lazy map lookup + create

DAT_066f0758 is a global map<int, ScenarioRecord>* (custom RB-tree: each 0x30-byte node has left/right/parent pointers at +0x00/08/10, a flag/color pair at +0x18/19 — +0x19 != 0 marks the end/nil sentinel — the key int at +0x20, and the vector<int>* at +0x28 that FUN_02657dd0 indexes).

The walk is a standard descend (key < id → right child, else left, remembering the last key >= id node), and then:

  • Miss → allocate: operator.new(0x30), zero-init ({+0/+8/+0x10 = header ptrs, +0x18 = 0, +0x28 = NULL}), and insert — so scenario records are lazy-created with empty camera vectors.
  • Before insertion it checks DAT_066f0760 against 0x0555…5 — that's the classic std::vector::max_size() guard, and the overflow path calls the length_error thrower (FUN_016d1cc0 + UD2). So DAT_066f0760 is a companion std::vector — the ordered record list alongside the map.

So the full picture of this subsystem:

DAT_066f0758 : map<scenario_id → Record>
DAT_066f0760 : vector<Record*>            (ordered)
Record (0x30): { tree links, key:int @0x20, vector<int>* @0x28 }
vector<int>  = transition targets:  vec[from_scenario] → camera target id

What to do with it

1. Find the loader — one xref hop. FUN_02657e40 is only ever read through (3 calls, all from dd0). So whoever fills the vectors reaches the registry through DAT_066f0758/DAT_066f0760 directly. References → Show References to DAT_066f0758 (and DAT_066f0760) — the insert function will do new(0x30) + push into the map + fill obj+0x28's vector from parsed data. That loader is where the camera-target values come from — and whether they're parsed from an asset file or hardcoded.

2. Or skip static analysis and dump at runtime. The vectors are heap data; with a memory-read tool: walk DAT_066f0758's tree (nodes at [node+0x00/0x08] until +0x19 != 0), read key @+0x20 and vec: begin/end @ [obj+0x28]+0x10/+0x18 — that prints the whole transition matrix in minutes. This is genuinely the fastest route if you have any memory-reading payload working.

3. Interpret the target ids via the camera manager +0x20 method (the {"target": N} consumer) — still the open question of what the ints mean.

Standing recommendation

This subsystem is now fully mapped but confirmed as replay/scenario tooling. For gameplay cameras, the pivot I keep pointing at is still the highest-value move: camera manager vtable (object at param_1+0x36c0 in FUN_0042bb00 — click it, dump the vtable, look at the +0x20 set-target method's bounds check) plus the string sweep (bumper/chase/cockpit/CameraWork/trackside). Paste the DAT_066f0758 references and the camera manager vtable when you have them, and we'll close on whichever turns out to hold the real camera roster.

    05157048 58 52 58        addr       PTR_vtable_05585258                              = 07d7e080
             05 00 00 
             00 00
    05157050 98 d3 93        addr       s_ONBOARD_BONNET_0493d398                        = "ONBOARD_BONNET"
             04 00 00 
             00 00
    05157058 00              ??         00h
    05157059 00              ??         00h
    0515705a 00              ??         00h
    0515705b 00              ??         00h
    0515705c 00              ??         00h
    0515705d 00              ??         00h
    0515705e 00              ??         00h
    0515705f 00              ??         00h
    05157060 f9              ??         F9h                                              ?  ->  047a77f9
    05157061 77              ??         77h    w
    05157062 7a              ??         7Ah    z
    05157063 04              ??         04h
    05157064 00              ??         00h
    05157065 00              ??         00h                                              ?  ->  01000000
    05157066 00              ??         00h                                              ?  ->  00010000
    05157067 00              ??         00h                                              ?  ->  00000100
    05157068 01              ??         01h                                              ?  ->  00000001
    05157069 00              ??         00h
    0515706a 00              ??         00h
    0515706b 00              ??         00h
    0515706c 00              ??         00h
    0515706d 00              ??         00h
    0515706e 00              ??         00h
    0515706f 00              ??         00h
    05157070 d0              ??         D0h                                              ?  ->  04a66ad0
    05157071 6a              ??         6Ah    j
    05157072 a6              ??         A6h
    05157073 04              ??         04h
    05157074 00              ??         00h
    05157075 00              ??         00h                                              ?  ->  02000000
    05157076 00              ??         00h                                              ?  ->  00020000
    05157077 00              ??         00h                                              ?  ->  00000200
    05157078 02              ??         02h                                              ?  ->  00000002
    05157079 00              ??         00h
    0515707a 00              ??         00h
    0515707b 00              ??         00h
    0515707c 00              ??         00h
    0515707d 00              ??         00h
    0515707e 00              ??         00h
    0515707f 00              ??         00h
    05157080 5e              ??         5Eh    ^                                         ?  ->  049a8e5e
    05157081 8e              ??         8Eh
    05157082 9a              ??         9Ah
    05157083 04              ??         04h
    05157084 00              ??         00h
    05157085 00              ??         00h                                              ?  ->  03000000
    05157086 00              ??         00h                                              ?  ->  00030000
    05157087 00              ??         00h                                              ?  ->  00000300
    05157088 03              ??         03h                                              ?  ->  00000003
    05157089 00              ??         00h
    0515708a 00              ??         00h
    0515708b 00              ??         00h
    0515708c 00              ??         00h
    0515708d 00              ??         00h
    0515708e 00              ??         00h
    0515708f 00              ??         00h
    05157090 a1              ??         A1h                                              ?  ->  049077a1
    05157091 77              ??         77h    w
    05157092 90              ??         90h
    05157093 04              ??         04h
    05157094 00              ??         00h
    05157095 00              ??         00h                                              ?  ->  04000000
    05157096 00              ??         00h                                              ?  ->  00040000
    05157097 00              ??         00h                                              ?  ->  00000400
    05157098 04              ??         04h                                              ?  ->  00000004
    05157099 00              ??         00h
    0515709a 00              ??         00h
    0515709b 00              ??         00h
    0515709c 00              ??         00h
    0515709d 00              ??         00h
    0515709e 00              ??         00h
    0515709f 00              ??         00h
    051570a0 c9              ??         C9h                                              ?  ->  0498dcc9
    051570a1 dc              ??         DCh
    051570a2 98              ??         98h
    051570a3 04              ??         04h
    051570a4 00              ??         00h
    051570a5 00              ??         00h                                              ?  ->  05000000
    051570a6 00              ??         00h                                              ?  ->  00050000
    051570a7 00              ??         00h                                              ?  ->  00000500
    051570a8 05              ??         05h                                              ?  ->  00000005
    051570a9 00              ??         00h
    051570aa 00              ??         00h
    051570ab 00              ??         00h
    051570ac 00              ??         00h
    051570ad 00              ??         00h
    051570ae 00              ??         00h
    051570af 00              ??         00h
    051570b0 78              ??         78h    x                                         ?  ->  04a79178
    051570b1 91              ??         91h
    051570b2 a7              ??         A7h
    051570b3 04              ??         04h
    051570b4 00              ??         00h
    051570b5 00              ??         00h                                              ?  ->  06000000
    051570b6 00              ??         00h                                              ?  ->  00060000
    051570b7 00              ??         00h                                              ?  ->  00000600
    051570b8 06              ??         06h                                              ?  ->  00000006
    051570b9 00              ??         00h
    051570ba 00              ??         00h
    051570bb 00              ??         00h
    051570bc 00              ??         00h
    051570bd 00              ??         00h
    051570be 00              ??         00h
    051570bf 00              ??         00h
    051570c0 07              ??         07h                                              ?  ->  047a7807
    051570c1 78              ??         78h    x
    051570c2 7a              ??         7Ah    z
    051570c3 04              ??         04h
    051570c4 00              ??         00h
    051570c5 00              ??         00h                                              ?  ->  07000000
    051570c6 00              ??         00h                                              ?  ->  00070000
    051570c7 00              ??         00h                                              ?  ->  00000700
    051570c8 07              ??         07h                                              ?  ->  00000007
    051570c9 00              ??         00h
    051570ca 00              ??         00h
    051570cb 00              ??         00h
    051570cc 00              ??         00h
    051570cd 00              ??         00h
    051570ce 00              ??         00h
    051570cf 00              ??         00h
    051570d0 ae              ??         AEh                                              ?  ->  048141ae
    051570d1 41              ??         41h    A
    051570d2 81              ??         81h
    051570d3 04              ??         04h
    051570d4 00              ??         00h
    051570d5 00              ??         00h
    051570d6 00              ??         00h                                              ?  ->  00080000
    051570d7 00              ??         00h                                              ?  ->  00000800
    051570d8 08              ??         08h                                              ?  ->  00000008
    051570d9 00              ??         00h
    051570da 00              ??         00h
    051570db 00              ??         00h
    051570dc 00              ??         00h
    051570dd 00              ??         00h
    051570de 00              ??         00h
    051570df 00              ??         00h
    051570e0 3a              ??         3Ah    :                                         ?  ->  04865b3a
    051570e1 5b              ??         5Bh    [
    051570e2 86              ??         86h
    051570e3 04              ??         04h
    051570e4 00              ??         00h
    051570e5 00              ??         00h
    051570e6 00              ??         00h                                              ?  ->  00090000
    051570e7 00              ??         00h                                              ?  ->  00000900
    051570e8 09              ??         09h                                              ?  ->  00000009
    051570e9 00              ??         00h
    051570ea 00              ??         00h
    051570eb 00              ??         00h
    051570ec 00              ??         00h
    051570ed 00              ??         00h
    051570ee 00              ??         00h
    051570ef 00              ??         00h
    051570f0 aa              ??         AAh                                              ?  ->  049586aa
    051570f1 86              ??         86h
    051570f2 95              ??         95h
    051570f3 04              ??         04h
    051570f4 00              ??         00h
    051570f5 00              ??         00h
    051570f6 00              ??         00h                                              ?  ->  000a0000
    051570f7 00              ??         00h                                              ?  ->  00000a00
    051570f8 0a              ??         0Ah                                              ?  ->  0000000a
    051570f9 00              ??         00h
    051570fa 00              ??         00h
    051570fb 00              ??         00h
    051570fc 00              ??         00h
    051570fd 00              ??         00h
    051570fe 00              ??         00h
    051570ff 00              ??         00h
    05157100 d6              ??         D6h                                              ?  ->  0489bbd6
    05157101 bb              ??         BBh
    05157102 89              ??         89h
    05157103 04              ??         04h
    05157104 00              ??         00h
    05157105 00              ??         00h
    05157106 00              ??         00h                                              ?  ->  000b0000
    05157107 00              ??         00h                                              ?  ->  00000b00
    05157108 0b              ??         0Bh                                              ?  ->  0000000b
    05157109 00              ??         00h
    0515710a 00              ??         00h
    0515710b 00              ??         00h
    0515710c 00              ??         00h
    0515710d 00              ??         00h
    0515710e 00              ??         00h
    0515710f 00              ??         00h
    05157110 c4              ??         C4h                                              ?  ->  047570c4
    05157111 70              ??         70h    p
    05157112 75              ??         75h    u
    05157113 04              ??         04h
    05157114 00              ??         00h
    05157115 00              ??         00h
    05157116 00              ??         00h                                              ?  ->  000c0000
    05157117 00              ??         00h                                              ?  ->  00000c00
    05157118 0c              ??         0Ch                                              ?  ->  0000000c
    05157119 00              ??         00h
    0515711a 00              ??         00h
    0515711b 00              ??         00h
    0515711c 00              ??         00h
    0515711d 00              ??         00h
    0515711e 00              ??         00h
    0515711f 00              ??         00h
    05157120 af              ??         AFh                                              ?  ->  049077af
    05157121 77              ??         77h    w
    05157122 90              ??         90h
    05157123 04              ??         04h
    05157124 00              ??         00h
    05157125 00              ??         00h
    05157126 00              ??         00h                                              ?  ->  000d0000
    05157127 00              ??         00h                                              ?  ->  00000d00
    05157128 0d              ??         0Dh                                              ?  ->  0000000d
    05157129 00              ??         00h
    0515712a 00              ??         00h
    0515712b 00              ??         00h
    0515712c 00              ??         00h
    0515712d 00              ??         00h
    0515712e 00              ??         00h
    0515712f 00              ??         00h
    05157130 7b              ??         7Bh    {                                         ?  ->  0482fc7b
    05157131 fc              ??         FCh
    05157132 82              ??         82h
    05157133 04              ??         04h
    05157134 00              ??         00h
    05157135 00              ??         00h
    05157136 00              ??         00h                                              ?  ->  000e0000
    05157137 00              ??         00h                                              ?  ->  00000e00
    05157138 0e              ??         0Eh                                              ?  ->  0000000e
    05157139 00              ??         00h
    0515713a 00              ??         00h
    0515713b 00              ??         00h
    0515713c 00              ??         00h
    0515713d 00              ??         00h
    0515713e 00              ??         00h
    0515713f 00              ??         00h
    05157140 29              ??         29h    )                                         ?  ->  0478ca29
    05157141 ca              ??         CAh
    05157142 78              ??         78h    x
    05157143 04              ??         04h
    05157144 00              ??         00h
    05157145 00              ??         00h
    05157146 00              ??         00h                                              ?  ->  000f0000
    05157147 00              ??         00h                                              ?  ->  00000f00
    05157148 0f              ??         0Fh                                              ?  ->  0000000f
    05157149 00              ??         00h
    0515714a 00              ??         00h
    0515714b 00              ??         00h
    0515714c 00              ??         00h
    0515714d 00              ??         00h
    0515714e 00              ??         00h
    0515714f 00              ??         00h
    05157150 e8              ??         E8h                                              ?  ->  049734e8
    05157151 34              ??         34h    4
    05157152 97              ??         97h
    05157153 04              ??         04h
    05157154 00              ??         00h
    05157155 00              ??         00h
    05157156 00              ??         00h                                              ?  ->  00100000
    05157157 00              ??         00h                                              ?  ->  00001000
    05157158 10              ??         10h                                              ?  ->  00000010
    05157159 00              ??         00h
    0515715a 00              ??         00h
    0515715b 00              ??         00h
    0515715c 00              ??         00h
    0515715d 00              ??         00h
    0515715e 00              ??         00h
    0515715f 00              ??         00h
    05157160 0f              ??         0Fh                                              ?  ->  047a780f
    05157161 78              ??         78h    x
    05157162 7a              ??         7Ah    z
    05157163 04              ??         04h
    05157164 00              ??         00h
    05157165 00              ??         00h
    05157166 00              ??         00h                                              ?  ->  00110000
    05157167 00              ??         00h                                              ?  ->  00001100
    05157168 11              ??         11h                                              ?  ->  00000011
    05157169 00              ??         00h
    0515716a 00              ??         00h
    0515716b 00              ??         00h
    0515716c 00              ??         00h
    0515716d 00              ??         00h
    0515716e 00              ??         00h
    0515716f 00              ??         00h
    05157170 87              ??         87h                                              ?  ->  048d0c87
    05157171 0c              ??         0Ch
    05157172 8d              ??         8Dh
    05157173 04              ??         04h
    05157174 00              ??         00h
    05157175 00              ??         00h
    05157176 00              ??         00h                                              ?  ->  00120000
    05157177 00              ??         00h                                              ?  ->  00001200
    05157178 12              ??         12h                                              ?  ->  00000012
    05157179 00              ??         00h
    0515717a 00              ??         00h
    0515717b 00              ??         00h
    0515717c 00              ??         00h
    0515717d 00              ??         00h
    0515717e 00              ??         00h
    0515717f 00              ??         00h
    05157180 88              ??         88h                                              ?  ->  04a4b988
    05157181 b9              ??         B9h
    05157182 a4              ??         A4h
    05157183 04              ??         04h
    05157184 00              ??         00h
    05157185 00              ??         00h
    05157186 00              ??         00h                                              ?  ->  00130000
    05157187 00              ??         00h                                              ?  ->  00001300
    05157188 13              ??         13h                                              ?  ->  00000013
    05157189 00              ??         00h
    0515718a 00              ??         00h
    0515718b 00              ??         00h
    0515718c 00              ??         00h
    0515718d 00              ??         00h
    0515718e 00              ??         00h
    0515718f 00              ??         00h
    05157190 bb              ??         BBh                                              ?  ->  047f11bb
    05157191 11              ??         11h
    05157192 7f              ??         7Fh    
    05157193 04              ??         04h
    05157194 00              ??         00h
    05157195 00              ??         00h
    05157196 00              ??         00h                                              ?  ->  00140000
    05157197 00              ??         00h                                              ?  ->  00001400
    05157198 14              ??         14h                                              ?  ->  00000014
    05157199 00              ??         00h
    0515719a 00              ??         00h
    0515719b 00              ??         00h
    0515719c 00              ??         00h
    0515719d 00              ??         00h
    0515719e 00              ??         00h
    0515719f 00              ??         00h
    051571a0 91              ??         91h                                              ?  ->  0496b691
    051571a1 b6              ??         B6h
    051571a2 96              ??         96h
    051571a3 04              ??         04h
    051571a4 00              ??         00h
    051571a5 00              ??         00h
    051571a6 00              ??         00h                                              ?  ->  00150000
    051571a7 00              ??         00h                                              ?  ->  00001500
    051571a8 15              ??         15h                                              ?  ->  00000015
    051571a9 00              ??         00h
    051571aa 00              ??         00h
    051571ab 00              ??         00h
    051571ac 00              ??         00h
    051571ad 00              ??         00h
    051571ae 00              ??         00h
    051571af 00              ??         00h
    051571b0 8f              ??         8Fh                                              ?  ->  04a4b98f
    051571b1 b9              ??         B9h
    051571b2 a4              ??         A4h
    051571b3 04              ??         04h
    051571b4 00              ??         00h
    051571b5 00              ??         00h
    051571b6 00              ??         00h                                              ?  ->  00160000
    051571b7 00              ??         00h                                              ?  ->  00001600
    051571b8 16              ??         16h                                              ?  ->  00000016
    051571b9 00              ??         00h
    051571ba 00              ??         00h
    051571bb 00              ??         00h
    051571bc 00              ??         00h
    051571bd 00              ??         00h
    051571be 00              ??         00h
    051571bf 00              ??         00h
    051571c0 aa              ??         AAh                                              ?  ->  04919daa
    051571c1 9d              ??         9Dh
    051571c2 91              ??         91h
    051571c3 04              ??         04h
    051571c4 00              ??         00h
    051571c5 00              ??         00h
    051571c6 00              ??         00h                                              ?  ->  00170000
    051571c7 00              ??         00h                                              ?  ->  00001700
    051571c8 17              ??         17h                                              ?  ->  00000017
    051571c9 00              ??         00h
    051571ca 00              ??         00h
    051571cb 00              ??         00h
    051571cc 00              ??         00h
    051571cd 00              ??         00h
    051571ce 00              ??         00h
    051571cf 00              ??         00h
    051571d0 6d              ??         6Dh    m                                         ?  ->  049a8e6d
    051571d1 8e              ??         8Eh
    051571d2 9a              ??         9Ah
    051571d3 04              ??         04h
    051571d4 00              ??         00h
    051571d5 00              ??         00h
    051571d6 00              ??         00h                                              ?  ->  00180000
    051571d7 00              ??         00h                                              ?  ->  00001800
    051571d8 18              ??         18h                                              ?  ->  00000018
    051571d9 00              ??         00h
    051571da 00              ??         00h
    051571db 00              ??         00h
    051571dc 00              ??         00h
    051571dd 00              ??         00h
    051571de 00              ??         00h
    051571df 00              ??         00h
    051571e0 80              ??         80h                                              ?  ->  04934580
    051571e1 45              ??         45h    E
    051571e2 93              ??         93h
    051571e3 04              ??         04h
    051571e4 00              ??         00h
    051571e5 00              ??         00h
    051571e6 00              ??         00h                                              ?  ->  00190000
    051571e7 00              ??         00h                                              ?  ->  00001900
    051571e8 19              ??         19h                                              ?  ->  00000019
    051571e9 00              ??         00h
    051571ea 00              ??         00h
    051571eb 00              ??         00h
    051571ec 00              ??         00h
    051571ed 00              ??         00h
    051571ee 00              ??         00h
    051571ef 00              ??         00h
    051571f0 47              ??         47h    G                                         ?  ->  04880047
    051571f1 00              ??         00h                                              ?  ->  00048800
    051571f2 88              ??         88h                                              ?  ->  00000488
    051571f3 04              ??         04h                                              ?  ->  00000004
    051571f4 00              ??         00h
    051571f5 00              ??         00h
    051571f6 00              ??         00h
    051571f7 00              ??         00h
    051571f8 00              ??         00h
    051571f9 00              ??         00h
    051571fa 00              ??         00h
    051571fb 00              ??         00h
    051571fc 00              ??         00h
    051571fd 00              ??         00h
    051571fe 00              ??         00h
    051571ff 00              ??         00h
    05157200 9f              ??         9Fh                                              ?  ->  049dd29f
    05157201 d2              ??         D2h                                              ?  ->  00049dd2
    05157202 9d              ??         9Dh                                              ?  ->  0000049d
    05157203 04              ??         04h                                              ?  ->  00000004
    05157204 00              ??         00h
    05157205 00              ??         00h
    05157206 00              ??         00h
    05157207 00              ??         00h
    05157208 00              ??         00h
    05157209 00              ??         00h
    0515720a 00              ??         00h
    0515720b 00              ??         00h
    0515720c 00              ??         00h
    0515720d 00              ??         00h
    0515720e 00              ??         00h
    0515720f 00              ??         00h
    05157210 b4              ??         B4h                                              ?  ->  049077b4
    05157211 77              ??         77h    w
    05157212 90              ??         90h
    05157213 04              ??         04h
    05157214 00              ??         00h
    05157215 00              ??         00h                                              ?  ->  01000000
    05157216 00              ??         00h                                              ?  ->  00010000
    05157217 00              ??         00h                                              ?  ->  00000100
    05157218 01              ??         01h                                              ?  ->  00000001
    05157219 00              ??         00h
    0515721a 00              ??         00h
    0515721b 00              ??         00h
    0515721c 00              ??         00h
    0515721d 00              ??         00h
    0515721e 00              ??         00h
    0515721f 00              ??         00h
    05157220 dd              ??         DDh                                              ?  ->  0498dcdd
    05157221 dc              ??         DCh
    05157222 98              ??         98h
    05157223 04              ??         04h
    05157224 00              ??         00h
    05157225 00              ??         00h                                              ?  ->  02000000
    05157226 00              ??         00h                                              ?  ->  00020000
    05157227 00              ??         00h                                              ?  ->  00000200
    05157228 02              ??         02h                                              ?  ->  00000002
    05157229 00              ??         00h
    0515722a 00              ??         00h
    0515722b 00              ??         00h
    0515722c 00              ??         00h
    0515722d 00              ??         00h
    0515722e 00              ??         00h
    0515722f 00              ??         00h
    05157230 37              ??         37h    7                                         ?  ->  04720b37
    05157231 0b              ??         0Bh
    05157232 72              ??         72h    r
    05157233 04              ??         04h
    05157234 00              ??         00h
    05157235 00              ??         00h                                              ?  ->  03000000
    05157236 00              ??         00h                                              ?  ->  00030000
    05157237 00              ??         00h                                              ?  ->  00000300
    05157238 03              ??         03h                                              ?  ->  00000003
    05157239 00              ??         00h
    0515723a 00              ??         00h
    0515723b 00              ??         00h
    0515723c 00              ??         00h
    0515723d 00              ??         00h
    0515723e 00              ??         00h
    0515723f 00              ??         00h
    05157240 40              ??         40h    @                                         ?  ->  04720b40
    05157241 0b              ??         0Bh
    05157242 72              ??         72h    r
    05157243 04              ??         04h
    05157244 00              ??         00h
    05157245 00              ??         00h                                              ?  ->  04000000
    05157246 00              ??         00h                                              ?  ->  00040000
    05157247 00              ??         00h                                              ?  ->  00000400
    05157248 04              ??         04h                                              ?  ->  00000004
    05157249 00              ??         00h
    0515724a 00              ??         00h
    0515724b 00              ??         00h
    0515724c 00              ??         00h
    0515724d 00              ??         00h
    0515724e 00              ??         00h
    0515724f 00              ??         00h
    05157250 de              ??         DEh                                              ?  ->  0489bbde
    05157251 bb              ??         BBh
    05157252 89              ??         89h
    05157253 04              ??         04h
    05157254 00              ??         00h
    05157255 00              ??         00h                                              ?  ->  05000000
    05157256 00              ??         00h                                              ?  ->  00050000
    05157257 00              ??         00h                                              ?  ->  00000500
    05157258 05              ??         05h                                              ?  ->  00000005
    05157259 00              ??         00h
    0515725a 00              ??         00h
    0515725b 00              ??         00h
    0515725c 00              ??         00h
    0515725d 00              ??         00h
    0515725e 00              ??         00h
    0515725f 00              ??         00h
    05157260 25              ??         25h    %                                         ?  ->  04843225
    05157261 32              ??         32h    2
    05157262 84              ??         84h
    05157263 04              ??         04h
    05157264 00              ??         00h
    05157265 00              ??         00h                                              ?  ->  06000000
    05157266 00              ??         00h                                              ?  ->  00060000
    05157267 00              ??         00h                                              ?  ->  00000600
    05157268 06              ??         06h                                              ?  ->  00000006
    05157269 00              ??         00h
    0515726a 00              ??         00h
    0515726b 00              ??         00h
    0515726c 00              ??         00h
    0515726d 00              ??         00h
    0515726e 00              ??         00h
    0515726f 00              ??         00h
    05157270 14              ??         14h                                              ?  ->  04772514
    05157271 25              ??         25h    %
    05157272 77              ??         77h    w
    05157273 04              ??         04h
    05157274 00              ??         00h
    05157275 00              ??         00h                                              ?  ->  07000000
    05157276 00              ??         00h                                              ?  ->  00070000
    05157277 00              ??         00h                                              ?  ->  00000700
    05157278 07              ??         07h                                              ?  ->  00000007
    05157279 00              ??         00h
    0515727a 00              ??         00h
    0515727b 00              ??         00h
    0515727c 00              ??         00h
    0515727d 00              ??         00h
    0515727e 00              ??         00h
    0515727f 00              ??         00h
    05157280 83              ??         83h                                              ?  ->  04863583
    05157281 35              ??         35h    5
    05157282 86              ??         86h
    05157283 04              ??         04h
    05157284 00              ??         00h
    05157285 00              ??         00h
    05157286 00              ??         00h                                              ?  ->  00080000
    05157287 00              ??         00h                                              ?  ->  00000800
    05157288 08              ??         08h                                              ?  ->  00000008
    05157289 00              ??         00h
    0515728a 00              ??         00h
    0515728b 00              ??         00h
    0515728c 00              ??         00h
    0515728d 00              ??         00h
    0515728e 00              ??         00h
    0515728f 00              ??         00h
    05157290 ca              ??         CAh                                              ?  ->  0484acca
    05157291 ac              ??         ACh
    05157292 84              ??         84h
    05157293 04              ??         04h
    05157294 00              ??         00h
    05157295 00              ??         00h
    05157296 00              ??         00h                                              ?  ->  00090000
    05157297 00              ??         00h                                              ?  ->  00000900
    05157298 09              ??         09h                                              ?  ->  00000009
    05157299 00              ??         00h
    0515729a 00              ??         00h
    0515729b 00              ??         00h
    0515729c 00              ??         00h
    0515729d 00              ??         00h
    0515729e 00              ??         00h
    0515729f 00              ??         00h
    051572a0 b5              ??         B5h                                              ?  ->  049586b5
    051572a1 86              ??         86h
    051572a2 95              ??         95h
    051572a3 04              ??         04h
    051572a4 00              ??         00h
    051572a5 00              ??         00h
    051572a6 00              ??         00h                                              ?  ->  000a0000
    051572a7 00              ??         00h                                              ?  ->  00000a00
    051572a8 0a              ??         0Ah                                              ?  ->  0000000a
    051572a9 00              ??         00h
    051572aa 00              ??         00h
    051572ab 00              ??         00h
    051572ac 00              ??         00h
    051572ad 00              ??         00h
    051572ae 00              ??         00h
    051572af 00              ??         00h
    051572b0 cb              ??         CBh                                              ?  ->  04921ecb
    051572b1 1e              ??         1Eh
    051572b2 92              ??         92h
    051572b3 04              ??         04h

](streamdown:incomplete-link)

Dr.Binary

Jackpot. That's the camera name/ID enum table — the actual switchable-camera roster. Look at the structure: a vtable pointer (PTR_vtable_05585258) followed by a class member whose first entry is literally "ONBOARD_BONNET", then clean 0x20-byte records:

entry: {
  +0x00: char* name        (e.g. 0x0493d398 → "ONBOARD_BONNET")
  +0x18: dword index       (01, 02, 03, … 19h)
}

Two tables are visible in your paste:

TableRangeEntries
A0x05157060 → 0x051571efindices 1–25 (25 named cameras), plus two special entries (04880047, 049dd29f) with no incrementing index
B0x05157210 → onwardindices 1–0x0a+ (second enum — likely another camera category)

Name pointers visible in the paste: 0493d398 (ONBOARD_BONNET), 047a77f9, 04a66ad0, 049a8e5e, 049077a1, 0498dcc9, 04a79178, 047a7807, 048141ae, 04865b3a, 049586aa, 0489bbd6, 047570c4, 049077af, 0482fc7b, 0478ca29, 049734e8, 047a780f, 048d0c87, 04a4b988, 047f11bb, 0496b691, 04a4b98f, 04919daa, 049a8e6d, 04934580, …

Why this is the answer to your question

  1. The index column is almost certainly the {"target": N} value space — the camera manager (+0x20) switch ids we've been chasing since FUN_0042bb00. The scenario transition table's ints should now decode to these names.
  2. 25 + 10+ named cameras — far beyond the retail cycle (bumper/chase/cockpit), which is exactly where a trackside/TV/cinematic roster would hide.

Three steps to finish

1. Resolve the names. The strings cluster in the rodata blob around 0x0493d398 — Search → For Strings with filter ONBOARD (PD names them ONBOARD_BONNET, ONBOARD_DRIVER, …) and also click each pointer above. Paste the resolved name list and I'll produce the full roster table (index → name → likely usage).

2. Find the consumer. References to the table base (0x05157048 region) or the vtable 0x05585258 → the lookup function (name↔id conversion) and the camera-manager switch method. The bounds check there tells you which table is live in which mode (25 = race/replay? 10 = photo/scapes?). Then the switch event's "target" values become nameable — and forceable.

3. Cross-reference the scenario matrix. The vector<int> transition targets from FUN_02657dd0 should now map onto these indices — confirming whether the replay tooling switches these same cameras.

Paste the resolved strings for both tables (indices 1–25 and 1–10) and I'll lay out the complete camera roster — that's the deliverable you've been digging toward, and from there "switch to camera N" is just knowing which N does what.

whats the adress i can patch to cycle through the cameras?

Dr.Binary

Honest answer: there's no verified patch address yet — we've found the roster (the enum table), but not the live cycle mechanism. What we do know tells us exactly what the patch will look like, and you're two pastes away from it.

What the patch will be

Camera cycling is always the same shape: index = (index + 1) % COUNT, where COUNT is a bounds-checked constant. So the address you want is the clamp/bounds check inside the camera-manager's set-target or cycle method — and raising that immediate (e.g., from the retail count to 25, table A's size) is the classic "unlock hidden cameras" patch: the existing cycle button then reaches cameras PD doesn't expose.

Getting the exact address — two paths, pick either

Path A — the camera manager's set-target method (recommended):

  1. In FUN_0042bb00, find this line in the switch event handler:
    plVar23 = *(long **)(param_1 + 0x36c0);
    (**(code **)(*plVar23 + 0x18))(plVar23, uVar16);   // set window
    (**(code **)(*plVar23 + 0x20))(plVar23, uVar16);   // set target
    
  2. Click *plVar23 → Ghidra resolves the vtable symbol → open it → look at slots +0x18 and +0x20.
  3. Decompile the +0x20 method. Somewhere in it you'll see the bounds check against the current camera count (CMP EAX, 0xN / JA/JAE, or a % by a constant). That immediate is your patch target.

Path B — the live camera slot writer: The scene keeps the current camera at param_1+0x344f8 (objects table at +0x34480, stride 0x28). Whoever writes +0x344f8 is the cycle/switch function. In Ghidra: with the scene struct typed (or by searching the camera-manager class methods for offset 0x344f8 stores) — the writer contains the same increment+wrap.

What to paste

  1. The camera manager vtable (from step A.2) — just the symbol name and the first ~0x28 bytes of function pointers.
  2. The decompilation of the +0x20 slot's function (and +0x18 if it looks relevant).

From those I'll give you the exact instruction address, the original bytes, and the patched bytes (file offset included if you upload the eboot) — most likely a 1–4 byte immediate swap to extend the cycle range to the full 25-camera roster, plus optionally which indices map to which names so you know what you'll land on.

Two cautions

  • Hidden cameras may not be initialized per-scene — cycling into a trackside/TV cam slot on a track without camera-work data can give a static or garbage view (reversible by cycling again; no crash in most implementations, but test in a replay first).
  • Same as always: offline only, back up the eboot, note the original bytes.

Paste the vtable + the +0x20 method and this closes.

                         PS5 relocation addend: 0x10
                         PTR_vtable_05585258                             XREF[20]:    eh_77490:000774a7(*), 
                                                                                      eh_7c690:0007c6c4(*), 
                                                                                      eh_7cc40:0007cc57(*), 
                                                                                      eh_b7260:000b727b(*), 
                                                                                      eh_b7340:000b7365(*), 
                                                                                      eh_b82a0:000b82c5(*), 
                                                                                      eh_b8610:000b8627(*), 
                                                                                      eh_b8610:000b8652(*), 
                                                                                      eh_b8690:000b86a7(*), 
                                                                                      eh_b86e0:000b8705(*), 
                                                                                      eh_b88e0:000b88fb(*), 
                                                                                      eh_b8b20:000b8b45(*), 
                                                                                      eh_bb200:000bb217(*), 
                                                                                      eh_bb200:000bb249(*), 
                                                                                      eh_274420:00274453(*), 
                                                                                      eh_2d2640:002d2657(*), 
                                                                                      eh_365850:00365872(*), 
                                                                                      eh_366140:00366157(*), 
                                                                                      FUN_0056ab60:0056ab77(*), 
                                                                                      FUN_00c411b0:00c411c7(*), [more]
    05585258 80 e0 d7        pointer    __cxxabiv1::__si_class_type_info::vtable+0x10    = ??
             07 00 00 
             00 00
Dr.Binary

That paste just changed the picture in an important way — that's not a class vtable, it's RTTI:

PTR_vtable_05585258 resolves into __cxxabiv1::__si_class_type_info — i.e. the object at 0x05585250ish is a type_info for the class that owns the enum table. And that reframes what you found at 0x05157048:

The table is an enum-property descriptor for the debug menu. Structure: typeinfo pointer + a char* label + {name, value} records (ONBOARD_BONNET = 1, …, 25). That's a dropdown definition — the debug menu property framework (eh_b7260…eh_bb200 in the xref list = the enum-property class methods, same 00b7/00bb neighborhood as FUN_00831c0/FUN_00b7def0) renders it as a selectable list and writes the chosen id somewhere.

Which means: the debug menu already contains a 25-entry camera selector — the IDs in that enum are almost certainly the values that land in the camera-switch path ({"target": N} / the camera manager). You don't need to build cycling — you need to find where the selected value gets applied.

The xref list hands you the candidates

The framework methods (eh_b72xx–eh_bb2xx) are just get/set plumbing. The consumers — the functions that reference this enum from outside the property class — are the interesting ones:

  • eh_274420 ← check this first. It sits at 0x2744xx, immediately next to FUN_02742790 — the drive-command executor from earlier. Same module ⇒ likely the camera-command executor of the same debug-command family.
  • eh_2d2640, eh_365850, eh_366140, FUN_0056ab60, FUN_00c411b0

One of these reads the selected enum id and applies it to the game camera (writes the camera-mode global / calls the camera manager).

Two quick actions

  1. Read the class name: the type_info object layout is {vptr @+0x00, char* mangled_name @+0x08, base @+0x10} relative to the object start (which sits just below 0x05585258 — navigate to 0x05585258−0x08, read the pointer, follow it). The mangled name (something like N3PDI…Camera…E) tells us exactly what this enum controls. Paste it.
  2. Decompile eh_274420 — paste it. If it's the camera applier, it will write a global / call a manager method with the enum value, and that's your patch target: the store site for the camera-mode variable, or better, its bounds-check for a cycle-extend patch.

With the class name + eh_274420 I can name the exact patch address and bytes — most likely either (a) the camera-mode global's writer (so you can bind cycling to it), or (b) as before, the clamp immediate in the apply path, extended from the retail cycle set to the full 25.

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void eh_274420(long param_1,long param_2)

{ int *piVar1; long *plVar2; int iVar3; long lVar4; ulong uVar5; long lVar6; long *plVar7; long *plVar8; undefined8 *puVar9; ulong uVar10; long lVar11; ulong uVar12; undefined8 local_40; long local_38;

local_38 = ___stack_chk_guard; eh_7ca60(); if ((param_2 != 0) && (lVar4 = __dynamic_cast(param_2,&PTR_vtable_05585258,&PTR_vtable_0550f188,0), lVar4 != 0)) { uVar10 = *(long *)(lVar4 + 0x28) - *(long *)(lVar4 + 0x20); plVar8 = *(long )(param_1 + 0x28); lVar11 = *(long *)(param_1 + 0x20); uVar12 = uVar10 >> 3 & 0xffffffff; uVar5 = (long)plVar8 - lVar11 >> 3; lVar6 = uVar5 - uVar12; if (uVar12 <= uVar5 && lVar6 != 0) { plVar2 = (long *)(lVar11 + uVar12 * 8); for (plVar7 = plVar2; plVar7 != plVar8; plVar7 = plVar7 + 1) { eh_970(plVar7); } (long **)(param_1 + 0x28) = plVar2; } else if (uVar12 > uVar5) { if ((ulong)((long *)(param_1 + 0x30) - lVar11 >> 3) < uVar12) { eh_1e0c0((long *)(param_1 + 0x20),uVar12); } else { do { *plVar8 = DAT_06bada30; lVar11 = *plVar8; if (lVar11 != 0) { LOCK(); piVar1 = (int *)(lVar11 + 8); iVar3 = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); if (iVar3 == 0) { LOCK(); *(int *)(lVar11 + 0xc) = *(int *)(lVar11 + 0xc) + 1; UNLOCK(); } } plVar8 = plVar8 + 1; lVar6 = lVar6 + 1; } while (lVar6 != 0); (long **)(param_1 + 0x28) = plVar8; } } if ((int)(uVar10 >> 3) != 0) { lVar11 = 0; do { if ((long )((long *)(lVar4 + 0x20) + lVar11) != 0) { plVar8 = (long **)((long *)(lVar4 + 0x20) + lVar11); if (plVar8 == (long *)0x0) { eh_c1a70("C:\pdi\src\gt7\maintenance\adhoc\include\h_object.h",0xd5,"HObject"); } ((code **)(*plVar8 + 0x58))(&local_40); puVar9 = (undefined8 )((long )(param_1 + 0x20) + lVar11); if (puVar9 != &local_40) { eh_650(puVar9,local_40); } eh_970(&local_40); } lVar11 = lVar11 + 8; uVar12 = uVar12 - 1; } while (uVar12 != 0); } } if (___stack_chk_guard == local_38) { return; } / WARNING: Subroutine does not return */ __stack_chk_fail(); }

*_

Dr.Binary

eh_274420 is plumbing, not the applier — but it does confirm the identity of the enum class. Quick decode:

What eh_274420 actually is

eh_7ca60();
if (param_2 != 0) {
    src = __dynamic_cast(param_2, &PTR_vtable_05585258, &PTR_vtable_0550f188, 0);  // base → derived downcast
    // … then a textbook std::vector<T>::operator=(const vector&) on param_1+0x20/+0x28/+0x30:
    //    same size  → overwrite + destroy surplus refs
    //    src bigger → reserve (eh_1e0c0) or fill with default handle (DAT_06bada30)
    //    for each src element: obj->vtable[+0x58](&handle)  // clone into ref handle
    //                         eh_650(dest[i], handle);      // ref assign
    //                         eh_970(&handle);              // release
}

So it's the property-system assignment: copy a vector<HObjectRef> out of a source container into param_1's member vector, with the full refcount dance. The __dynamic_cast signature tells us the typeinfo you found (05585258) is the base class being downcast to a derived type (0550f188) — so the enum-table class is a property/reflection container, exactly as suspected. This is the setter plumbing of the debug dropdown — no camera logic here. Dead end, but a clean one: it tells us the dropdown's selection lives in a vector of object refs that gets copied when assigned.

The three moves that lead to the actual cycle patch

1. Byte-search for the live camera-slot field (highest value). The scene stores the current camera index at param_1+0x344f8 (object table +0x34480, stride 0x28). Structs aren't typed, so field accesses hide in decompiles — but the displacement bytes are searchable:

  • Ghidra: Search → Memory → bytes F8 44 03 00 (little-endian 0x000344F8) → every instruction touching that field.
  • Also 80 44 03 00 (0x00034480, the camera object table) and optionally F0 44 03 00. The writer among the hits is the set/cycle function — that's your patch site. Paste the hit list with their functions.

2. Identify the enum class by name (30 seconds). The type_info object sits just below 0x05585258: layout {vptr, char* mangled_name, base} — navigate to 0x05585258 − 0x08, follow the pointer, read the mangled string. A name containing Camera/View tells us what the dropdown controls; a generic name means the dropdown is data-driven and the real consumer is elsewhere.

3. The remaining consumers, if 1–2 stall: FUN_0056ab60, FUN_00c411b0, eh_365850, eh_366140, eh_2d2640 — one of them reads the enum and writes a game-visible value. FUN_0056ab60 and FUN_00c411b0 are plain FUN_ names (not eh-framework), which makes them my pick as appliers.

My bet is on move 1 — the 0x344f8 writer is by definition the thing that changes cameras at runtime, and patching its wrap/bounds is the cycle patch we've been after. Paste the byte-search hits first.

5585258

Dr.Binary

0x05585258 is just the RTTI metadata — don't patch there; it's read-only type information. Two concrete things to pull, with exact Ghidra steps:

1. Read the class name (30 seconds)

The type_info object starts at 0x05585258: {+0x00: vptr, +0x08: char* mangled name, +0x10: base}.

  1. Ctrl+G → type 0x05585260 → Enter
  2. That qword is a pointer to the mangled class name → double-click it
  3. You'll land on something like N7PDI_EXT13SomeCameraNameE
  4. Paste that string here

If the name contains Camera/View/Monitor, the dropdown controls the game camera directly.

2. Find the live camera switch (the real patch target)

Search the binary for instructions touching the scene's current-camera field:

  1. Search → For Bytes (or Search → Memory, depending on your Ghidra version)
  2. Search hex: F8 44 03 00 — that's the displacement 0x000344F8 (= the scene's current-camera-index field at param_1+0x344F8)
  3. Repeat for 80 44 03 00 (0x00034480, the camera-object table)
  4. You'll get a list of hits — some in data (ignore), some inside functions (these are every read/write of the camera slot)

For each hit that's inside a function: note the function and whether the instruction reads or writes. The function that writes it is the camera set/cycle routine — that's where the wrap/bounds check lives, and where your patch goes.

Paste either the mangled name (step 1) or the hit list (step 2) — ideally both. From the hit list I'll point at the exact instruction, give you the original bytes and the patched bytes, and compute the file offset if you upload the eboot.

                         LAB_02868d95                                    XREF[1]:     02868d89(j)  
    02868d95 48 c7 83        MOV        qword ptr [RBX + 0x344f8],0x0
             f8 44 03 
             00 00 00 
    02868da0 b8 1c 00        MOV        EAX,0x1c
             00 00
Dr.Binary

That's a live hit — and the instruction right after it is suspicious in the best way:

02868d95  MOV qword ptr [RBX + 0x344f8], 0x0     ; current camera index = 0  (reset)
02868da0  MOV EAX, 0x1c                           ; 28

Two observations:

  1. This is a camera-index writer — resetting the scene's camera slot to 0. Its containing function is camera-manager setup/reset code.
  2. 0x1C = 28 — and your roster table A had 25 named entries + 2 specials = 27… plus one slot = 28. That constant is very plausibly the camera-slot count (matching the +0x34480 table with 0x28 stride). If this same constant appears in a CMP/% nearby, it's the cycle bound — i.e., the clamp we've been hunting.

What I need now (two things)

1. The containing function. Click the hit, and the decompiler window shows the function it lives in (or scroll up in the listing to the nearest FUNCTION header). Paste that function's name + full decompile. The reset function often sits in the same class as the cycle/set logic, and its structure will name the camera-manager methods.

2. All the other byte-search hits. Re-run Search → For Bytes for F8 44 03 00 and list every hit (address + read/write). What we're looking for specifically:

  • a write of a non-zero value or an INC/ADD to +0x344f8 → the cycle/advance,
  • a CMP against 0x1c (or 0x1b, 0x19) near a store → the bounds clamp,
  • reads feeding *(param + 0x34480 + idx*0x28) → the slot lookup (that's the FUN_0042bb00 pattern; there'll be more).

Once we have the cycle/advance site, the patch is typically one of:

  • extend the bound (raise the clamp immediate so cycling reaches slots retail hides), or
  • hook the advance to jump the index by name-table lookup instead of sequential.

Paste the containing function and the hit list — this is the closest we've been.

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_02867e80(long param_1)

{ int *piVar1; undefined8 *puVar2; uint uVar3; int iVar4; long lVar5; undefined8 *puVar6; int *piVar7; int *piVar8; char cVar9; undefined1 uVar10; byte bVar11; int iVar12; uint uVar13; int iVar14; undefined8 uVar15; long *plVar16; long lVar17; long lVar18; ulong uVar19; uint uVar20; long *plVar21; long lVar22; long *plVar23; byte bVar24; ulong uVar25; long lVar26; int iVar27; long lVar28; bool bVar29; float fVar30; undefined4 uVar31; undefined4 uVar32; double dVar33; float fVar34; undefined1 auVar35 [64]; long local_b0; long local_a0; long *local_90; undefined4 local_88; uint local_84; undefined4 uStack_80; undefined8 uStack_7c; undefined4 uStack_74; undefined *puStack_70; undefined8 uStack_68; undefined8 local_60; undefined *local_58; undefined *local_50; undefined8 local_48; undefined8 uStack_40; long local_38;

local_38 = ___stack_chk_guard; lVar5 = *(long *)(param_1 + 8); puVar2 = (undefined8 *)(lVar5 + 0x34480); *(long *)(lVar5 + 0x34480) = lVar5 + 0x9efd0; *(long *)(lVar5 + 0x34488) = lVar5 + 0x9a6f8; *(undefined4 )(lVar5 + 0x34490) = 0x3f800000; cVar9 = (**(code **)((long )(lVar5 + 0x9efd0) + 0x188))(); bVar24 = 1; if (cVar9 != '\0') { bVar24 = (**(code **)((long *)*puVar2 + 0x168))(); bVar24 = bVar24 ^ 1; } *(byte *)(lVar5 + 0x3449c) = bVar24; *(undefined4 *)(lVar5 + 0x34498) = *(undefined4 )(lVar5 + 0x9a784); uVar31 = 0; if ((char )((long )((long *)(lVar5 + 0x3648) + 0x10) + 0x7d4) == '\x01') { cVar9 = FUN_02984960(lVar5); uVar31 = 0; if (cVar9 == '\0') { uVar31 = 0x3c88ab7c; } } *(undefined4 *)(lVar5 + 0x344a0) = uVar31; *(undefined1 *)(lVar5 + 0x344a5) = 0; cVar9 = (**(code )((long **)(lVar5 + 0x34480) + 0x188))(); if (cVar9 == '\0') { lVar17 = *(long )(lVar5 + 0x34620); if ((long *)(lVar17 + 0xb0) == 0) { plVar23 = (long *)0x0; } else { LOCK(); piVar1 = (int )((long *)(lVar17 + 0xb0) + 8); *piVar1 = *piVar1 + 1; UNLOCK(); plVar23 = (long **)(lVar17 + 0xb0); } lVar17 = **(long **)(lVar17 + 0xa8); if ((char )(lVar17 + 0x28) != '\0') { dVar33 = (double)(float *)(lVar5 + 0x9a784) + *(double *)(lVar17 + 0x30); if (1.0 <= dVar33) { iVar12 = *(int *)(lVar17 + 0xa0); iVar27 = *(int *)(lVar17 + 0x24); iVar4 = *(int *)(lVar17 + 0xa4); piVar1 = *(int **)(lVar17 + 0x1c8); piVar7 = *(int )(lVar17 + 0x1d0); lVar22 = *(long *)(lVar17 + 0xe0); do { piVar8 = piVar1; if (iVar12 != 0) { iVar14 = (iVar12 * 0x3c + -0x3c) / iVar4; if (iVar27 <= iVar14) { iVar14 = iVar27; } iVar14 = iVar14 * iVar4; *(int *)(lVar17 + 0xa8) = iVar14 / 0x3c; *(double *)(lVar17 + 0xc0) = (double)(iVar14 % 0x3c) / 60.0; } for (; piVar8 != piVar7; piVar8 = piVar8 + 1) { iVar14 = *(int *)(lVar22 + 0x40 + (long)*piVar8 * 0x80); if (iVar14 != 0) { lVar26 = (long)*piVar8 * 0x80 + lVar22; iVar14 = (iVar14 * 0x3c + -0x3c) / *(int *)(lVar26 + 0x44); if (iVar27 <= iVar14) { iVar14 = iVar27; } iVar14 = iVar14 * *(int *)(lVar26 + 0x44); *(int *)(lVar26 + 0x48) = iVar14 / 0x3c; *(double *)(lVar26 + 0x60) = (double)(iVar14 % 0x3c) / 60.0; } } dVar33 = dVar33 + -1.0; iVar27 = iVar27 + 1; *(int *)(lVar17 + 0x24) = iVar27; } while (1.0 <= dVar33); } *(double *)(lVar17 + 0x30) = dVar33; } if (plVar23 != (long *)0x0) { LOCK(); plVar16 = plVar23 + 1; *(int *)plVar16 = (int)*plVar16 + -1; UNLOCK(); if ((int)*plVar16 == 0) { ((code )*plVar23)(plVar23); LOCK(); piVar1 = (int *)((long)plVar23 + 0xc); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { ((code **)(*plVar23 + 8))(plVar23); } } } } lVar17 = *(long *)(lVar5 + 0x34620); plVar23 = *(long **)(lVar17 + 0xc0); plVar16 = *(long )(lVar17 + 200); if (plVar23 != plVar16) { bVar29 = *(char )((long )((long *)(lVar5 + 0x9efe8) + 0x10) + 0x118) == '\x03'; *(bool *)(plVar23 + 0x130394) = bVar29; if (((plVar23 + 2 != plVar16) && ((bool )(plVar23[2] + 0x130394) = bVar29, plVar23 + 4 != plVar16)) && ((bool *)(plVar23[4] + 0x130394) = bVar29, plVar23 + 6 != plVar16)) { *(bool *)(plVar23[6] + 0x130394) = bVar29; for (plVar21 = plVar23 + 8; plVar21 != plVar16; plVar21 = plVar21 + 2) { *(bool *)(*plVar21 + 0x130394) = bVar29; } } } fVar30 = (float)FUN_02682e90(lVar5 + 0x34618); plVar23 = (long **)(plVar23[(long)(int *)(lVar17 + 0xe0) * 2] + 0x1302e0); if (plVar23 == (long *)0x0) { plVar16 = (long *)0x0; } else { cVar9 = ((code **)(plVar23 + 0x10))(plVar23); plVar16 = plVar23; if ((cVar9 != '\0') && ((char *)(lVar5 + 0x9a7f1) != '\0')) { plVar16 = (long *)(lVar5 + 0x9a758); FUN_029849d0(plVar16,plVar23); } } lVar17 = *(long )((long )(lVar5 + 0x3648) + 0x20); if ((((char )(lVar17 + 0x408) == '\x01') && ((char )(lVar17 + 0x335) == '\x01')) || ((char *)(lVar5 + 0x9f334) == '\0')) { bVar24 = 0; } else { bVar24 = *(byte *)(lVar5 + 0x9f335) ^ 1; } plVar23 = (long *)(lVar5 + 0x34508); plVar21 = (long *)(lVar5 + 0x9a660); *(byte *)(lVar5 + 0x34598) = fVar30 == 0.0 | bVar24; *(byte *)(lVar5 + 0x34599) = bVar24; if (plVar16 == (long *)0x0) { *(undefined8 *)(lVar5 + 0x34510) = 0; *(long )(lVar5 + 0x34518) = plVar21; LAB_028680d1: *(undefined1 *)(lVar5 + 0x3459a) = 0; } else { iVar12 = ((code )(*plVar16 + 0x28))(plVar16); if (iVar12 != 0) { local_b0 = 0; local_a0 = 0; do { lVar17 = *(long *)(lVar5 + 0x34530); lVar22 = ((code )(*plVar16 + 0x50))(plVar16,local_a0); if (lVar22 == 0) { uVar15 = 0; } else { uVar15 = __dynamic_cast(lVar22,&PTR_vtable_054d3fb8,&PTR_vtable_054d4010,0); } *(undefined8 *)(lVar17 + 0x10 + (local_b0 >> 0x20) * 0x1700) = uVar15; local_b0 = local_b0 + 0x100000000; local_a0 = local_a0 + 1; } while (iVar12 != local_a0); } (long )(lVar5 + 0x34510) = plVar16; (long )(lVar5 + 0x34518) = plVar21; uVar15 = ((code )(*plVar16 + 0x98))(plVar16); FUN_02984ce0(lVar5 + 0x34548,uVar15); uVar15 = ((code )((long )(lVar5 + 0x34510) + 0xb8))(); *(undefined8 *)(lVar5 + 0x34590) = uVar15; cVar9 = ((code )((long )(lVar5 + 0x34510) + 0x10))(); if (cVar9 == '\0') goto LAB_028680d1; } fVar34 = 1.0; *(undefined8 *)(lVar5 + 0x34520) = *(undefined8 *)(lVar5 + 0x9a808); (long )(lVar5 + 0x344a8) = plVar23; *(long *)(lVar5 + 0x344b0) = lVar5 + 0x34528; lVar17 = *(long *)(lVar5 + 0x34620); if (1.0 <= fVar30) { lVar17 = *(long )((long )(lVar17 + 0xc0) + (long)(int *)(lVar17 + 0xe0) * 0x10); } else { lVar17 = *(long )((long )(lVar17 + 0xc0) + (long)(int *)(lVar17 + 0xe0) * 0x10); fVar34 = *(float *)(lVar17 + 0x130350) + 1.0; } *(float )(lVar5 + 0x344b8) = fVar34; uVar10 = 1; if ((char *)(lVar17 + 0x13035f) == '\0') { uVar10 = *(undefined1 *)(lVar17 + 0x130377); } *(undefined1 *)(lVar5 + 0x344c4) = uVar10; uVar31 = FUN_02682e90(lVar5 + 0x34618); *(undefined4 *)(lVar5 + 0x344c0) = uVar31; cVar9 = ((code **)((long *)(lVar5 + 0x34508) + 0x188))(plVar23); fVar34 = 0.0; if (cVar9 == '\0') { fVar34 = fVar30 * 0.016683333; } *(float *)(lVar5 + 0x344c8) = fVar34; *(undefined1 *)(lVar5 + 0x344cd) = *(undefined1 ) ((long )((long )((long )(lVar5 + 0x34620) + 0xc0) + (long)(int )((long *)(lVar5 + 0x34620) + 0xe0) * 0x10) + 0x13035c); cVar9 = ((code **)((long *)(lVar5 + 0x34508) + 0x10))(plVar23); if ((cVar9 != '\0') && (iVar12 = ((code )(*plVar23 + 0x28))(plVar23), 0 < iVar12)) { iVar12 = 0; do { lVar17 = ((code )(*plVar23 + 0x50))(plVar23,iVar12); if ((lVar17 != 0) && (plVar16 = (long *)__dynamic_cast(lVar17,&PTR_vtable_054d3fb8,&PTR_vtable_054d4010,0), plVar16 != (long *)0x0)) { ((code **)((long *)(lVar5 + 0x34528) + 0x10))(lVar5 + 0x34528,iVar12); uVar31 = ((code )(plVar16 + 0x3b8))(); FUN_0296f780((undefined8 *)(lVar5 + 0x34688),iVar12,uVar31); } iVar12 = iVar12 + 1; iVar27 = ((code )(*plVar23 + 0x28))(plVar23); } while (iVar12 < iVar27); } lVar17 = *(long *)(lVar5 + 0x34500); plVar23 = (long *)puVar2[lVar17 * 5]; cVar9 = ((code )(plVar23 + 0x158))(plVar23); if (cVar9 != '\0') { if ((((long )((long *)(lVar5 + 0x3648) + 0x548) == 0) || (lVar22 = *(long )((long *)(lVar5 + 0x3648) + 0x20), *(char )(lVar22 + 0x408) != '\x01')) || ((char *)(lVar22 + 0x335) != '\x01')) { LAB_02868239: bVar24 = 0; } else { for (lVar22 = *(long *)(lVar5 + 0x345f0); lVar22 != *(long )(lVar5 + 0x345f8); lVar22 = lVar22 + 0x128) { if ((((char )(lVar22 + 0x16) == '\x01') && ((char )(lVar22 + 0x1a) == '\0')) && ((char *)(lVar22 + 0x17) != '\0')) goto LAB_02868239; } bVar24 = 1; } iVar12 = *(int )((long *)(lVar5 + 0x36a8) + 0x2304); bVar11 = ((code **)(*plVar23 + 0x200))(plVar23); bVar24 = bVar24 | *(byte *)(lVar5 + 0x9a7f0) | iVar12 == 1; eh_10bac0(lVar5 + 0x34810,plVar23,bVar11 | bVar24,bVar24); FUN_0042d710(plVar21,lVar5 + 0x34810); lVar22 = *(long )((long )(lVar5 + 0x9efe8) + 0x30); if ((long )(lVar22 + 6000) == (long *)0x0) { uVar15 = 0; } else { uVar15 = ((code )((long )(lVar22 + 6000) + 0x40))(); lVar22 = *(long )((long *)(lVar5 + 0x9efe8) + 0x30); } *(undefined8 *)(lVar5 + 0x9a6a8) = uVar15; *(undefined8 *)(lVar5 + 0x9a6d8) = *(undefined8 *)(lVar22 + 0x1778); uVar15 = ((code )(*plVar23 + 0x98))(plVar23); *(undefined8 )(lVar5 + 0x9a6b0) = uVar15; if ((char *)(lVar5 + 0x9a7f0) == '\x01') { *(byte *)(lVar5 + 0x34866) = *(byte *)(lVar5 + 0x34866) | 0x20; } *(byte *)(lVar5 + 0x34853) = *(byte *)(lVar5 + 0x34853) & 0x1f; (long **)(lVar5 + 0x9a710) = plVar21; if ((long *)(lVar5 + 0x9a720) != *(long *)(lVar5 + 0x9a718)) { *(long *)(lVar5 + 0x9a720) = *(long )(lVar5 + 0x9a718); } if ((long *)(lVar5 + 0x9a748) != *(long *)(lVar5 + 0x9a740)) { *(long *)(lVar5 + 0x9a748) = *(long *)(lVar5 + 0x9a740); } cVar9 = ((code )(*plVar21 + 0x10))(plVar21); if ((cVar9 == '\0') || (cVar9 = ((code **)(*plVar21 + 0x168))(plVar21), cVar9 == '\0')) { *(undefined4 *)(lVar5 + 0x9a730) = 0; } lVar22 = *(long )(lVar5 + 0x34620); uVar20 = (uint)((ulong)((long *)(lVar22 + 200) - *(long *)(lVar22 + 0xc0)) >> 4); if (1 < (int)uVar20) { lVar26 = 0x10; lVar22 = 4; auVar35 = ZEXT1264(ZEXT812(0)); uVar25 = 0; do { lVar28 = *(long )((long )((long )(lVar5 + 0x34620) + 0xc0) + lVar26); if ((char *)(lVar28 + 0x130260) == '\x02' && *(char *)(lVar28 + 0x130377) == '\0') { plVar23 = *(long **)(lVar28 + 0x1302e0); if ((plVar23 != (long *)0x0 & *(byte )(lVar28 + 0x130374)) == 1) { if ((int *)(lVar28 + 0x130340) != 6) { plVar23 = (long *)0x0; } } else { plVar23 = (long *)0x0; } auVar35 = ZEXT1264(ZEXT812(0)); } else { plVar23 = (long *)0x0; } puVar6 = *(undefined8 **)(lVar5 + 0x9a720); uVar3 = *(uint *)(lVar28 + 0x130370); uVar19 = (ulong)uVar3; lVar28 = *(long *)(lVar5 + 0x9a718); local_88 = 0xffffffff; uStack_80 = 0; uStack_7c = auVar35.4_8; uStack_74 = auVar35.12_4; uStack_68 = auVar35.24_8; puStack_70 = &DAT_0546d510; local_60 = 0xffffffff; local_48 = 0; uStack_40 = 0; local_58 = &DAT_0546d730; local_50 = &DAT_0546df58; local_90 = plVar23; if (puVar6 == *(undefined8 )(lVar5 + 0x9a728)) { FUN_02984aa0(lVar5 + 0x9a718,puVar6,&local_90); auVar35 = ZEXT1264(ZEXT812(0)); } else { *puVar6 = plVar23; *(undefined4 *)(puVar6 + 1) = 0xffffffff; *(ulong *)((long)puVar6 + 0xc) = (ulong)local_84; *(undefined8 *)((long)puVar6 + 0x14) = uStack_7c; *(undefined4 *)((long)puVar6 + 0x1c) = uStack_74; puVar6[5] = 0; puVar6[4] = &DAT_0546d510; *(undefined4 *)(puVar6 + 6) = 0xffffffff; puVar6[9] = 0; puVar6[7] = &DAT_0546d730; puVar6[8] = &DAT_0546df58; *(undefined1 *)(puVar6 + 10) = 0; *(long *)(lVar5 + 0x9a720) = *(long *)(lVar5 + 0x9a720) + 0x58; } if ((plVar23 != (long )0x0) && ((long *)(lVar5 + 0x9a710) != 0)) { cVar9 = ((code )(*plVar23 + 0x10))(); auVar35 = ZEXT1264(ZEXT812(0)); if ((-1 < (int)uVar3) && (cVar9 != '\0')) { lVar18 = *(long *)(lVar5 + 0x9a718); iVar27 = (int)((long)puVar6 - lVar28 >> 3) * -0x45d1745d; lVar28 = (long)iVar27 * 0x58; plVar16 = (long *)((code )(*plVar23 + 0x48))(plVar23,uVar19); iVar12 = ((code )((long )(lVar5 + 0x9a710) + 0x38))(); (long )(lVar18 + 0x28 + lVar28) = plVar16; *(int *)(lVar18 + 0x30 + lVar28) = iVar12 + iVar27; *(long *)(lVar18 + 0x10 + lVar28) = lVar18 + 0x20 + lVar28; uVar15 = ((code )(*plVar23 + 0x50))(plVar23,uVar19); *(undefined8 *)(lVar18 + 0x48 + lVar28) = uVar15; uVar13 = ((code **)((long *)(lVar5 + 0x9a708) + 0x228))(lVar5 + 0x9a708); *(bool *)(lVar18 + 0x50 + lVar28) = (uVar13 >> ((byte)((char)iVar27 + 1) & 0x1f) & 1) != 0; *(long *)(lVar18 + 0x18 + lVar28) = lVar18 + 0x38 + lVar28; *(uint )(lVar18 + 8 + lVar28) = uVar3; iVar12 = (int)((ulong)((long *)(lVar5 + 0x9a720) - *(long )(lVar5 + 0x9a718)) >> 3) * -0x45d1745d; if ((int *)(lVar5 + 0x9a730) < iVar12) { *(int *)(lVar5 + 0x9a730) = iVar12; } auVar35 = ZEXT1264(ZEXT812(0)); if (plVar16 != (long *)0x0) { lVar28 = ((code )(*plVar16 + 0x58))(); uVar31 = (undefined4)((ulong)lVar18 >> 0x20); uVar32 = ((code **)(plVar16 + 0xc0))(); FUN_0268d7a0((undefined8 )((long *)(lVar5 + 0x9f118) + 8),uVar25 & 0xffffffff, uVar19 | lVar28 << 0x20,CONCAT44(uVar31,uVar32)); auVar35 = ZEXT1264(ZEXT812(0)); *(undefined4 ) ((long )((long )((long *)(lVar5 + 0x34620) + 0xc0) + lVar26) + 0x130380) = *(undefined4 ) ((long )((long )((long *)(lVar5 + 0x9f118) + 8) + 0xe0) + lVar22); } } } lVar26 = lVar26 + 0x10; lVar22 = lVar22 + 0x28; uVar25 = uVar25 + 1; } while ((ulong)(uVar20 & 0x7fffffff) - 1 != uVar25); lVar22 = *(long )(lVar5 + 0x34620); } if ((long *)(lVar22 + 0xb0) == 0) { plVar23 = (long *)0x0; } else { LOCK(); piVar1 = (int )((long *)(lVar22 + 0xb0) + 8); *piVar1 = *piVar1 + 1; UNLOCK(); plVar23 = *(long **)(lVar22 + 0xb0); } plVar16 = *(long **)(lVar22 + 0xa8); uVar25 = 0; while( true ) { lVar22 = *plVar16; uVar19 = *(long *)(lVar22 + 0x1d0) - *(long )(lVar22 + 0x1c8) >> 2; if ((byte )(lVar22 + 200) + uVar19 <= uVar25) break; if ((uVar25 & 0xffffffff) < uVar19) { if ((long *)(lVar22 + 0xe0) != 0) { lVar22 = *(long )(lVar22 + 0xe0) + (long)(int )((long *)(lVar22 + 0x1c8) + (uVar25 & 0xffffffff) * 4) * 0x80; goto LAB_02868cd0; } } else { lVar22 = lVar22 + 0x60; LAB_02868cd0: plVar21 = *(long **)(lVar5 + 0x9a748); if (plVar21 == *(long **)(lVar5 + 0x9a750)) { FUN_01b14420(lVar5 + 0x9a740); } else { *plVar21 = lVar22; *(long )(lVar5 + 0x9a748) = plVar21 + 1; } } uVar25 = uVar25 + 1; } if (plVar23 != (long *)0x0) { LOCK(); plVar16 = plVar23 + 1; *(int *)plVar16 = (int)*plVar16 + -1; UNLOCK(); if ((int)*plVar16 == 0) { ((code )*plVar23)(plVar23); LOCK(); piVar1 = (int *)((long)plVar23 + 0xc); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { ((code **)(*plVar23 + 8))(plVar23); } } } puVar2[lVar17 * 5] = lVar5 + 0x9a708; lVar22 = *(long *)(lVar5 + 0x2f968); *(int *)(lVar22 + 0x4c) = (int)(puVar2 + lVar17 * 5)[4]; *(undefined1 *)(lVar22 + 0x51) = 0; lVar17 = *(long )((long )((long )(lVar5 + 0x34620) + 0xc0) + (long)(int )((long )(lVar5 + 0x34620) + 0xe0) * 0x10); if (((char )(lVar17 + 0x130374) == '\x01') && ((long *)(lVar17 + 0x1302e0) != 0)) { bVar29 = *(int *)(lVar17 + 0x130340) == 6; lVar17 = 0x44; *(ulong *)(lVar5 + 0x344f8) = (ulong)bVar29; if (!bVar29) { lVar17 = 0x1c; } cVar9 = *(char *)((long)puVar2 + lVar17); } else { *(undefined8 *)(lVar5 + 0x344f8) = 0; cVar9 = *(char *)(lVar5 + 0x3449c); } if (cVar9 == '\0') goto LAB_028681fe; } *(undefined1 )(lVar5 + 0x9b968) = 1; LAB_028681fe: if (___stack_chk_guard != local_38) { / WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }

*_

Dr.Binary
You stopped this response.

i posted it

Dr.Binary

Big haul from this function — including a correction of my last hypothesis. This is the scene camera director (onboard cams + TV cam assignment). Key decodes:

What FUN_02867e80 does

1. Initializes the slot table (+0x34480, stride 0x28) with exactly two onboard entries:

slot[0] = scene+0x9efd0;                       // main onboard camera object
slot[1] = scene+0x9a6f8;                       // second camera (blend weight 1.0f)
slot[1].+0x18 = *(scene+0x9a784);
slot[x].+0x1c = ready flag (vtable+0x188/0x168);
slot[x].+0x20 = 1/60 or 0.0

2. Correction: 0x1c is not a count. In the tail, lVar17 = 0x1c (or 0x44) is used as a byte offset into the slot table — cVar9 = *(char *)(table + 0x1c) reads entry[0]'s ready flag. I was wrong that it was the camera count; the constant matched the roster by coincidence. This hit is just "reset onboard camera index to 0."

3. The index at +0x344f8 is a two-way switch, not a cycler:

if (car->+0x130374 == 1 && car->+0x1302e0 != 0) {
    is_bumper = (car->+0x130340 == 6);          // state 6 = bumper cam (same check as FUN_0042bb00!)
    *(u64*)(scene+0x344f8) = is_bumper;         // slot 1 if bumper else slot 0
}
else *(u64*)(scene+0x344f8) = 0;

4. New discovery — there's a second camera index at +0x34500:

idx2 = *(scene + 0x34500);
cur  = slot_table[idx2];                        // vtable+0x158 "ready" gate — same as FUN_0042bb00
… massive TV-camera-director section: per-car camera assignment (FUN_0268d7a0, car state +0x1302e0/+0x130340), work queue at +0x9a718…
slot_table[idx2] = scene + 0x9a708;             // ← current slot gets REPOINTED to the TV proxy object!

So "switching cameras" in this engine = repointing slot entries and flipping between two indices (+0x344f8 onboard 0/1, +0x34500 TV) — there is no single % N cycle loop here. The slot table is a small array of camera object pointers that the director mutates at runtime.

Where the actual "cycle button" lives

The gameplay camera cycle (View button → bumper→chase→…) is the code that writes the car's camera state — the car+0x130340 field this function reads. That's your next byte-search:

Search → For Bytes:  40 03 13 00        (displacement 0x130340)

Filter the hits: the race engine reads it everywhere (we've seen several); the UI/input-side writer — the one that increments through the allowed camera list per car — is the cycle function. It'll contain a small list/switch of camera mode ids (the same id-space as your 25-entry enum, most likely: ONBOARD_BONNET, etc.). That handler is the ideal patch point: extend its cycle list, or let it wrap into the hidden ids.

Also still on the table

The 25-entry debug enum (ONBOARD_BONNET, …) is itself a ready-made camera selector — we've just never found its consumer. From the typeinfo xref list, the unexamined appliers are FUN_0056ab60, FUN_00c411b0, eh_365850, eh_366140, eh_2d2640. If the 0x130340 byte-search stalls, paste FUN_0056ab60 and FUN_00c411b0 — one of them is likely "apply selected camera to car," which would give us the same patch target from the other side.

Both searches are one paste away from a concrete patch address.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_0056ab60()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_0056ab60                                    XREF[1]:     05514ca0(*)  
    0056ab60 55              PUSH       RBP
    0056ab61 48 89 e5        MOV        RBP,RSP
    0056ab64 41 56           PUSH       R14
    0056ab66 53              PUSH       RBX
    0056ab67 49 89 f6        MOV        R14,RSI
    0056ab6a 48 89 fb        MOV        RBX,RDI
    0056ab6d e8 ee 1e        CALL       eh_7ca60                                         undefined eh_7ca60()
             b1 ff
    0056ab72 4d 85 f6        TEST       R14,R14
    0056ab75 74 36           JZ         LAB_0056abad
    0056ab77 48 8d 35        LEA        RSI,[PTR_vtable_05585258]                        = 07d7e080
             da a6 01 05
    0056ab7e 48 8d 15        LEA        RDX,[PTR_vtable_05514ec0]                        = 07d7e080
             3b a3 fa 04
    0056ab85 4c 89 f7        MOV        RDI,R14
    0056ab88 31 c9           XOR        ECX,ECX
    0056ab8a e8 21 fa        CALL       __dynamic_cast                                   undefined __dynamic_cast()
             99 03
    0056ab8f 48 85 c0        TEST       RAX,RAX
    0056ab92 74 19           JZ         LAB_0056abad
    0056ab94 48 39 c3        CMP        RBX,RAX
    0056ab97 74 14           JZ         LAB_0056abad
    0056ab99 48 8b 70 20     MOV        RSI,qword ptr [RAX + 0x20]
    0056ab9d 48 83 c3 20     ADD        RBX,0x20
    0056aba1 48 89 df        MOV        RDI,RBX
    0056aba4 5b              POP        RBX
    0056aba5 41 5e           POP        R14
    0056aba7 5d              POP        RBP
    0056aba8 e9 a3 5a        JMP        eh_650                                           undefined eh_650()
             a9 ff
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
                         LAB_0056abad                                    XREF[3]:     0056ab75(j), 0056ab92(j), 
                                                                                      0056ab97(j)  
    0056abad 5b              POP        RBX
    0056abae 41 5e           POP        R14
    0056abb0 5d              POP        RBP
    0056abb1 c3              RET
    0056abb2 cc              ??         CCh
    0056abb3 cc              ??         CCh
    0056abb4 cc              ??         CCh
    0056abb5 cc              ??         CCh
    0056abb6 cc              ??         CCh
    0056abb7 cc              ??         CCh
    0056abb8 cc              ??         CCh
    0056abb9 cc              ??         CCh
    0056abba cc              ??         CCh
    0056abbb cc              ??         CCh
    0056abbc cc              ??         CCh
    0056abbd cc              ??         CCh
    0056abbe cc              ??         CCh
    0056abbf cc              ??         CCh
    0056abc0 55              ??         55h    U
    0056abc1 48              ??         48h    H
    0056abc2 89              ??         89h
    0056abc3 e5              ??         E5h
    0056abc4 41              ??         41h    A
    0056abc5 57              ??         57h    W
    0056abc6 41              ??         41h    A
    0056abc7 56              ??         56h    V
    0056abc8 41              ??         41h    A
    0056abc9 54              ??         54h    T
    0056abca 53              ??         53h    S
    0056abcb 48              ??         48h    H
    0056abcc 83              ??         83h
    0056abcd ec              ??         ECh
    0056abce 10              ??         10h
    0056abcf 4c              ??         4Ch    L
    0056abd0 8b              ??         8Bh
    0056abd1 3d              ??         3Dh    =
    0056abd2 ba              ??         BAh
    0056abd3 42              ??         42h    B
    0056abd4 07              ??         07h
    0056abd5 05              ??         05h
    0056abd6 48              ??         48h    H
    0056abd7 89              ??         89h
    0056abd8 f3              ??         F3h
    0056abd9 49              ??         49h    I
    0056abda 8b              ??         8Bh
    0056abdb 07              ??         07h
    0056abdc 48              ??         48h    H
    0056abdd 89              ??         89h
    0056abde 45              ??         45h    E
    0056abdf d8              ??         D8h
    0056abe0 44              ??         44h    D
    0056abe1 8b              ??         8Bh
    0056abe2 67              ??         67h    g
    0056abe3 20              ??         20h     
    0056abe4 48              ??         48h    H
    0056abe5 8b              ??         8Bh
    0056abe6 39              ??         39h    9
    0056abe7 48              ??         48h    H
    0056abe8 85              ??         85h
    0056abe9 ff              ??         FFh
    0056abea 0f              ??         0Fh
    0056abeb 84              ??         84h
    0056abec b4              ??         B4h
    0056abed 00              ??         00h
    0056abee 00              ??         00h
    0056abef 00              ??         00h
    0056abf0 48              ??         48h    H
    0056abf1 8b              ??         8Bh
    0056abf2 07              ??         07h
    0056abf3 ff              ??         FFh
    0056abf4 90              ??         90h
    0056abf5 98              ??         98h
    0056abf6 00              ??         00h
    0056abf7 00              ??         00h
    0056abf8 00              ??         00h
    0056abf9 bf              ??         BFh
    0056abfa 28              ??         28h    (
    0056abfb 00              ??         00h
    0056abfc 00              ??         00h
    0056abfd 00              ??         00h
    0056abfe be              ??         BEh
    0056abff 04              ??         04h
    0056ac00 00              ??         00h
    0056ac01 00              ??         00h
    0056ac02 00              ??         00h
    0056ac03 41              ??         41h    A
    0056ac04 89              ??         89h
    0056ac05 c6              ??         C6h
    0056ac06 e8              ??         E8h
    0056ac07 a5              ??         A5h
    0056ac08 44              ??         44h    D
    0056ac09 aa              ??         AAh
    0056ac0a ff              ??         FFh
    0056ac0b 48              ??         48h    H
    0056ac0c 8d              ??         8Dh
    0056ac0d 0d              ??         0Dh
    0056ac0e f6              ??         F6h
    0056ac0f d2              ??         D2h
    0056ac10 fa              ??         FAh
    0056ac11 04              ??         04h
    0056ac12 c7              ??         C7h
    0056ac13 40              ??         40h    @
    0056ac14 08              ??         08h
    0056ac15 00              ??         00h
    0056ac16 00              ??         00h
    0056ac17 00              ??         00h
    0056ac18 00              ??         00h
    0056ac19 c7              ??         C7h
    0056ac1a 40              ??         40h    @
    0056ac1b 0c              ??         0Ch
    0056ac1c 00              ??         00h
    0056ac1d 00              ??         00h
    0056ac1e 00              ??         00h
    0056ac1f 00              ??         00h
    0056ac20 48              ??         48h    H
    0056ac21 89              ??         89h
    0056ac22 08              ??         08h
    0056ac23 48              ??         48h    H
    0056ac24 c7              ??         C7h
    0056ac25 40              ??         40h    @
    0056ac26 10              ??         10h
    0056ac27 00              ??         00h
    0056ac28 00              ??         00h
    0056ac29 00              ??         00h
    0056ac2a 00              ??         00h
    0056ac2b 48              ??         48h    H
    0056ac2c 8b              ??         8Bh
    0056ac2d 48              ??         48h    H
    0056ac2e 10              ??         10h
    0056ac2f 48              ??         48h    H
    0056ac30 85              ??         85h
    0056ac31 c9              ??         C9h
    0056ac32 0f              ??         0Fh
    0056ac33 85              ??         85h
    0056ac34 92              ??         92h
    0056ac35 00              ??         00h
    0056ac36 00              ??         00h
    0056ac37 00              ??         00h
    0056ac38 45              ??         45h    E
    0056ac39 39              ??         39h    9
    0056ac3a f4              ??         F4h
    0056ac3b 48              ??         48h    H
    0056ac3c 8d              ??         8Dh
    0056ac3d 0d              ??         0Dh
    0056ac3e ce              ??         CEh
    0056ac3f 52              ??         52h    R
    0056ac40 fa              ??         FAh
    0056ac41 04              ??         04h
    0056ac42 48              ??         48h    H
    0056ac43 c7              ??         C7h
    0056ac44 40              ??         40h    @
    0056ac45 18              ??         18h
    0056ac46 00              ??         00h
    0056ac47 00              ??         00h
    0056ac48 00              ??         00h
    0056ac49 00              ??         00h
    0056ac4a 48              ??         48h    H
    0056ac4b 89              ??         89h
    0056ac4c 08              ??         08h
    0056ac4d 0f              ??         0Fh
    0056ac4e 9d              ??         9Dh
    0056ac4f 40              ??         40h    @
    0056ac50 20              ??         20h     
    0056ac51 48              ??         48h    H
    0056ac52 89              ??         89h
    0056ac53 45              ??         45h    E
    0056ac54 d0              ??         D0h
    0056ac55 48              ??         48h    H
    0056ac56 8b              ??         8Bh
    0056ac57 45              ??         45h    E
    0056ac58 d0              ??         D0h
    0056ac59 48              ??         48h    H
    0056ac5a 85              ??         85h
    0056ac5b c0              ??         C0h
    0056ac5c 75              ??         75h    u
    0056ac5d 2b              ??         2Bh    +
    0056ac5e 48              ??         48h    H
    0056ac5f 8b              ??         8Bh
    0056ac60 75              ??         75h    u
    0056ac61 d0              ??         D0h
    0056ac62 48              ??         48h    H
    0056ac63 89              ??         89h
    0056ac64 df              ??         DFh
    0056ac65 e8              ??         E8h
    0056ac66 e6              ??         E6h
    0056ac67 59              ??         59h    Y
    0056ac68 a9              ??         A9h
    0056ac69 ff              ??         FFh
    0056ac6a 48              ??         48h    H
    0056ac6b 8d              ??         8Dh
    0056ac6c 7d              ??         7Dh    }
    0056ac6d d0              ??         D0h
    0056ac6e e8              ??         E8h
    0056ac6f fd              ??         FDh
    0056ac70 5c              ??         5Ch    \
    0056ac71 a9              ??         A9h
    0056ac72 ff              ??         FFh
    0056ac73 49              ??         49h    I
    0056ac74 8b              ??         8Bh
    0056ac75 07              ??         07h
    0056ac76 48              ??         48h    H
    0056ac77 3b              ??         3Bh    ;
    0056ac78 45              ??         45h    E
    0056ac79 d8              ??         D8h
    0056ac7a 75              ??         75h    u
    0056ac7b 21              ??         21h    !
    0056ac7c 48              ??         48h    H
    0056ac7d 83              ??         83h
    0056ac7e c4              ??         C4h
    0056ac7f 10              ??         10h
    0056ac80 5b              ??         5Bh    [
    0056ac81 41              ??         41h    A
    0056ac82 5c              ??         5Ch    \
    0056ac83 41              ??         41h    A
    0056ac84 5e              ??         5Eh    ^
    0056ac85 41              ??         41h    A
    0056ac86 5f              ??         5Fh    _
    0056ac87 5d              ??         5Dh    ]
    0056ac88 c3              ??         C3h
    0056ac89 b9              ??         B9h
    0056ac8a 01              ??         01h
    0056ac8b 00              ??         00h
    0056ac8c 00              ??         00h
    0056ac8d 00              ??         00h
    0056ac8e f0              ??         F0h
    0056ac8f 0f              ??         0Fh
    0056ac90 c1              ??         C1h
    0056ac91 48              ??         48h    H
    0056ac92 08              ??         08h
    0056ac93 85              ??         85h
    0056ac94 c9              ??         C9h
    0056ac95 75              ??         75h    u
    0056ac96 c7              ??         C7h
    0056ac97 f0              ??         F0h
    0056ac98 ff              ??         FFh
    0056ac99 40              ??         40h    @
    0056ac9a 0c              ??         0Ch
    0056ac9b eb              ??         EBh
    0056ac9c c1              ??         C1h
    0056ac9d e8              ??         E8h
    0056ac9e be              ??         BEh
    0056ac9f 27              ??         27h    '
    0056aca0 9a              ??         9Ah
    0056aca1 03              ??         03h
    0056aca2 0f              ??         0Fh
    0056aca3 0b              ??         0Bh
    0056aca4 48              ??         48h    H
    0056aca5 8d              ??         8Dh
    0056aca6 05              ??         05h
    0056aca7 2e              ??         2Eh    .
    0056aca8 ff              ??         FFh
    0056aca9 2b              ??         2Bh    +
    0056acaa 04              ??         04h
    0056acab 49              ??         49h    I
    0056acac 89              ??         89h
    0056acad fe              ??         FEh
    0056acae 48              ??         48h    H
    0056acaf 8d              ??         8Dh
    0056acb0 15              ??         15h
    0056acb1 10              ??         10h
    0056acb2 8d              ??         8Dh
    0056acb3 43              ??         43h    C
    0056acb4 04              ??         04h
    0056acb5 be              ??         BEh
    0056acb6 d5              ??         D5h
    0056acb7 00              ??         00h
    0056acb8 00              ??         00h
    0056acb9 00              ??         00h
    0056acba 48              ??         48h    H
    0056acbb 89              ??         89h
    0056acbc c7              ??         C7h
    0056acbd e8              ??         E8h
    0056acbe ae              ??         AEh
    0056acbf 6d              ??         6Dh    m
    0056acc0 b5              ??         B5h
    0056acc1 ff              ??         FFh
    0056acc2 4c              ??         4Ch    L
    0056acc3 89              ??         89h
    0056acc4 f7              ??         F7h
    0056acc5 e9              ??         E9h
    0056acc6 26              ??         26h    &
    0056acc7 ff              ??         FFh
    0056acc8 ff              ??         FFh
    0056acc9 ff              ??         FFh
    0056acca f0              ??         F0h
    0056accb ff              ??         FFh
    0056accc 41              ??         41h    A
    0056accd 0c              ??         0Ch
    0056acce e9              ??         E9h
    0056accf 65              ??         65h    e
    0056acd0 ff              ??         FFh
    0056acd1 ff              ??         FFh
    0056acd2 ff              ??         FFh
    0056acd3 48              ??         48h    H
    0056acd4 8d              ??         8Dh
    0056acd5 7d              ??         7Dh    }
    0056acd6 d0              ??         D0h
    0056acd7 48              ??         48h    H
    0056acd8 89              ??         89h
    0056acd9 c3              ??         C3h
    0056acda e8              ??         E8h
    0056acdb 91              ??         91h
    0056acdc 5c              ??         5Ch    \
    0056acdd a9              ??         A9h
    0056acde ff              ??         FFh
    0056acdf 48              ??         48h    H
    0056ace0 89              ??         89h
    0056ace1 df              ??         DFh
    0056ace2 e8              ??         E8h
    0056ace3 59              ??         59h    Y
    0056ace4 2a              ??         2Ah    *
    0056ace5 9a              ??         9Ah
    0056ace6 03              ??         03h
    0056ace7 0f              ??         0Fh
    0056ace8 0b              ??         0Bh
    0056ace9 cc              ??         CCh
    0056acea cc              ??         CCh
    0056aceb cc              ??         CCh
    0056acec cc              ??         CCh
    0056aced cc              ??         CCh
    0056acee cc              ??         CCh
    0056acef cc              ??         CCh

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_00c411b0()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_00c411b0                                    XREF[1]:     051aba60(*)  
    00c411b0 55              PUSH       RBP
    00c411b1 48 89 e5        MOV        RBP,RSP
    00c411b4 41 56           PUSH       R14
    00c411b6 53              PUSH       RBX
    00c411b7 49 89 f6        MOV        R14,RSI
    00c411ba 48 89 fb        MOV        RBX,RDI
    00c411bd e8 fe 44        CALL       eh_3656c0                                        undefined eh_3656c0()
             72 ff
    00c411c2 4d 85 f6        TEST       R14,R14
    00c411c5 74 58           JZ         LAB_00c4121f
    00c411c7 48 8d 35        LEA        RSI,[PTR_vtable_05585258]                        = 07d7e080
             8a 40 94 04
    00c411ce 48 8d 15        LEA        RDX,[PTR_vtable_051abf10]                        = 07d7e080
             3b ad 56 04
    00c411d5 4c 89 f7        MOV        RDI,R14
    00c411d8 31 c9           XOR        ECX,ECX
    00c411da e8 d1 93        CALL       __dynamic_cast                                   undefined __dynamic_cast()
             2c 03
    00c411df 48 85 c0        TEST       RAX,RAX
    00c411e2 74 3b           JZ         LAB_00c4121f
    00c411e4 48 39 c3        CMP        RBX,RAX
    00c411e7 74 36           JZ         LAB_00c4121f
    00c411e9 48 8b b0        MOV        RSI,qword ptr [RAX + 0x170]
             70 01 00 00
    00c411f0 48 8b 80        MOV        RAX,qword ptr [RAX + 0x178]
             78 01 00 00
    00c411f7 48 81 c3        ADD        RBX,0x170
             70 01 00 00
    00c411fe 48 ba ab        MOV        RDX,-0x5555555555555555
             aa aa aa 
             aa aa aa aa
    00c41208 48 89 df        MOV        RDI,RBX
    00c4120b 48 29 f0        SUB        RAX,RSI
    00c4120e 48 c1 f8 04     SAR        RAX,0x4
    00c41212 48 0f af d0     IMUL       RDX,RAX
    00c41216 5b              POP        RBX
    00c41217 41 5e           POP        R14
    00c41219 5d              POP        RBP
    00c4121a e9 11 00        JMP        LAB_00c41230
             00 00
                         LAB_00c4121f                                    XREF[3]:     00c411c5(j), 00c411e2(j), 
                                                                                      00c411e7(j)  
    00c4121f 5b              POP        RBX
    00c41220 41 5e           POP        R14
    00c41222 5d              POP        RBP
    00c41223 c3              RET
    00c41224 cc              ??         CCh
    00c41225 cc              ??         CCh
    00c41226 cc              ??         CCh
    00c41227 cc              ??         CCh
    00c41228 cc              ??         CCh
    00c41229 cc              ??         CCh
    00c4122a cc              ??         CCh
    00c4122b cc              ??         CCh
    00c4122c cc              ??         CCh
    00c4122d cc              ??         CCh
    00c4122e cc              ??         CCh
    00c4122f cc              ??         CCh
                         LAB_00c41230                                    XREF[1]:     00c4121a(j)  
    00c41230 55              PUSH       RBP
    00c41231 48 89 e5        MOV        RBP,RSP
    00c41234 41 57           PUSH       R15
    00c41236 41 56           PUSH       R14
    00c41238 41 54           PUSH       R12
    00c4123a 53              PUSH       RBX
    00c4123b 48 8b 07        MOV        RAX,qword ptr [RDI]
    00c4123e 48 8b 4f 10     MOV        RCX,qword ptr [RDI + 0x10]
    00c41242 49 b8 ab        MOV        R8,-0x5555555555555555
             aa aa aa 
             aa aa aa aa
    00c4124c 48 29 c1        SUB        RCX,RAX
    00c4124f 48 c1 f9 04     SAR        RCX,0x4
    00c41253 49 0f af c8     IMUL       RCX,R8
    00c41257 48 39 ca        CMP        RDX,RCX
    00c4125a 0f 87 c0        JA         LAB_00c41320
             00 00 00
    00c41260 4c 8b 77 08     MOV        R14,qword ptr [RDI + 0x8]
    00c41264 4c 89 f1        MOV        RCX,R14
    00c41267 48 29 c1        SUB        RCX,RAX
    00c4126a 48 c1 f9 04     SAR        RCX,0x4
    00c4126e 49 0f af c8     IMUL       RCX,R8
    00c41272 48 39 ca        CMP        RDX,RCX
    00c41275 77 55           JA         LAB_00c412cc
    00c41277 4c 8d 3c 52     LEA        R15,[RDX + RDX*0x2]
    00c4127b 49 c1 e7 04     SHL        R15,0x4
    00c4127f 49 01 c7        ADD        R15,RAX
    00c41282 48 85 d2        TEST       RDX,RDX
    00c41285 0f 85 f6        JNZ        LAB_00c41381
             00 00 00
                         LAB_00c4128b                                    XREF[1]:     00c413b3(j)  
    00c4128b 4d 39 f7        CMP        R15,R14
    00c4128e 0f 85 24        JNZ        LAB_00c413b8
             01 00 00
    00c41294 4d 89 fe        MOV        R14,R15
                         LAB_00c41297                                    XREF[4]:     00c412d4(j), 00c4131b(j), 
                                                                                      00c4137c(j), 00c413d5(j)  
    00c41297 4c 89 77 08     MOV        qword ptr [RDI + 0x8],R14
    00c4129b 5b              POP        RBX
    00c4129c 41 5c           POP        R12
    00c4129e 41 5e           POP        R14
    00c412a0 41 5f           POP        R15
    00c412a2 5d              POP        RBP
    00c412a3 c3              RET
                         LAB_00c412a4                                    XREF[1]:     00c412cf(j)  
    00c412a4 c5 f8 10        VMOVUPS    XMM0,xmmword ptr [RSI + 0x8]
             46 08
    00c412a9 c5 f8 10        VMOVUPS    XMM1,xmmword ptr [RSI + 0x14]
             4e 14
    00c412ae c5 f8 11        VMOVUPS    xmmword ptr [RAX + 0x14],XMM1
             48 14
    00c412b3 c5 f8 11        VMOVUPS    xmmword ptr [RAX + 0x8],XMM0
             40 08
    00c412b8 4c 8b 46 24     MOV        R8,qword ptr [RSI + 0x24]
    00c412bc 48 83 c6 30     ADD        RSI,0x30
    00c412c0 4c 89 40 24     MOV        qword ptr [RAX + 0x24],R8
    00c412c4 48 83 c0 30     ADD        RAX,0x30
    00c412c8 4c 8b 77 08     MOV        R14,qword ptr [RDI + 0x8]
                         LAB_00c412cc                                    XREF[1]:     00c41275(j)  
    00c412cc 4c 39 f0        CMP        RAX,R14
    00c412cf 75 d3           JNZ        LAB_00c412a4
    00c412d1 48 39 ca        CMP        RDX,RCX
    00c412d4 74 c1           JZ         LAB_00c41297
    00c412d6 48 29 d1        SUB        RCX,RDX
    00c412d9 48 83 c6 08     ADD        RSI,0x8
    00c412dd 48 8d 05        LEA        RAX,[DAT_051bd008]                               = D0h
             24 bd 57 04
    00c412e4 48 8d 15        LEA        RDX,[DAT_051abf38]                               = D0h
             4d ac 56 04
                         LAB_00c412eb                                    XREF[1]:     00c41319(j)  
    00c412eb 49 89 06        MOV        qword ptr [R14],RAX=>DAT_051bd008                = D0h
    00c412ee c5 f8 10 06     VMOVUPS    XMM0,xmmword ptr [RSI]
    00c412f2 c5 f8 10        VMOVUPS    XMM1,xmmword ptr [RSI + 0xc]
             4e 0c
    00c412f7 c4 c1 78        VMOVUPS    xmmword ptr [R14 + 0x8],XMM0
             11 46 08
    00c412fd c4 c1 78        VMOVUPS    xmmword ptr [R14 + 0x14],XMM1
             11 4e 14
    00c41303 49 89 16        MOV        qword ptr [R14],RDX=>DAT_051abf38                = D0h
    00c41306 4c 8b 46 1c     MOV        R8,qword ptr [RSI + 0x1c]
    00c4130a 48 83 c6 30     ADD        RSI,0x30
    00c4130e 4d 89 46 24     MOV        qword ptr [R14 + 0x24],R8
    00c41312 49 83 c6 30     ADD        R14,0x30
    00c41316 48 ff c1        INC        RCX
    00c41319 75 d0           JNZ        LAB_00c412eb
    00c4131b e9 77 ff        JMP        LAB_00c41297
             ff ff
                         LAB_00c41320                                    XREF[1]:     00c4125a(j)  
    00c41320 49 89 f4        MOV        R12,RSI
    00c41323 48 89 d6        MOV        RSI,RDX
    00c41326 48 89 fb        MOV        RBX,RDI
    00c41329 49 89 d7        MOV        R15,RDX
    00c4132c e8 7f a9        CALL       FUN_0194bcb0                                     undefined FUN_0194bcb0()
             d0 00
    00c41331 4c 8b 33        MOV        R14,qword ptr [RBX]
    00c41334 49 83 c4 08     ADD        R12,0x8
    00c41338 48 89 df        MOV        RDI,RBX
    00c4133b 48 8d 05        LEA        RAX,[DAT_051bd008]                               = D0h
             c6 bc 57 04
    00c41342 48 8d 0d        LEA        RCX,[DAT_051abf38]                               = D0h
             ef ab 56 04
    00c41349 4c 89 e2        MOV        RDX,R12
                         LAB_00c4134c                                    XREF[1]:     00c4137a(j)  
    00c4134c 49 89 06        MOV        qword ptr [R14],RAX=>DAT_051bd008                = D0h
    00c4134f c5 f8 10 02     VMOVUPS    XMM0,xmmword ptr [RDX]
    00c41353 c5 f8 10        VMOVUPS    XMM1,xmmword ptr [RDX + 0xc]
             4a 0c
    00c41358 c4 c1 78        VMOVUPS    xmmword ptr [R14 + 0x8],XMM0
             11 46 08
    00c4135e c4 c1 78        VMOVUPS    xmmword ptr [R14 + 0x14],XMM1
             11 4e 14
    00c41364 49 89 0e        MOV        qword ptr [R14],RCX=>DAT_051abf38                = D0h
    00c41367 48 8b 72 1c     MOV        RSI,qword ptr [RDX + 0x1c]
    00c4136b 48 83 c2 30     ADD        RDX,0x30
    00c4136f 49 89 76 24     MOV        qword ptr [R14 + 0x24],RSI
    00c41373 49 83 c6 30     ADD        R14,0x30
    00c41377 49 ff cf        DEC        R15
    00c4137a 75 d0           JNZ        LAB_00c4134c
    00c4137c e9 16 ff        JMP        LAB_00c41297
             ff ff
                         LAB_00c41381                                    XREF[1]:     00c41285(j)  
    00c41381 b9 24 00        MOV        ECX,0x24
             00 00
                         LAB_00c41386                                    XREF[1]:     00c413ad(j)  
    00c41386 c5 f8 10        VMOVUPS    XMM0,xmmword ptr [RSI + RCX*0x1 + -0x1c]
             44 0e e4
    00c4138c c5 f8 10        VMOVUPS    XMM1,xmmword ptr [RSI + RCX*0x1 + -0x10]
             4c 0e f0
    00c41392 c5 f8 11        VMOVUPS    xmmword ptr [RAX + RCX*0x1 + -0x10],XMM1
             4c 08 f0
    00c41398 c5 f8 11        VMOVUPS    xmmword ptr [RAX + RCX*0x1 + -0x1c],XMM0
             44 08 e4
    00c4139e 4c 8b 04 0e     MOV        R8,qword ptr [RSI + RCX*0x1]
    00c413a2 4c 89 04 08     MOV        qword ptr [RAX + RCX*0x1],R8
    00c413a6 48 83 c1 30     ADD        RCX,0x30
    00c413aa 48 ff ca        DEC        RDX
    00c413ad 75 d7           JNZ        LAB_00c41386
    00c413af 4c 8b 77 08     MOV        R14,qword ptr [RDI + 0x8]
    00c413b3 e9 d3 fe        JMP        LAB_00c4128b
             ff ff
                         LAB_00c413b8                                    XREF[1]:     00c4128e(j)  
    00c413b8 49 89 fc        MOV        R12,RDI
    00c413bb 4c 89 fb        MOV        RBX,R15
                         LAB_00c413be                                    XREF[1]:     00c413cd(j)  
    00c413be 48 8b 03        MOV        RAX,qword ptr [RBX]
    00c413c1 48 89 df        MOV        RDI,RBX
    00c413c4 ff 10           CALL       qword ptr [RAX]
    00c413c6 48 83 c3 30     ADD        RBX,0x30
    00c413ca 4c 39 f3        CMP        RBX,R14
    00c413cd 75 ef           JNZ        LAB_00c413be
    00c413cf 4d 89 fe        MOV        R14,R15
    00c413d2 4c 89 e7        MOV        RDI,R12
    00c413d5 e9 bd fe        JMP        LAB_00c41297
             ff ff
    00c413da cc              ??         CCh
    00c413db cc              ??         CCh
    00c413dc cc              ??         CCh
    00c413dd cc              ??         CCh
    00c413de cc              ??         CCh
    00c413df cc              ??         CCh
    00c413e0 48              ??         48h    H
    00c413e1 83              ??         83h
    00c413e2 c7              ??         C7h
    00c413e3 10              ??         10h
    00c413e4 e9              ??         E9h
    00c413e5 07              ??         07h
    00c413e6 00              ??         00h
    00c413e7 00              ??         00h
    00c413e8 00              ??         00h
    00c413e9 cc              ??         CCh
    00c413ea cc              ??         CCh
    00c413eb cc              ??         CCh
    00c413ec cc              ??         CCh
    00c413ed cc              ??         CCh
    00c413ee cc              ??         CCh
    00c413ef cc              ??         CCh
    00c413f0 55              ??         55h    U
    00c413f1 48              ??         48h    H
    00c413f2 89              ??         89h
    00c413f3 e5              ??         E5h
    00c413f4 41              ??         41h    A
    00c413f5 56              ??         56h    V
    00c413f6 53              ??         53h    S
    00c413f7 48              ??         48h    H
    00c413f8 89              ??         89h
    00c413f9 fb              ??         FBh
    00c413fa 48              ??         48h    H
    00c413fb 8b              ??         8Bh
    00c413fc 7f              ??         7Fh    
    00c413fd 08              ??         08h
    00c413fe 48              ??         48h    H
    00c413ff 85              ??         85h
    00c41400 ff              ??         FFh
    00c41401 74              ??         74h    t
    00c41402 3f              ??         3Fh    ?
    00c41403 48              ??         48h    H
    00c41404 8b              ??         8Bh
    00c41405 73              ??         73h    s
    00c41406 10              ??         10h
    00c41407 4c              ??         4Ch    L
    00c41408 8d              ??         8Dh
    00c41409 73              ??         73h    s
    00c4140a 08              ??         08h
    00c4140b e8              ??         E8h
    00c4140c 40              ??         40h    @
    00c4140d 00              ??         00h
    00c4140e 00              ??         00h
    00c4140f 00              ??         00h
    00c41410 48              ??         48h    H
    00c41411 8b              ??         8Bh
    00c41412 7b              ??         7Bh    {
    00c41413 08              ??         08h
    00c41414 48              ??         48h    H
    00c41415 8b              ??         8Bh
    00c41416 73              ??         73h    s
    00c41417 18              ??         18h
    00c41418 48              ??         48h    H
    00c41419 29              ??         29h    )
    00c4141a fe              ??         FEh
    00c4141b 48              ??         48h    H
    00c4141c 81              ??         81h
    00c4141d fe              ??         FEh
    00c4141e 00              ??         00h
    00c4141f 10              ??         10h
    00c41420 00              ??         00h
    00c41421 00              ??         00h
    00c41422 72              ??         72h    r
    00c41423 08              ??         08h
    00c41424 48              ??         48h    H
    00c41425 8b              ??         8Bh
    00c41426 7f              ??         7Fh    
    00c41427 f8              ??         F8h
    00c41428 48              ??         48h    H
    00c41429 83              ??         83h
    00c4142a ce              ??         CEh
    00c4142b 27              ??         27h    '
    00c4142c e8              ??         E8h
    00c4142d 6f              ??         6Fh    o
    00c4142e 8e              ??         8Eh
    00c4142f 2c              ??         2Ch    ,
    00c41430 03              ??         03h
    00c41431 c5              ??         C5h
    00c41432 f8              ??         F8h
    00c41433 57              ??         57h    W
    00c41434 c0              ??         C0h
    00c41435 c4              ??         C4h
    00c41436 c1              ??         C1h
    00c41437 78              ??         78h    x
    00c41438 11              ??         11h
    00c41439 06              ??         06h
    00c4143a 49              ??         49h    I
    00c4143b c7              ??         C7h
    00c4143c 46              ??         46h    F
    00c4143d 10              ??         10h
    00c4143e 00              ??         00h
    00c4143f 00              ??         00h
    00c41440 00              ??         00h
    00c41441 00              ??         00h
    00c41442 5b              ??         5Bh    [
    00c41443 41              ??         41h    A
    00c41444 5e              ??         5Eh    ^
    00c41445 5d              ??         5Dh    ]
    00c41446 c3              ??         C3h
    00c41447 cc              ??         CCh
    00c41448 cc              ??         CCh
    00c41449 cc              ??         CCh
    00c4144a cc              ??         CCh
    00c4144b cc              ??         CCh
    00c4144c cc              ??         CCh
    00c4144d cc              ??         CCh
    00c4144e cc              ??         CCh
    00c4144f cc              ??         CCh_
Dr.Binary

Both of these are virtual assignment operators of the enum-descriptor class family — the XREFs being data references (05514ca0(*), 051aba60(*)) gives it away: they're vtable slots, not call sites. Decoded:

FUN_0056ab60(dst, src) — downcasts src (05585258 base → 05514ec0 derived), then copies one object ref: eh_650(dst+0x20, src->field_0x20).

FUN_00c411b0(dst, src) — downcasts to another derived type (051abf10), then assigns a std::vector of 0x30-byte elements from src+0x170 into dst+0x170 (element copy-ctor with vtables DAT_051bd008/DAT_051abf38; the (end−begin)>>4 × 0xAAAA…AB is the ÷48 for the 0x30 stride).

So: ref-copy and vector-copy plumbing for the debug property system. The enum-descriptor route is now exhausted — every xref of that class has been framework assignment/copy code. The dropdown is data; nothing in its class family applies a camera.

Decision point — two ways forward

Route 1 (still one search away): the gameplay cycle writer. The car's camera state lives at car+0x130340 (we've now confirmed 6 = bumper in two independent functions). The cycle button handler writes that field. Run the byte search:

Search → For Bytes:  40 03 13 00      (displacement 0x130340)

Filtering guide for the hits:

  • most will be reads inside the race engine (you'll recognize the == 6 / +0x1302e0 patterns from FUN_02867e80/FUN_0042bb00) — ignore those
  • the writer you want stores an immediate (MOV dword ptr [reg+0x130340], N), or does ADD/compare-chains over small constants, and sits in a UI/input-area function rather than the race loop
  • neighbors will likely show the allowed-camera list as a compare/immediate sequence — that list is the cycle roster, and extending it is the patch

Route 2 (skip the remaining RE — you already know enough): at this point you know the runtime state layout well enough to cycle cameras without finding the retail handler:

  • car + 0x130340 — camera state enum (0…N; 6 = bumper; cycle 0–10 empirically and watch what changes)
  • scene + 0x344f8 — onboard slot (0/1)
  • scene + 0x34500 — TV slot (director repoints it to scene+0x9a708)

A tiny runtime payload (or a GT7Patcher-style memory-write entry bound to a key) that increments car+0x130340 per press and clamps at, say, 12 would give you camera cycling with zero further reversing — just experimentation to map which state value is which camera.

If you tell me which route you want, I'll either (a) wait for the 40 03 13 00 hit list and mark the exact patch instruction, or (b) write you the payload/patch-entry skeleton for the runtime-poke version now.

I TRIED SEARCH IN PS4 CHEATER I WHILE CHANGE CAMERAS IHAVE THREE SEULTS, THE FIRST WATCHPOINT 0000000000591cad c4 41 78 13 17 vmovlps [r15], xmm10

Dr.Binary

This is the breakthrough approach — a runtime watchpoint beats all the static guessing. Now let's convert it into a static Ghidra address and identify the writer.

Step 1 — find the module base (needed to map runtime → static)

Everything in Ghidra is a static offset; the game loads at a random base each launch:

static_address = runtime_address − module_base

Get the base one of these ways (easiest first):

  1. Your tool likely shows it — PS4 Cheater-style tools list memory regions; the big executable region (where your 0x591CAD hit lives) is the eboot image — its start = base.
  2. Anchor-scan: search memory for the string bytes 4F 4E 42 4F 41 52 44 5F 42 4F 4E 4E 45 54 ("ONBOARD_BONNET"). We know its static address is 0x0493D398, so:
    base = runtime_addr_of_that_string − 0x493D398
    
    (It's static const data, so exactly one copy — unambiguous.)
  3. Sanity-check: read memory at base + 0x591CAD — the bytes there should be C4 41 78 13 17, matching your breakpoint.

Then static address of your writer = 0x591CAD − base — paste that and I'll tell you exactly which function it's in (the 0x59xxxx range is code we've partially toured: FUN_0056ab60, FUN_00566560 live nearby).

Step 2 — read the registers at the watchpoint

The instruction:

vmovlps [r15], xmm10     ; store low 8 bytes of xmm10 → [r15]

is a 64-bit packed store — likely two adjacent values (two ints, or int+float). At the breakpoint, your tool should show registers; grab:

  • R15 = the destination address. The magic question: R15 − car_struct_base? If the delta is around 0x130340 (the camera-state field we identified!) — this writer is the camera state writer, confirmed.
  • XMM10 low 64 bits = the value being written — if you see small ints in two dwords (e.g., 06 and something), that's camera-id + companion field.

Cycling the camera a few times while watching should show the value stepping through your camera ids — that confirms the field.

Step 3 — the other two results

List all three watchpoints (address + writing instruction). One of them is almost certainly the cycle handler (the one that computes the next value — it'll read the current value, add 1, compare against a bound, and write). That compare-against-bound is your patch: raise the bound → the retail cycle button reaches more cameras.

So, report back: module base, R15, XMM10 low qword, the static address you compute, and the other two results. With that I can name the function, the exact patch bytes, and the file offset for a permanent eboot patch.

0x591CAD — the bytes there should be C4 41 78 13 17, matching your breakpoint. THIS IS CORRECT

Dr.Binary

Careful — that check only counts if you read at base + 0x591CAD (i.e. you already knew the base). If you simply read at the runtime address 0x591CAD where your breakpoint sits, the bytes will match by definition — that tells us nothing about the base yet.

If you did use a known base → the writer's static address is 0x591CAD, go straight to step below. If not → get the base first: search memory for the string ONBOARD_BONNET, take its runtime address, and base = runtime − 0x493D398. Then verify base + 0x591CAD shows C4 41 78 13 17.

Next step in Ghidra

  1. Ctrl+G → 0x00591CAD
  2. Note which function it lands in (the listing's FUNCTION header above it / the decompiler panel's function name — likely something like FUN_0059xxxx)
  3. Paste that function's decompilation, plus the raw listing from roughly 0x591C50–0x591D50 so I can see the neighborhood

What I'm looking for in it:

  • the read of the current camera value just before your vmovlps store (the cycle's "get current" step),
  • a compare against a bound (CMP x, N / JA / %) — that immediate is the cycle clamp, i.e. the patch,
  • which struct the destination belongs to — cross-checking R15 against our known fields (car+0x130340 camera state, scene +0x344f8/+0x34500).

Also still want (from the watchpoint session)

  • R15 and XMM10 low 64 bits at the breakpoint
  • the other two results of your changed-value scan with their watchpoints

The vmovlps is a packed store, so the camera id is probably one dword of a pair — knowing which dword steps when you cycle pins the exact field. With the function decompile + those register values, I'll give you the patch address and bytes.

    00591ca7 0c e8           OR         AL,0xe8
    00591ca9 29              ??         29h    )
    00591caa 04 49           ADD        AL,0x49
    00591cac 89 c7           MOV        EDI,EAX
    00591cae 48 8d 7d b8     LEA        RDI,[RBP + -0x48]
    00591cb2 48 b9 74        MOV        RCX,0x6b7261645f617274
             72 61 5f 
             64 61 72 6b
    00591cbc 48 89 07        MOV        qword ptr [RDI],RAX
    00591cbf 48 c7 47        MOV        qword ptr [RDI + 0x10],0x18
             10 18 00 
             00 00
    00591cc7 48 c7 47        MOV        qword ptr [RDI + 0x18],0x1f
             18 1f 00 
             00 00
    00591ccf 49 89 4f 10     MOV        qword ptr [R15 + 0x10],RCX
    00591cd3 c5 f8 11 00     VMOVUPS    xmmword ptr [RAX],XMM0
    00591cd7 41 c6 47        MOV        byte ptr [R15 + 0x18],0x0
             18 00
    00591cdc e8 5f f7        CALL       FUN_00591440                                     undefined FUN_00591440()
             ff ff
    00591ce1 c5 f8 10 00     VMOVUPS    XMM0,xmmword ptr [RAX]
    00591ce5 4c 89 ff        MOV        RDI,R15
    00591ce8 c5 f8 11        VMOVUPS    xmmword ptr [DAT_062eabe0],XMM0
             05 f0 8e 
             d5 05
    00591cf0 e8 db 75        CALL       eh_92d0                                          undefined eh_92d0()
             a7 ff
    00591cf5 48 8d 3d        LEA        RDI,[DAT_062eabf0]
             f4 8e d5 05
    00591cfc e8 8f 85        CALL       __cxa_guard_release                              undefined __cxa_guard_release()
             97 03
    00591d01 e9 32 f8        JMP        LAB_00591538
             ff ff
                         LAB_00591d06                                    XREF[1]:     00591668(j)  
    00591d06 e8 55 b7        CALL       __stack_chk_fail                                 undefined __stack_chk_fail()
             97 03
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
    00591d0b 0f              ??         0Fh
    00591d0c 0b              ??         0Bh
    00591d0d eb              ??         EBh
    00591d0e 0e              ??         0Eh
    00591d0f eb              ??         EBh
    00591d10 0c              ??         0Ch
    00591d11 eb              ??         EBh
    00591d12 0a              ??         0Ah
    00591d13 eb              ??         EBh
    00591d14 08              ??         08h
    00591d15 eb              ??         EBh
    00591d16 06              ??         06h
    00591d17 eb              ??         EBh
    00591d18 04              ??         04h
    00591d19 eb              ??         EBh
    00591d1a 02              ??         02h
    00591d1b eb              ??         EBh
    00591d1c 00              ??         00h
    00591d1d 4c              ??         4Ch    L
    00591d1e 89              ??         89h
    00591d1f ff              ??         FFh
    00591d20 48              ??         48h    H
    00591d21 89              ??         89h
    00591d22 c3              ??         C3h
    00591d23 e8              ??         E8h
    00591d24 a8              ??         A8h
    00591d25 75              ??         75h    u
    00591d26 a7              ??         A7h
    00591d27 ff              ??         FFh
    00591d28 eb              ??         EBh
    00591d29 13              ??         13h
    00591d2a eb              ??         EBh
    00591d2b 0e              ??         0Eh
    00591d2c eb              ??         EBh
    00591d2d 0c              ??         0Ch
    00591d2e eb              ??         EBh
    00591d2f 0a              ??         0Ah
    00591d30 eb              ??         EBh
    00591d31 08              ??         08h
    00591d32 eb              ??         EBh
    00591d33 06              ??         06h
    00591d34 eb              ??         EBh
    00591d35 04              ??         04h
    00591d36 eb              ??         EBh
    00591d37 02              ??         02h
    00591d38 eb              ??         EBh
Dr.Binary

This listing actually disproves the mapping — which is useful. Look at the bytes:

  • Your runtime watchpoint: 0x591CAD = c4 41 78 13 17 (vmovlps [r15], xmm10)
  • Ghidra at 0x00591CAC–CAD: 89 c7 (mov edi,eax), and the surrounding bytes (0c e8 29 04 49 89 c7 48 8d 7d b8…) don't contain c4 41 78 13 17 anywhere

Different code, same offset ⇒ the runtime→static mapping you assumed is wrong. The 0x591CAD from the cheat tool is the runtime address (or some tool-relative address), not a static offset — your earlier "verification" was circular (reading the bytes at the same runtime address the breakpoint sits at always matches).

Also side note: this Ghidra region is a lazy-init string builder (RCX = 0x6b7261645f617274 = ASCII "trad_rkb" stored into a std::string, guarded by DAT_062eabf0 + __cxa_guard_release) — unrelated to cameras, as expected from a wrong-base read.

Correct procedure to get the real base

Method A — anchor string (most reliable):

  1. In the cheat tool, search the game's memory for bytes 4F 4E 42 4F 41 52 44 5F 42 4F 4E 4E 45 54 ("ONBOARD_BONNET")
  2. Note the runtime address it's found at (call it R)
  3. base = R − 0x493D398
  4. Verify: read at base + 0x493D398 → the string; and read at base + 0x06BA7488 → 00 00 00 00 (our state global)

Method B — region list: many PS4/PS5 cheat tools show the memory map; the eboot module region's start address is the base (it will be a large aligned value like 0x4xxxxxxx or 0x8xxxxxxx, not 0x591CAD-sized).

Then map the watchpoint

static_address = 0x591CAD_watchpoint_runtime − base

In Ghidra: Ctrl+G → the computed static address → if the cursor lands mid-instruction (Ghidra synced differently), select the byte and press D (Disassemble) — it will show the vmovlps [r15], xmm10 in context.

One more possibility to rule out: if your tool reports addresses relative to the module base (some do), then check whether the bytes at Ghidra 0x0591CAD ± a few bytes contain c4 41 78 13 17 after pressing D at 0x0591CAD — if they do, the mapping was fine and it was just a disassembly-sync issue.

Paste the base (or the ONBOARD_BONNET runtime address) and the re-mapped static address, and we'll land in the right function this time.

I SEARCHED FOR THAT AND GOT THRRE RESULT THE ONE IN THE EBOOT RANGE 0X4D3D398

Dr.Binary

Base solved: 0x4D3D398 − 0x493D398 = 0x400000

Clean and page-aligned — and it means the mapping for the whole module is simply:

runtime_address = static_address + 0x400000
static_address  = runtime_address − 0x400000

Your watchpoint writer, mapped

0x591CAD (runtime) − 0x400000 = 0x00191CAD (static)

In Ghidra: Ctrl+G → 0x00191CAD → if it lands mid-instruction, click the byte and press D. It should disassemble as vmovlps [r15], xmm10 (c4 41 78 13 17). Paste the containing function's decompile plus the listing around it (0x00191C00–0x00191D80 or so) and we'll identify the field and the surrounding cycle logic.

Also map the other two watchpoint results the same way (each runtime − 0x400000) — one of them should be the actual cycle/advance writer.

Bonus — you can now live-test everything we've analyzed

With base known and a write-capable tool, you don't need file patches for experiments anymore:

WhatRuntime addressTry
Debug-camera state machine0x4BA7488write 9 (or 7) while in a race → state 9 runs the activation (FUN_02856e40) and chains to enable — this is the live test of whether the debug camera object exists in your session
Car camera statecar_struct + 0x130340write small ints (0…12) — watch which values give which camera (6 = bumper)

If writing 9/7 to 0x4BA7488 in-race visibly changes the camera, we've proven the whole chain statically analyzed is live in release mode — and the patch design becomes trivial. If nothing happens, the camera object isn't present and we stop guessing.

Paste the 0x00191CAD function and (optionally) the result of the 0x4BA7488 experiment.

void eh_191770(float param_1,float param_2,float param_3,long param_4,uint param_5,uint param_6)

{ undefined8 uVar1; double dVar2; float fVar3; long lVar4; ushort uVar5; uint uVar6; ulong uVar7; uint uVar8; ulong uVar9; ulong uVar10; undefined8 *puVar11; undefined4 uVar12; float fVar13; double dVar14; double dVar15; undefined1 auVar16 [16]; undefined1 auVar17 [16]; double dVar18; double dVar19; undefined1 auVar20 [16]; undefined1 auVar21 [16]; undefined1 auVar22 [16]; float fVar23; undefined1 auVar24 [16]; float fVar25; undefined8 in_XMM15_Qb; double local_e8; double local_e0; double local_d8; double local_d0; double local_c8; double local_c0; double local_b8; double local_b0; double local_a8; double local_a0; double local_98; ulong local_90; long local_88; double local_80; double local_78; ulong local_70; undefined1 local_68 [16]; double local_58; float local_4c; float local_48; float local_44; double local_40; float local_34;

if (((((*(float )(param_4 + 0x1600) != param_1) || (NAN((float )(param_4 + 0x1600)) || NAN(param_1))) || ((uint )(param_4 + 0x1604) != param_6)) || (((float )(param_4 + 0x1608) != param_2 || (NAN((float )(param_4 + 0x1608)) || NAN(param_2))))) || (((float )(param_4 + 0x160c) != param_3 || (NAN((float *)(param_4 + 0x160c)) || NAN(param_3))))) { *(float *)(param_4 + 0x1600) = param_1; *(uint *)(param_4 + 0x1604) = param_6; *(float *)(param_4 + 0x1608) = param_2; local_68.0_4 = param_2; *(float *)(param_4 + 0x160c) = param_3; local_34 = param_3; uVar12 = FUN_03ddc3f0(); local_40 = (double)CONCAT44(local_40.4_4,uVar12); dVar14 = (double)FUN_03d2d9a0((double)(int)param_6); if (1 < (int)param_5) { local_70 = (ulong)param_5; local_80 = (double)local_40.0_4 + 1.8257480647361595 + dVar14 * -0.5; local_78 = (double)(int)param_5; uVar10 = 1; local_44 = 1.0 / (float)local_68.0_4; local_48 = (float)(int)param_6; local_88 = param_4; do { lVar4 = local_88; auVar16.0_8 = (double)(int)(uint)uVar10 / local_78; auVar16.8_8 = in_XMM15_Qb; auVar17.0_4 = (float)auVar16.0_8; auVar17.4_12 = auVar16.4_12; fVar13 = (float)FUN_03ddb9f0(auVar17.0_8,local_44); dVar14 = (double)fVar13; if (dVar14 <= 0.001) { dVar14 = 0.001; } local_58 = dVar14 * dVar14 * dVar14 * dVar14; dVar14 = (double)FUN_03d2d9a0(local_58 + 1.0); uVar9 = 0; local_c8 = dVar14 * -0.5 + local_80; local_c0 = local_58 * local_58; local_b0 = local_58 * 4.0; local_4c = (float)(1 << ((uint)uVar10 & 0x1f)) * local_34; local_b8 = local_c0 * local_c0; local_a0 = local_c0 + local_c0; local_a8 = local_58 * local_c0 * 4.0; local_98 = local_58 + local_58; local_90 = uVar10; do { uVar8 = (uint)uVar9; uVar5 = (ushort)uVar9 << 8 | (ushort)uVar9 >> 8; uVar6 = uVar5 >> 4 & 0xf0f | (uVar5 & 0xf0f) << 4; uVar6 = (uVar6 >> 2 & 0x3333) + (uVar6 & 0x3333) * 4; dVar18 = (double)((float)(int)uVar8 / local_48); dVar14 = dVar18 + -1.0; dVar2 = dVar14 * dVar14; dVar15 = 0.0; dVar19 = (dVar2 - (dVar18 + 1.0) * dVar14 * local_98) + ((dVar18 + 4.0 + -2.0) * dVar18 + 1.0) * local_c0; fVar13 = (float)((uVar6 >> 1 & 0x5555) + (uVar6 & 0x5555) * 2) * 1.5258789e-05; dVar14 = (((dVar2 * dVar2 + dVar2 * dVar2 * local_b0 + dVar14 * local_a8 * (dVar14 * 8.0 * dVar18 + ((dVar18 * 8.0 + dVar14 * dVar2) - dVar18 * 0.0))) - dVar2 * local_a0 * ((dVar2 - dVar18) * 8.0 + (dVar18 * 3.0 + -1.0) * 8.0 + (dVar2 * -3.0 - dVar18 * 0.0))) + ((((dVar2 * 16.0 + (dVar18 + -2.0) * ((dVar18 + -2.0) * dVar18 + 2.0)) - (dVar14 * dVar18 + 1.0) * 16.0) - (dVar18 * dVar18 + -1.0) * 0.0) * dVar18 + 1.0) * local_b8) / (dVar19 * dVar19); if ((dVar14 < 1.0) && (dVar15 = 1.5707963267948966, -1.0 < dVar14)) { local_40 = (double)CONCAT44(local_40.4_4,fVar13); dVar15 = acos(dVar14); dVar15 = dVar15 * 0.5; fVar13 = local_40.0_4; } local_40 = (double)fVar13 * 6.283185307179586; FUN_03f06a20(dVar15,&local_e8,&local_e0); FUN_03f06a20(local_40,&local_d8,&local_d0); auVar21.0_4 = (float)(local_e8 * local_d0); auVar21.4_4 = (int)((ulong)(local_e8 * local_d0) >> 0x20); auVar21.8_8 = 0; auVar16 = vblendps_avx(auVar21,local_68,0xc); auVar20.0_4 = (float)(local_e8 * local_d8); auVar20.4_4 = (int)((ulong)(local_e8 * local_d8) >> 0x20); auVar20.8_8 = 0; auVar16 = vinsertps_avx(auVar16,auVar20,0x10); auVar24.0_4 = (float)local_e0; auVar24.4_4 = (int)((ulong)local_e0 >> 0x20); auVar24.8_8 = 0; local_68 = vinsertps_avx(auVar16,auVar24,0x20); if (0.0 < local_34) { fVar13 = -0.5; fVar23 = -0.5; if (uVar9 != 0) { fVar13 = (float)(uVar8 & 3) * 0.25 + 0.0; if ((3 < uVar9) && (fVar13 = fVar13 + (float)(uVar8 >> 2 & 3) * 0.0625, 0xf < uVar9)) { fVar23 = 0.015625; uVar7 = uVar9 >> 4 & 0xfffffff; do { uVar6 = (uint)uVar7; uVar7 = uVar7 >> 2; fVar25 = fVar23 * (float)(uVar6 & 3); fVar23 = fVar23 * 0.25; fVar13 = fVar13 + fVar25; } while (3 < uVar6); } uVar7 = uVar9 & 0xffffffff; fVar13 = fVar13 + -0.5; fVar23 = (float)(uVar8 + (int)(uVar7 / 5) * -5) * 0.2 + 0.0; if (4 < uVar9) { fVar23 = fVar23 + (float)(uint)((int)(uVar7 / 5) + (int)(uVar7 / 0x19) * -5) * 0.040000003; if (0x18 < uVar9) { fVar25 = 0.008; uVar7 = uVar7 / 0x19; do { uVar6 = (uint)uVar7; fVar3 = fVar25 * (float)(uVar6 + (int)(uVar7 / 5) * -5); fVar25 = fVar25 * 0.2; fVar23 = fVar23 + fVar3; uVar7 = uVar7 / 5; } while (4 < uVar6); } } fVar23 = fVar23 + -0.5; } auVar22.4_4 = 0; auVar22.0_4 = local_4c * fVar13 + auVar21.0_4; auVar22.8_8 = local_68.8_8; local_68 = vinsertps_avx(auVar22,ZEXT416((uint)(local_4c * fVar23 + auVar20.0_4)),0x10 ); } puVar11 = (undefined8 *)(uVar9 * 0x10 + uVar10 * 0x200 + -0x200 + lVar4); dVar19 = SQRT(local_e0 * local_e0 + -1.0 + 1.0); uVar1 = vmovlps_avx(local_68); *puVar11 = uVar1; uVar12 = vextractps_avx(local_68,2); *(undefined4 *)(puVar11 + 1) = uVar12; dVar14 = SQRT(dVar19 * 0.5 + 0.5); dVar14 = dVar14 * (local_58 * dVar14 - dVar14) + 1.0; dVar14 = (double)FUN_03d2d9a0((local_e0 * (local_58 / (dVar14 * dVar14))) / dVar19); uVar9 = uVar9 + 1; *(float *)((long)puVar11 + 0xc) = (float)(dVar14 * -0.5 + local_c8); } while (uVar9 != param_6); uVar10 = local_90 + 1; } while (uVar10 != local_70); } } return; }

Dr.Binary

This one's a false positive — you caught a rendering math routine, not camera logic. Decode:

What eh_191770 actually is

It's a spherical sample-table generator (graphics math, not cameras):

  • Bit-reversal + radical inverse: the <<8 | >>8, 0xf0f, 0x3333, 0x5555 swaps reverse a 16-bit index; the 0.25 / 0.0625 and 0.2 / 0.04 / 0.008 digit walks are radical-inverse (van der Corput) in base 4 and base 5 — a jittered low-discrepancy sequence (Halton-style).
  • acos (1.5707963… = π/2) + sincos (FUN_03f06a20) + 6.2831853… = 2π → maps the 2D jittered coords onto unit-sphere directions, arranged in rings (param_5 rings × param_6 samples, entries of 16 bytes = float3+weight).
  • Result cache: compares params against param_4+0x1600/04/08/0c and only regenerates when they change.
  • Your watchpoint hit is exactly this line: *puVar11 = vmovlps(local_68) — a float3 vector store into the sample buffer.

This is your classic soft-shadow / AO / sky sampling direction table. When you switched cameras, some rendering parameter changed → the table regenerated → your "changed value" scan caught it. Unrelated to camera state.

Corrections + what to do next

1. My error to fix: with base = 0x400000, the debug-camera state global maps as static 0x06BA7488 + 0x400000 = runtime 0x6FA7488 — not the 0x4BA7488 I said earlier. Sorry — use 0x6FA7488.

2. Better scan strategy for the camera state — target it directly instead of generic changed-value scans:

  1. Get into bumper camera view (state = 6, confirmed twice in the binary)
  2. Scan for exact value 6 (4 bytes)
  3. Switch to another camera → rescan changed among those addresses
  4. Switch back to bumper → rescan changed again — what's left will be tiny: the camera-state field and maybe 1–2 mirrors
  5. Verify by writing values 0–10 to the surviving address while in-race — if the view changes, you've found car+0x130340
  6. Sanity check: the address should sit ~0x130340 bytes into a car structure — with multiple AI cars in the race, sibling cars should show the same offset at regular spacing

3. The live experiment is still pending and now cheap: with base 0x400000, write 9 (then 7) to runtime 0x6FA7488 while in a race/replay — if the debug camera kicks in, the whole cameraDebug chain is live in release mode and your patch options open up dramatically.

Report back: the refined scan results (step 2–4) and whether the 0x6FA7488 write does anything. Those two answers basically finish this.

WRITING 9 AND 7 TO THAT ADRRESS RESTARTS THE REPLAY

Dr.Binary

That's the proof. The entire debug camera subsystem is live in release mode — objects exist, handlers run, vtable calls succeed. And the "restart" is exactly what the math predicted:

Writing 7 runs FUN_02856d80(ctx,1) → seek to ((DAT_06ba7498 − DAT_06ba74a0) × 1000) / 60 milliseconds. Those globals are still zero (never initialized) → seek to 0 ms → replay jumps to the start. Writing 9 captures "now" and then issues the (0, 0, 1) call — also landing you at the start. The seek semantics of vtable+0x158(obj, 0, ms, flag) are now confirmed by observation.

You now have a live replay-timeline controller — here's the runtime map

GlobalStaticRuntime (base 0x400000)Meaning
state0x06BA74880x6FA7488machine state (you've been writing this)
target frame0x06BA74980x6FA7498the seek target (frames @60fps)
base frame0x06BA74A00x6FA74A0offset subtracted in the seek math
skip-capture flag0x06BA748C0x6FA748Cgates FUN_02856eb0

Experiments — in order

  1. Confirm the mark: while the replay plays, write 9 to 0x6FA7488, then read 0x6FA7498 — if it now holds ~elapsed_seconds × 60, FUN_02856eb0 captured "now" as predicted.
  2. Time scrub: write a frame number to 0x6FA7498 (e.g. 0x0BB8 = 3000 = 50 s), then write 7 → the replay should seek to 50 s instead of restarting.
  3. Bookmark/rewind: at a nice moment write 9, let the replay play on, then write 7 — instant jump back to the marked frame. (Free replay-scrubbing!)
  4. The money question — the camera: after any of these, state = 1 = debug camera active (FUN_02855110 per frame). Does the view change? Does anything respond differently? Then try writing 8 (disable) to compare.
  5. If state 1 gives you an altered/frozen/free view — the debug camera is on. The remaining question is only input: the motion.* events and the switch {"target": N} command select/move it — and the 25-camera enum (ONBOARD_BONNET, …) is very likely that target id-space.

Report what step 2 and step 4 do — especially whether the view changes with state 1 active. If it does, you've effectively got the debug camera enabled through memory writes alone, and I'll help you turn the working write-sequence into a permanent patch or a hotkey payload.*

WRITING 1 DOESN'T DO ANYTHING

Dr.Binary

Expected — and it actually confirms the model. State 1 is the "steady" state with no handler side effects (case 1 runs only the per-frame apply FUN_02855110). The restart you saw from 7/9 wasn't the state change itself — it was the seek inside those handlers (vtable+0x158 with time = (target−base)·1000/60, and your target/base globals are still 0 → seek to 0 ms).

So the writes to do something interesting are the ones that trigger handlers. The machine is proven live; now make it do useful things:

Experiment list (in this order)

1. Scrub test (the big one):

  • While the replay is paused or playing: write 0x0BB8 (= 3000 frames = 50 s) to 0x6FA7498
  • Then write 7 to 0x6FA7488
  • If the replay jumps to ~50 s instead of the start → you have memory-controlled replay scrubbing

2. Bookmark test:

  • Play to a moment you like → write 9
  • Let it run 10–20 s → write 7
  • If it jumps back to the marked moment → FUN_02856eb0 captured "now" into 0x6FA7498 as predicted (you can verify by reading 0x6FA7498 right after writing 9 — it should hold the current frame ≈ elapsed × 60)

3. Walk the work states:

  • Write 2, then 3, 4, 5, 6 one at a time (waiting a second between) — each runs one step of the camera-work machine (FUN_028560f0/180/410/4e0/ac0) which chains forward automatically. Note any visible change: camera cuts, different angles, the debug toast/messages (the FUN_038286e0 toast system is active when state = 1!).

4. Sanity: after writing 7, read 0x6FA7488 — should now hold 1 (the handlers write it back). And watch 0x6FA74A0 — if some path sets it, the seek math changes meaning.

What I'm watching for in your results

If step 1 works, you have free replay scrubbing today, via two memory writes — and the "camera cycling" question transforms: the replay camera follows the camera-work schedule, and the debug switch command ({"target": N} → the 25-camera enum) overrides which camera the replay uses. That switch goes through the camera manager's virtual method — not memory-pokeable directly — but it is reachable through the debug menu's camera page, which we know registers in-scene. So: while in the replay, open your debug menu and look for the camera page now. If it's there, its entries + the state writes together give you full manual control: scrub with 0x6FA7498/7, pick cameras from the menu.

Report the scrub test result first — that's the one that changes everything.

WRITING 3 HAS FROZE IT

Dr.Binary

That's the mid-chain hazard I was worried about — states 2–6 aren't independent commands, they're a pipeline. Case 3 runs FUN_02856180(manager, cameraObj), which assumes state 2's step (FUN_028560f0) already prepared its data. Fired cold, it either blocks waiting on a resource that was never created or dereferences something null — hence the hang. The freeze also means the handler never reached its state write-back, so the dispatcher is stuck inside it; writing to memory can't unstick a blocked thread.

Recovery

Restart the game (offline, so no save risk). Before you do — if the tool still responds, read 0x6FA7488: if it's still 3, the handler hung before its write-back; if it advanced (4+), it hung mid-chain. Useful diagnostic for later.

Revised experiment order (safest → most interesting)

  1. Scrub test first (highest value, lowest risk — proven-safe handler):
    • write 0x0BB8 (3000) to 0x6FA7498 → write 7 → expect a jump to ~50 s
  2. Bookmark test:
    • play to a moment → write 9 → let it run → write 7 → expect jump back (verify by reading 0x6FA7498 right after the 9 — should ≈ elapsed × 60)
  3. State 2 — the proper chain entry: if you want the camera-work pipeline, don't cold-fire 3+. Write 2 alone: FUN_028560f0 is the first step and (per the writer xrefs) writes the next state itself — the machine should then walk 3→4→5→6 on its own over successive frames, with each step's prerequisites in place. That's how it runs in a dev session. If it progresses visibly (camera cuts, changes) — great. If it hangs again at a specific step, note which: that step's prerequisite is what release mode never sets up.
  4. 8 at any point = the "off" transition (though note: it runs the same seek math as 7 — set 0x6FA7498 sensibly first or it'll jump to ~0).

And keep in mind the standing bonus: 0x6FA7488 = 1 after any handler runs — with the toast system gated on state 1, you may see debug messages appear on screen after successful handler runs (notifyInstantReplay, motion errors, etc.).

The scrub test (step 1) is the one I want reported most — if 0x6FA7498 + 7 gives you seek-to-arbitrary-frame, you have memory-controlled replay navigation working today, independent of the camera pipeline.

ITS NOT SWITCHING THE CAMERA

Dr.Binary

Right — and that's the honest bottom line of everything we've mapped: this state machine is the replay timeline tool, not a camera switcher. Nothing in handlers 1/7/8/9 changes which camera renders — they seek/record/play the timeline. The camera itself follows the replay's camera-work schedule, and changing it requires the switch command ({"target": N} → camera manager +0x20) — which is a virtual call, not a memory write. That's why no poke has switched anything.

Quick status of what you've actually gained so far:

  • ✅ proven the whole debug subsystem is live in release mode
  • ✅ restart/seek via 0x6FA7488 writes
  • ❓ scrub test (write 0x0BB8 to 0x6FA7498 then 7 → jump to ~50 s?) — you never reported this one; if it works, that's real replay scrubbing even without camera switching
  • ❌ camera switching — needs one of the three routes below

The three remaining routes to actually switch cameras

1. The debug menu inside the replay (30 seconds — still unverified). The cameraDebug page registers while a scene is running. You've checked the menu at the world map, but have you opened it inside a replay? If a Camera page exists there, its buttons issue exactly the switch/scenario commands we've traced — zero patching needed. Do this first.

2. The retail onboard-camera cycle (one byte-search away). For driving cameras (bumper/chase/…), the cycle handler writes car+0x130340 (state 6 = bumper). In Ghidra: Search → For Bytes → 40 03 13 00. Ignore race-engine reads (the == 6 patterns you've seen); the writer with the camera list as immediates/compares is the cycle — extending its list or bound is a small, permanent patch. This was proposed a while back and is still the shortest path to a driving camera cycle.

3. The payload route (the "real" debug camera). A PS5 payload that, on hotkey, calls the camera manager's +0x20 with a target from the 25-camera enum — full manual camera selection in replays/races. You now have the base (0x400000) and the vtable slot; the missing piece is locating the scene singleton at runtime (findable in Ghidra via the caller chain of FUN_0042bb00). This is a weekend project, not a byte patch.

My recommendation

Do #1 right now (in-replay menu check — it either solves this instantly or closes the route). Then run the #2 byte search and paste the hits — the onboard cycle patch is the most patchable, user-visible win remaining. And tell me whether the scrub test worked, because if 0x6FA7498 + 7 gives frame-accurate seeking, you already have a genuinely useful mod (replay scrubbing) even before camera switching lands.

ss.jpg
ss.jpg

THERES 51 RESULTS

Dr.Binary

Excellent — 51 hits, and the list is very telling. Let me triage it:

Hit categories

Engine reads (ignore) — the CMP …, 0x6 scattered through 0x0012xxxx–0x0080xxxx (including 0042c8a5 inside FUN_0042bb00 — that's the bVar39 = state == 6 we already knew). These just test for bumper view.

Data (ignore) — the two ?? 40h entries at 00a451ca/00a45291 are constants, not code.

Constant writers — interesting:

  • 00b1b709 = 2, 00b1b770 = 0, 00b1c165 = 4 — a tight cluster in the 0x00b1xxxx module (neighborhood of the debug/property framework!) setting camera states 2 → 0 → 4
  • the 0x0268xxxx block: several writes of 5, plus 0x4 and 0x0 — same module as the race camera director work (0267f986 sits right next to FUN_02867e80's region)

The prime suspects — read-modify-write pairs:

02680861  MOV EAX, dword ptr [RDI + 0x130340]     ← read current camera state
0268088f  MOV dword ptr [RDI + 0x130340], EAX     ← write it back (modified)

…with 0268082a CMP dword ptr [RDI + 0x130340], 0x6 right before them, all in one function. That's the classic cycle shape: read → compare against 6 (bumper, the known last/edge state) → compute next → store.

Second candidate: 00b1b8fe MOV dword ptr [RBX + 0x130340], EAX (labeled LAB_00b1b8fc) — a computed write in the UI-side cluster that also hard-sets 2 and 4.

Next step — one paste

In Ghidra, click 02680861 (or 0268088f) — the decompiler panel will show the containing function. Paste that function's decompile.

What I expect to find, and will turn into the patch:

  • the read → an if (state == 6) state = X; else state++;-style wrap — the compare constant and the wrap target are the cycle roster
  • patching either the bound or the wrap table extends cycling into the states retail never reaches (and we already know 2/4/5/6 are valid states from the writers above)

If that function turns out to be engine-internal (auto camera switching rather than the button cycle), paste the function containing 00b1b8fe as the fallback — a computed write surrounded by explicit state constants is very likely the UI-driven setter.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_026807fd()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_026807fd                                    XREF[1]:     FUN_02680895:026808c4(c)  
    026807fd 8a 87 60        MOV        AL,byte ptr [RDI + 0x130260]
             02 13 00
    02680803 8a 8f 5e        MOV        CL,byte ptr [RDI + 0x13035e]
             03 13 00
    02680809 3c 02           CMP        AL,0x2
    0268080b 0f 94 c2        SETZ       DL
    0268080e 20 ca           AND        DL,CL
    02680810 80 fa 01        CMP        DL,0x1
    02680813 75 44           JNZ        LAB_02680859
    02680815 80 bf 74        CMP        byte ptr [RDI + 0x130374],0x1
             03 13 00 01
    0268081c 75 25           JNZ        LAB_02680843
    0268081e 48 83 bf        CMP        qword ptr [RDI + 0x1302e0],0x0
             e0 02 13 
             00 00
    02680826 74 1b           JZ         LAB_02680843
    02680828 83 bf 40        CMP        dword ptr [RDI + 0x130340],0x6
             03 13 00 06
    0268082f 75 12           JNZ        LAB_02680843
                         LAB_02680831                                    XREF[1]:     02680868(j)  
    02680831 48 c7 87        MOV        qword ptr [RDI + 0x1302e0],0x0
             e0 02 13 
             00 00 00 
    0268083c c6 87 74        MOV        byte ptr [RDI + 0x130374],0x0
             03 13 00 00
                         LAB_02680843                                    XREF[6]:     0268081c(j), 02680826(j), 
                                                                                      0268082f(j), 0268085d(j), 
                                                                                      0268086d(j), 02680893(j)  
    02680843 c7 87 90        MOV        dword ptr [RDI + 0x130390],0x0
             03 13 00 
             00 00 00 00
    0268084d 48 c7 87        MOV        qword ptr [RDI + 0x130380],0x0
             80 03 13 
             00 00 00 
    02680858 c3              RET
                         LAB_02680859                                    XREF[1]:     02680813(j)  
    02680859 34 02           XOR        AL,0x2
    0268085b 08 c8           OR         AL,CL
    0268085d 75 e4           JNZ        LAB_02680843
    0268085f 8b 87 40        MOV        EAX,dword ptr [RDI + 0x130340]
             03 13 00
    02680865 83 f8 06        CMP        EAX,0x6
    02680868 74 c7           JZ         LAB_02680831
    0268086a 83 f8 05        CMP        EAX,0x5
    0268086d 75 d4           JNZ        LAB_02680843
    0268086f 48 c7 87        MOV        qword ptr [RDI + 0x1302e0],0x0
             e0 02 13 
             00 00 00 
    0268087a c6 87 74        MOV        byte ptr [RDI + 0x130374],0x0
             03 13 00 00
    02680881 8a 87 28        MOV        AL,byte ptr [RDI + 0x130428]
             04 13 00
    02680887 0f b6 c0        MOVZX      EAX,AL
    0268088a c1 e0 02        SHL        EAX,0x2
    0268088d 89 87 40        MOV        dword ptr [RDI + 0x130340],EAX
             03 13 00
    02680893 eb ae           JMP        LAB_02680843
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_02680895()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_02680895                                    XREF[1]:     FUN_026807f0:026807f7(j)  
    02680895 55              PUSH       RBP
    02680896 48 89 e5        MOV        RBP,RSP
    02680899 53              PUSH       RBX
    0268089a 50              PUSH       RAX
    0268089b 48 8b b7        MOV        RSI,qword ptr [RDI + 0x3d8]
             d8 03 00 00
    026808a2 48 8d 87        LEA        RAX,[RDI + 0x3a0]
             a0 03 00 00
    026808a9 48 89 fb        MOV        RBX,RDI
    026808ac 48 89 c7        MOV        RDI,RAX
    026808af e8 dc d0        CALL       FUN_0267d990                                     undefined FUN_0267d990()
             ff ff
    026808b4 48 89 df        MOV        RDI,RBX
    026808b7 c6 83 75        MOV        byte ptr [RBX + 0x130375],0x0
             03 13 00 00
    026808be 48 83 c4 08     ADD        RSP,0x8
    026808c2 5b              POP        RBX
    026808c3 5d              POP        RBP
    026808c4 e9 34 ff        JMP        FUN_026807fd                                     undefined FUN_026807fd()
             ff ff
                         -- Flow Override: CALL_RETURN (CALL_TERMINATOR)
    026808c9 cc              ??         CCh
    026808ca cc              ??         CCh
    026808cb cc              ??         CCh
    026808cc cc              ??         CCh
    026808cd cc              ??         CCh
    026808ce cc              ??         CCh
    026808cf cc              ??         CCh
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_026808d0()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_026808d0                                    XREF[1]:     054037b8(*)  
    026808d0 55              PUSH       RBP
    026808d1 48 89 e5        MOV        RBP,RSP
    026808d4 41 56           PUSH       R14
    026808d6 53              PUSH       RBX
    026808d7 48 8b 47 08     MOV        RAX,qword ptr [RDI + 0x8]
    026808db 4c 63 f6        MOVSXD     R14,ESI
    026808de 48 89 fb        MOV        RBX,RDI
    026808e1 4c 89 f1        MOV        RCX,R14
    026808e4 48 c1 e1 04     SHL        RCX,0x4
    026808e8 48 8b 80        MOV        RAX,qword ptr [RAX + 0xc0]
             c0 00 00 00
    026808ef 48 8b 3c 08     MOV        RDI,qword ptr [RAX + RCX*0x1]
    026808f3 e8 98 56        CALL       FUN_00805f90                                     undefined FUN_00805f90()
             18 fe
    026808f8 48 8b 43 08     MOV        RAX,qword ptr [RBX + 0x8]
    026808fc 48 8b 80        MOV        RAX,qword ptr [RAX + 0xa8]
             a8 00 00 00
    02680903 48 8b 38        MOV        RDI,qword ptr [RAX]
    02680906 e8 a5 80        CALL       FUN_026889b0                                     undefined FUN_026889b0()
             00 00
    0268090b 41 83 fe 01     CMP        R14D,0x1
    0268090f 75 12           JNZ        LAB_02680923
    02680911 48 8b 43 08     MOV        RAX,qword ptr [RBX + 0x8]
    02680915 48 8b 80        MOV        RAX,qword ptr [RAX + 0x98]
             98 00 00 00
    0268091c c6 80 6f        MOV        byte ptr [RAX + 0x13086f],0x0
             08 13 00 00
                         LAB_02680923                                    XREF[1]:     0268090f(j)  
    02680923 5b              POP        RBX
    02680924 41 5e           POP        R14
    02680926 5d              POP        RBP
    02680927 c3              RET
    02680928 cc              ??         CCh
    02680929 cc              ??         CCh
    0268092a cc              ??         CCh
    0268092b cc              ??         CCh
    0268092c cc              ??         CCh
Dr.Binary

This one's camera-state cleanup logic — not the button cycle, but it contains a genuinely useful discovery. Decode:

FUN_026807fd(car) — leave-state transitions

mode   = car->0x130260;  flag = car->0x13035e;
if (mode == 2 && flag) {                       // special camera mode active
    if (car->0x130374 == 1 && car->0x1302e0 != 0 && car->0x130340 == 6)
        clear 0x1302e0 / 0x130374;             // leaving bumper: drop tracking target
}
else if (mode != 2 || !flag) {                 // normal path
    st = car->0x130340;
    if (st == 6)  clear 0x1302e0 / 0x130374;   // leaving bumper
    else if (st == 5) {
        clear 0x1302e0 / 0x130374;
        car->0x130340 = car->0x130428 << 2;    // ★ apply user's camera: state = sel × 4
    }
}
car->0x130390 = 0;  car->0x130380 = 0;         // reset timers

(FUN_02680895 is just a wrapper that refreshes car+0x3a0/+0x3d8 then tail-calls this; FUN_026808d0(idx) is a per-car "reset camera" virtual — confirmed via the vtable xref 054037b8.)

The useful discovery: two camera fields, not one

  • car+0x130428 (byte) = your camera selection — when the state machine exits state 5, it's applied as state = selection × 4
  • car+0x130340 = the live camera state, with states that are multiples of 4 (0, 4, 8, 12, …) alongside specials 5/6

That means the in-memory camera cycle may be as simple as writing the state directly. Try this in your cheat tool, in a race:

  1. Find your car's +0x130340 (you already know how — watchpoint while changing views, or scan for the state value)
  2. Write 4, then 8, then 12, 16, 20, 24 — one at a time
  3. Also try writing the byte at car+0x130428 (values 0–6) — the applied state follows ×4

If each value gives a different camera, you have your camera cycle via a single memory address — and binding it to increment per button press (or just writing the value you want) solves the original goal outright, no further RE needed.

Still pending (if the direct poke doesn't hold)

The director may overwrite +0x130340 each frame — if your write doesn't stick, paste the function containing 00b1b8fe (MOV dword ptr [RBX + 0x130340], EAX, labeled LAB_00b1b8fc) — the remaining computed-write candidate from the search, and the last plausible cycle-handler we haven't looked at.

                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_00b1b870()
         undefined         <UNASSIGNED>   <RETURN>
                         FUN_00b1b870                                    XREF[1]:     eh_168410:00168514(c)  
    00b1b870 55              PUSH       RBP
    00b1b871 48 89 e5        MOV        RBP,RSP
    00b1b874 41 56           PUSH       R14
    00b1b876 53              PUSH       RBX
    00b1b877 48 89 fb        MOV        RBX,RDI
    00b1b87a 48 8b 7f 70     MOV        RDI,qword ptr [RDI + 0x70]
    00b1b87e 83 bf 80        CMP        dword ptr [RDI + 0x80],0x0
             00 00 00 00
    00b1b885 75 7b           JNZ        LAB_00b1b902
    00b1b887 e8 84 01        CALL       FUN_00b1ba10                                     undefined FUN_00b1ba10()
             00 00
    00b1b88c 48 8b b3        MOV        RSI,qword ptr [RBX + 0x3f0]
             f0 03 00 00
    00b1b893 48 8b 93        MOV        RDX,qword ptr [RBX + 0x3f8]
             f8 03 00 00
    00b1b89a 48 8b 7b 70     MOV        RDI,qword ptr [RBX + 0x70]
    00b1b89e 48 29 f2        SUB        RDX,RSI
    00b1b8a1 e8 8a 03        CALL       FUN_00b1bc30                                     undefined FUN_00b1bc30()
             00 00
    00b1b8a6 48 8b 7b 70     MOV        RDI,qword ptr [RBX + 0x70]
    00b1b8aa e8 41 01        CALL       FUN_00b1b9f0                                     undefined FUN_00b1b9f0()
             00 00
    00b1b8af 48 8b 83        MOV        RAX,qword ptr [RBX + 0x3a8]
             a8 03 00 00
    00b1b8b6 8b 48 1c        MOV        ECX,dword ptr [RAX + 0x1c]
    00b1b8b9 48 03 48 30     ADD        RCX,qword ptr [RAX + 0x30]
    00b1b8bd 74 48           JZ         LAB_00b1b907
    00b1b8bf 48 8b 70 28     MOV        RSI,qword ptr [RAX + 0x28]
    00b1b8c3 48 8b 8b        MOV        RCX,qword ptr [RBX + eh_410]
             10 04 00 00
    00b1b8ca 48 8b 7b 70     MOV        RDI,qword ptr [RBX + 0x70]
    00b1b8ce 4c 8d b3        LEA        R14,[RBX + 0x3a0]
             a0 03 00 00
    00b1b8d5 48 01 f1        ADD        RCX,RSI
    00b1b8d8 48 2b 8b        SUB        RCX,qword ptr [RBX + DAT_00000408]               = CCh
             08 04 00 00
    00b1b8df 48 89 4f 60     MOV        qword ptr [RDI + 0x60],RCX
    00b1b8e3 e8 a8 fe        CALL       FUN_00b1b790                                     undefined FUN_00b1b790()
             ff ff
    00b1b8e8 48 8d b3        LEA        RSI,[RBX + 0x130268]
             68 02 13 00
    00b1b8ef 4c 89 f7        MOV        RDI,R14
    00b1b8f2 e8 c9 b0        CALL       FUN_00a469c0                                     undefined FUN_00a469c0()
             f2 ff
    00b1b8f7 b8 03 00        MOV        EAX,0x3
             00 00
                         LAB_00b1b8fc                                    XREF[1]:     00b1b90c(j)  
    00b1b8fc 89 83 40        MOV        dword ptr [RBX + 0x130340],EAX
             03 13 00
                         LAB_00b1b902                                    XREF[1]:     00b1b885(j)  
    00b1b902 5b              POP        RBX
    00b1b903 41 5e           POP        R14
    00b1b905 5d              POP        RBP
    00b1b906 c3              RET
                         LAB_00b1b907                                    XREF[1]:     00b1b8bd(j)  
    00b1b907 b8 04 00        MOV        EAX,0x4
             00 00
    00b1b90c eb ee           JMP        LAB_00b1b8fc
    00b1b90e cc              ??         CCh
    00b1b90f cc              ??         CCh
                         **************************************************************
                         *                          FUNCTION                          *
                         **************************************************************
                           undefined FUN_00b1b910()
         undefined         <UNASSIGNED>   <RETURN>
         undefined8        Stack[-0x38]:8 local_38                                XREF[3]:     00b1b973(W), 
                                                                                               00b1b9a6(R), 
                                                                                               00b1b9e2(R)  
         undefined8        Stack[-0x40]:8 local_40                                XREF[3]:     00b1b94a(W), 
                                                                                               00b1b95e(R), 
                                                                                               00b1b9b5(R)  
                         FUN_00b1b910                                    XREF[3]:     FUN_00b1b360:00b1b3ad(c), 
                                                                                      FUN_00b1b4c0:00b1b515(c), 
                                                                                      FUN_00b1b580:00b1b5d3(c)  
    00b1b910 55              PUSH       RBP
Dr.Binary

This function is a camera-mode transition — and combined with the earlier decode, it finally reveals how camera selection actually works. Decode:

FUN_00b1b870(car) — switch into camera state 3 or 4

mgr = car->0x70;
if (mgr->0x80 != 0) return;                     // already running → skip
FUN_00b1ba10();  FUN_00b1bc30(mgr, list_begin, list_end);  FUN_00b1b9f0(mgr);
if (car->0x3a8.1c + car->0x3a8.30 == 0) {
    next = 4;                                    // → camera state 4
} else {
    mgr->0x60 = (car->0x410 + car->0x3a8.28) − car->0x408;
    FUN_00b1b790();  FUN_00a469c0(car+0x3a0, car+0x130268);
    next = 3;                                    // → camera state 3
}
car->0x130340 = next;

Called from eh_168410 (0x00168514) — the 0x16xxxx module that produced three other search hits (0016843b read state, 00168569 write 6, 0016aa01 compare 6). So 0x16xxxx is a camera sequence commander (race-start/replay transitions: "go to 6", "go to 3/4") — not the button cycle either.

The key insight hiding in FUN_026807fd

Recall its state-5 branch:

car->0x130340 = byte(car->0x130428) << 2;    // applied state = selection × 4

So there's a user camera-selection byte at car+0x130428, and the applied state is selection × 4 (0, 4, 8, 12… — matching the multiple-of-4 states, while 5/6 are special cinematic modes). The retail View button almost certainly just increments that byte — it never touches +0x130340 directly, which is why our search never found a cycle.

Two ways to finish this

1. Find the button handler: Search → For Bytes → 28 04 13 00 (displacement 0x130428). The writer doing ADD byte ptr [reg+0x130428], 1 (or an inc-with-wrap against a small constant) is your cycle handler — that's the patch point (extend its wrap constant → cycle through every camera index).

2. Or skip the RE — poke it at runtime right now: in a race, write your car's car+0x130428 byte to 0, 1, 2, 3, … and watch the camera. (Finding the car base: you already have the technique — watchpoint/changed-scan while switching views; the byte lives at car_base + 0x130428.) If the camera follows the byte, a one-key payload writing byte++ gives you a working cycle.

Paste the 28 04 13 00 hits (filter: writes — especially an ADD/INC or a compare-then-store against a small constant), or report the runtime byte-poke result. Either one ends this.

WHAT DOES THAT MEAN? write your car's car+0x130428

Dr.Binary

Sorry — jargon slip. Let me make it concrete.

What "car+0x130428" means

Every car in a race is one big memory block (a "struct") — thousands of bytes holding all of that car's data. +0x130340 and +0x130428 aren't absolute addresses; they're distances from the start of that block. So "write car+0x130428" means: find where your car's block starts in memory, go 0x130428 bytes in, write one byte there.

How to get there with what you already have

You already found the camera-state address — in your very first PS4-Cheater session you scanned while changing cameras and got 3 results. One was the math-table false positive (vmovlps sample buffer). The other two results are what matter now — go back to them. One of them is the camera state field inside your car's block (+0x130340), and here's the neat part:

selection byte address = state field address + 0xE8

(because 0x130428 − 0x130340 = 0xE8 — exactly 232 bytes further into the same car block.)

So, concretely

  1. Take the address from scan result #2 or #3 (not the vmovlps one)
  2. In the cheat tool, go to that address + 0xE8 — a single byte
  3. Note its value, switch camera once, re-check: if it went 0→1 or 1→2, that's the selection byte ✅
  4. Now write values 0, 1, 2, 3, 4… to it one at a time — watch the camera change

Two caveats from the code we read:

  • The selection is applied when the camera state passes through state 5 — so if writing the byte alone doesn't move the view, also write the state field (result #2/#3 address) to selection × 4 (e.g. selection 2 → write 8), or just tap the in-game view button once after writing.
  • Values are small — expect 0–6ish. Write 7+ only to test the wrap.

Tell me: (a) what the values of your two remaining results were, (b) whether the byte at +0xE8 steps by 1 per camera switch. If yes — you've got a one-byte camera cycle, and binding it to a key (byte+1 per press) is the whole mod.

ss.jpg
ss.jpg

SEARCH INSTEAD

Dr.Binary

Yes — stick with Ghidra searches; this list confirmed the state-field picture. Now run the decisive one:

Next search: the selection byte

Search → Memory → Hex:  28 04 13 00

That's displacement 0x130428 — the user camera-selection byte we discovered (FUN_026807fd: applied as state = selection × 4). Every access to it will show up, and among them should be the View-button cycle handler.

What to look for in the results:

PatternMeaning
ADD byte ptr [reg+0x130428], 0x1 or INC byte ptr […]the cycle button — this is the patch target
CMP byte/… , 0x3 / 0x4 / 0x5 shortly after itthe wrap constant = number of selectable cameras (raise it → cycle reaches more cameras)
MOV byte ptr [reg+0x130428], imm (stores of 0 or small ints)reset/set paths (race start, camera settings UI) — context, not the patch
hits inside 0x0268xxxx/0x16xxxx functionsthe director reading your selection — context

The cycle handler will be small and sit in a UI/input-area module — if the results cluster in a new address range (not 0x268/0x16/0xb1, which we've now fully attributed to the engine and sequencer), that cluster is almost certainly it.

Paste the result list (same as you did here) and I'll point at the exact instruction, tell you the original vs. patched bytes for extending the cycle, and — if you upload the eboot — the file offset for a permanent patch.

ss.jpg
ss.jpg

HERE ARE THE RESULTS

Dr.Binary

Careful — this is still the old search. Look at the dialog: Search Text is 40 03 13 00 (the camera state field, 0x130340) — same 51 results as before.

For the selection byte (0x130428), change the byte sequence to:

28 04 13 00

Steps in your Search Memory window:

  1. In the Byte Sequence field, replace 40 03 13 00 with 28 04 13 00
  2. Click New Search
  3. Paste the new results here

One line of why: 0x130340 = the camera state the engine reads (that's why it's everywhere in the race engine); 0x130428 = the byte you control (the camera selection) — the button cycle writes that one, so its access list should be short and should contain an ADD byte …, 1-style increment. That's the patch target.

ss.jpg
ss.jpg
RR.jpg
RR.jpg

HERE

Dr.Binary

This is a much cleaner list — and it changes the picture in a useful way:

Triage

Data (ignore): 00a451f8, 00a452ba, 00a8d856, 042808b0 (the ?? 28h rows).

Reads (context): 0016855a (the 0x16xxxx sequencer reading your selection), 02680883 (that's inside FUN_026807fd — the ×4 apply we decoded), 02683278, 0268364e.

The XCHG cluster — this is the real mechanism. Note what's absent: no ADD/INC anywhere. The selection byte is never incremented directly — it's swapped in via XCHG: the code computes a new value in a register, then XCHG [car+0x130428], reg writes the new one while pulling the old one out (presumably to compute the next selection).

The prime suspect: the 0x00805xxx function

Look at this trio — all in one function, and it's the only place outside the 0x268 director that touches both camera fields:

00805f9c  CMP dword ptr [RDI + 0x130340], 0x6    ; camera state == bumper?
00805fac  MOV dword ptr [RBX + 0x130340], 0x0    ; state = 0  (reset → re-init from selection)
0080601d  XCHG byte ptr [RBX + 0x130428], AL     ; swap NEW selection in, OLD selection out

That shape is exactly a "change camera" routine: pull the old selection out (into AL), put the new one in, zero the state so the camera re-initializes from the new selection. And the instruction that computes the new value — inc al / cmp al, N / wrap — sits right after 0080601d. That wrap constant is the number of selectable cameras, i.e. the patch.

One paste to finish

In Ghidra: Ctrl+G → 00805f9c → the decompiler shows the containing function (something like FUN_00805exx/00805fxx). Paste:

  1. the function's decompile, and
  2. the raw listing from 0080601d to ~00806060 — the ~20 instructions after the XCHG

From that I'll give you: the wrap constant's address, original bytes, patched bytes (extended cycle count), and — if you upload the eboot — the file offset for a permanent patch. If the wrap turns out to be data-driven (a table count rather than an immediate), I'll point you to the table instead.

void FUN_00805f90(long param_1)

{ long *plVar1; int *piVar2; long lVar3; long *plVar4; ulong uVar5; void *pvVar6; undefined1 auVar7 [16]; undefined1 auVar8 [16]; undefined1 auVar9 [16]; undefined1 auVar10 [16];

if (*(int *)(param_1 + 0x130340) == 6) { FUN_0267f960(param_1); } *(undefined4 *)(param_1 + 0x130340) = 0; auVar7.0_12 = ZEXT812(0); auVar7.12_4 = 0; (undefined1 () [16])(param_1 + 0x130448) = auVar7; (undefined1 () [16])(param_1 + 0x130454) = auVar7; lVar3 = *(long )(param_1 + 0x3c0); FUN_00804720((undefined8 *)(lVar3 + 8)); *(long *)(lVar3 + 8) = lVar3; *(long *)lVar3 = lVar3; *(long *)(lVar3 + 0x10) = lVar3; *(undefined8 *)(param_1 + 0x3c8) = 0; auVar8.0_12 = ZEXT812(0); auVar8.12_4 = 0; (undefined1 () [16])(param_1 + 0x3a0) = auVar8; FUN_00806120(param_1 + 0x60); *(undefined1 *)(param_1 + 0x130260) = 0; *(undefined2 *)(param_1 + 0x130375) = 0; *(undefined1 *)(param_1 + 0x1303a8) = 0; LOCK(); *(undefined1 *)(param_1 + 0x130428) = 0; UNLOCK(); *(undefined8 *)(param_1 + 0x130398) = 0; *(undefined8 *)(param_1 + 0x130310) = 0; plVar4 = *(long )(param_1 + 0x130318); *(undefined8 *)(param_1 + 0x130318) = 0; if (plVar4 != (long *)0x0) { LOCK(); plVar1 = plVar4 + 1; *(int *)plVar1 = (int)*plVar1 + -1; UNLOCK(); if ((int)*plVar1 == 0) { ((code )*plVar4)(plVar4); LOCK(); piVar2 = (int *)((long)plVar4 + 0xc); *piVar2 = *piVar2 + -1; UNLOCK(); if (*piVar2 == 0) { ((code **)(*plVar4 + 8))(plVar4); } } } pvVar6 = *(void **)(param_1 + 0x3f0); lVar3 = *(long *)(param_1 + 0x400); auVar9.0_12 = ZEXT812(0); auVar9.12_4 = 0; (undefined1 () [16])(param_1 + 0x3f0) = auVar9; *(undefined8 *)(param_1 + 0x400) = 0; if (pvVar6 != (void *)0x0) { uVar5 = lVar3 - (long)pvVar6; if (0xfff < uVar5) { pvVar6 = *(void **)((long)pvVar6 + -8); uVar5 = uVar5 + 0x27; } operator.delete(pvVar6,uVar5); } pvVar6 = *(void **)(param_1 + 0x408); lVar3 = *(long *)(param_1 + 0x418); auVar10.0_12 = ZEXT812(0); auVar10.12_4 = 0; (undefined1 () [16])(param_1 + 0x408) = auVar10; *(undefined8 *)(param_1 + 0x418) = 0; if (pvVar6 == (void *)0x0) { return; } uVar5 = lVar3 - (long)pvVar6; if (0xfff < uVar5) { pvVar6 = *(void **)((long)pvVar6 + -8); uVar5 = uVar5 + 0x27; } operator.delete(pvVar6,uVar5); return; }

**

Dr.Binary

This one's the camera system reset — not the cycle either. Decode:

FUN_00805f90(car) = "reset camera system to defaults"

if (car->0x130340 == 6) FUN_0267f960(car);    // leaving bumper: special cleanup
car->0x130340 = 0;                            // camera state = 0
clear 0x130448/0x130454 arrays;               // clear sample/blend buffers
empty the list at car->0x3c0 (self-linked);   car->0x3c8 = 0; car->0x3a0 = {0};
FUN_00806120(car+0x60);
car->0x130260 = 0;  car->0x130375 = 0;  car->0x1303a8 = 0;
[atomic] car->0x130428 = 0;                   // selection byte → 0
car->0x130398 = 0;  car->0x130310 = 0;
release ref at 0x130318;  free vectors at 0x3f0/0x408;

And this explains the mystery of the XCHG pattern: XCHG byte ptr [mem], AL is the compiler's atomic-store idiom (LOCK-prefixed store in the decompile). So every "XCHG" hit on +0x130428 — here and in the 0x268 director — is just an atomic write, mostly of 0. The selection byte is never incremented anywhere in the binary.

What this tells us

The View button doesn't cycle by incrementing +0x130428. The selection is set (from car data / settings / commands), and the cycle itself goes through the command/state layer — the same dict-command machinery we saw everywhere else. That's why 51+14 searches found only readers, resets, and transitions.

Two ways to close this

1. The last static candidate: 0267f986 MOV dword ptr [RDI+0x130340], EAX (computed write) with 0267f9b6 (atomic selection store) right beside it — the FUN_0267f9xx module, same neighborhood as FUN_0267f960 (the bumper cleanup). This is the only remaining function that computes a camera state. Paste the decompile of the function containing 0267f986.

2. The runtime test — honestly the fastest path now. You already have your car's camera-state address (scan result #2/#3). In a race, just write values to it and watch:

  • 4, 5, 6 (known states), then 8, 0xC, 0x10, 0x14, 0x18 (the ×4 states — these correspond to selection bytes 2, 3, 4, 5, 6)
  • and the combo from FUN_026807fd: write selection byte (state_addr + 0xE8) = N, then state = 5, then any state change applies N×4

If some of those states render different cameras (trackside, heli, rear, etc. — the hidden ones from the 25-name enum), then "cycling" = a loop that writes 4, 8, 12, 16, … to that one address per button press — a 5-line payload, no more reversing needed.

Paste the 0267f986 function, or run the runtime writes and tell me which state values produce which cameras — either ends this.

oid FUN_0267f960(long param_1,undefined8 param_2,undefined8 param_3)

{ undefined1 uVar1; long lVar2;

*(undefined8 *)(param_1 + 0x130348) = 0; *(undefined8 *)(param_1 + 0x130350) = 0x3f80000000000000; *(undefined4 *)(param_1 + 0x130358) = 0; *(undefined4 *)(param_1 + 0x130340) = 0; *(undefined8 *)(param_1 + 0x1302e0) = 0; *(undefined1 *)(param_1 + 0x13035f) = 0; *(undefined4 *)(param_1 + 0x130364) = 0xffffffff; *(undefined2 *)(param_1 + 0x130377) = 0; *(undefined1 *)(param_1 + 0x130379) = 0; LOCK(); uVar1 = *(undefined1 *)(param_1 + 0x130428); *(undefined1 *)(param_1 + 0x130428) = 0; UNLOCK(); *(undefined1 )(param_1 + 0x13037a) = 0; if ((char *)(param_1 + 0x130260) == '\x02') { *(undefined1 *)(param_1 + 0x130260) = 0; *(undefined1 *)(param_1 + 0x130374) = 0; *(undefined4 *)(param_1 + 0x130370) = 0xffffffff; } lVar2 = *(long )(param_1 + 0x3c0); FUN_00804720((undefined8 *)(lVar2 + 8),param_2,param_3,uVar1); *(long *)(lVar2 + 8) = lVar2; *(long *)lVar2 = lVar2; *(long *)(lVar2 + 0x10) = lVar2; *(undefined8 *)(param_1 + 0x3c8) = 0; *(undefined4 )(param_1 + 0x130248) = 0xffffffff; FUN_00b1bad0((undefined8 *)(param_1 + 0x70)); return; }

Dr.Binary

FUN_0267f960 is the master camera reset — and it completes the field map. Decode:

car->0x130348 = 0;  car->0x130350 = 1.0f-pair;  car->0x130358 = 0;
car->0x130340 = 0;                    // camera state
car->0x1302e0 = 0;                    // tracking target
car->0x13035f = 0;  car->0x130364 = -1;  car->0x130377/79 = 0;
[atomic] old_sel = car->0x130428;  car->0x130428 = 0;      // selection reset
if (car->0x130260 == 2) { 0x130260 = 0; 0x130374 = 0; 0x130370 = -1; }   // exit special mode
empty list car->0x3c0;  car->0x3c8 = 0;  car->0x130248 = -1;
FUN_00b1bad0(car->0x70);              // notify manager

Every field now has an owner: state, selection (atomic), tracking target, special-mode flag, timers, lists. And the verdict is final:

The static hunt is officially exhausted

There is no increment of any camera field anywhere in the binary — we've now accounted for every writer: resets (00805f90, 0267f960), sequencer (0x16xxxx → states 3/4/6), director (0x268xxxx → 5/4/0/computed), transitions (b1b7xx → 2/3/4). The View button works through the command layer, where the next camera comes from each car's own data (which cameras that car defines) — not from a counter we can widen. Patching that command path would gain nothing over simply writing the state directly.

So here's the finish line — runtime writes, tonight

You have your car's camera-state address (scan result). In a race, write these values one at a time and note what each renders:

0x4   0x8   0xC   0x10   0x14   0x18        (= selections 1–6, the ×4 states)
0x5   0x6                              (the cinematic specials: 6 = bumper)

and the combo path: write the byte at state_addr + 0xE8 = N, then set state = 5, then change state again → applies N×4.

If even two or three of those values render different cameras (rear, hood, trackside — whatever that car defines, possibly including the hidden enum entries), then "cycle cameras" = write the next value in that list per button press. That's a ~5-line runtime payload, and it's yours regardless of anything else in the retail code.

If the writes reveal multiple working cameras

One last Ghidra lookup makes it a real hotkey mod instead of a manual poke: References → Show References to FUN_0042bb00 → paste the caller (and its caller if needed). That chain reveals the global holding the scene singleton, which is exactly what a payload needs to resolve "my car" at runtime without scanning. Paste that XREF along with your write-test results, and I'll write you the payload skeleton (base 0x400000 known, car resolution, state-cycle logic) ready to build.

/* WARNING: Removing unreachable block (ram,0x0042d205) / / WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_0042bb00(long param_1)

{ undefined2 uVar1; byte bVar2; byte bVar3; byte bVar4; long *plVar5; ulong *puVar6; undefined1 auVar7 [16]; ushort uVar8; undefined1 auVar9 [32]; undefined1 auVar10 [32]; char cVar11; char cVar12; undefined1 uVar13; int iVar14; int iVar15; undefined4 uVar16; uint uVar17; uint uVar18; undefined8 uVar19; undefined8 uVar20; long lVar21; long lVar22; long *plVar23; long *plVar24; ulong uVar25; undefined8 *puVar26; uint *puVar27; long *plVar28; long lVar29; long lVar30; undefined1 *puVar31; undefined *puVar32; long lVar33; undefined4 *puVar34; undefined4 *puVar35; undefined8 *puVar36; ulong uVar37; uint *puVar38; long *in_FS_OFFSET; bool bVar39; bool bVar40; float fVar41; float fVar42; double dVar43; undefined1 auVar44 [16]; undefined1 auVar45 [16]; undefined1 auVar46 [16]; undefined1 auVar47 [16]; undefined1 auVar48 [16]; undefined1 in_ZMM3 [64]; undefined1 local_1c0 [24]; undefined1 local_1a8 [24]; undefined1 local_190 [24]; undefined1 local_178 [24]; undefined1 local_160 [16]; long *plStack_150; long *plStack_148; long local_140; long *plStack_138; long lStack_130; long *plStack_128; undefined4 *local_120; undefined8 uStack_118; undefined3 uStack_110; undefined5 uStack_10d; double dStack_108; undefined8 uStack_100; undefined1 uStack_f8; undefined1 uStack_f7; undefined1 uStack_f6; undefined1 uStack_f5; undefined4 uStack_f4; undefined1 uStack_f0; undefined1 uStack_ef; undefined1 uStack_ee; undefined1 uStack_ed; double local_e8; undefined8 local_e0; undefined8 local_d8; undefined4 local_d0; undefined4 *local_c8; undefined4 uStack_c0; undefined4 uStack_bc; long lStack_b8; undefined8 uStack_b0; undefined8 uStack_a8; undefined4 local_a0; undefined *local_80; undefined8 *local_78; undefined1 local_70; ulong local_68; long local_60;

local_60 = ___stack_chk_guard; lVar30 = *(long *)(param_1 + 0x344f8); plVar5 = (long )(param_1 + 0x34480 + lVar30 * 0x28); if ((plVar5 == (long *)0x0) || (cVar11 = ((code )(*plVar5 + 0x158))(plVar5), cVar11 == '\0')) goto LAB_0042bb57; lVar21 = *(long )(param_1 + 0x3648); if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long *)(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = ((code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bba7; LAB_0042bbcc: uVar20 = 0x3f91156f80000000; } else { LAB_0042bba7: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bbcc; lVar21 = *(long )(param_1 + 0x3648); } if (((char )((long )(lVar21 + 0x10) + 0x75) != '\x01') || (cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)), cVar11 == '\0')) goto LAB_0042bbcc; uVar20 = 0; } lVar21 = *(long )(param_1 + 0x3648); lVar30 = param_1 + 0x34480 + lVar30 * 0x28; if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long )(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = (**(code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bc20; LAB_0042bc45: fVar41 = *(float *)(lVar30 + 0x20); } else { LAB_0042bc20: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bc45; lVar21 = *(long )(param_1 + 0x3648); } if ((char )((long )(lVar21 + 0x10) + 0x75) == '\0') goto LAB_0042bc45; cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)); if (cVar11 == '\0') { fVar41 = *(float *)(lVar30 + 0x20); } else { fVar41 = 0.0; } } lVar21 = *(long )(param_1 + 0x9f118); if (lVar21 != 0) { uVar19 = (**(code )(*plVar5 + 0x98))(plVar5); *(undefined8 )((long *)(lVar21 + 8) + 0x38) = uVar19; } uStack_f0 = 0; uStack_ef = 0; local_120 = (undefined4 *)0x0; uStack_118 = 0; lStack_130 = param_1 + 0x9a7f8; local_d8 = 0xbff0000000000000; local_d0 = 0; uStack_c0 = 0; uStack_bc = 0; lStack_b8 = SUB128(ZEXT812(0),4); uStack_b0 = 0; uStack_a8 = 0; local_a0 = 0; uStack_ee = *(undefined1 *)(lVar30 + 0x1c); dVar43 = (double)fVar41; uStack_110 = (undefined3)(param_1 + 0x2f800); uStack_10d = (undefined5)((ulong)(param_1 + 0x2f800) >> 0x18); lVar21 = param_1 + 800; auVar9.8_8 = (undefined8 )(param_1 + 0x346c8); auVar9.0_8 = **(undefined8 )(param_1 + 0x3648); lVar29 = param_1 + 0x34618; local_140 = *(undefined8 *)(param_1 + 0x2f9a8); dStack_108 = (double)(param_1 + 0x9b980); auVar9.16_8 = plVar5; auVar9.24_8 = 0; _local_160 = auVar9 << 0x40; uStack_100 = *(undefined8 *)(param_1 + 0x3650); uVar19 = *(undefined8 *)(param_1 + 0x3660); uStack_f8 = (undefined1)uVar19; uStack_f7 = (undefined1)((ulong)uVar19 >> 8); uStack_f6 = (undefined1)((ulong)uVar19 >> 0x10); uStack_f5 = (undefined1)((ulong)uVar19 >> 0x18); uStack_f4 = (undefined4)((ulong)uVar19 >> 0x20); plStack_138 = (long *)lVar21; plStack_128 = (long *)lVar29; local_e8 = dVar43; local_e0 = uVar20; local_c8 = local_120; thunk_FUN_0042d460(); local_80 = &DAT_066ee0a8; local_78 = &DAT_066f0d98; local_70 = 0; thunk_FUN_0042d460(); eh_e8650("DEBUGMENU.cameraDebug",&local_80,&DAT_066ee0a8); lVar33 = *(long *)local_160.8_8; *(undefined8 )((long )(param_1 + 0x36a8) + 0x2320) = local_160.8_8; if ((((char *)(lVar33 + 8) != '\0') && (plStack_148 != (long *)0x0)) && (cVar11 = ((code )(*plStack_148 + 0x10))(), cVar11 != '\0')) { lVar33 = *(long *)(param_1 + 0x36a8); iVar14 = ((code )(*plStack_148 + 0xc0))(); iVar15 = ((code )(plStack_148 + 0xd0))(); if (((iVar14 != -1) && (iVar15 != -1)) && ((int *)(lVar33 + 0x22f8) != iVar14 || *(int *)(lVar33 + 0x22fc) != iVar15)) { uVar19 = ((code )(plStack_148 + 200))(); FUN_00a1d2c0((undefined8 *)(lVar33 + 0x22c0),uVar19,iVar15); *(int *)(lVar33 + 0x22f8) = iVar14; *(int *)(lVar33 + 0x22fc) = iVar15; } cVar11 = ((code )(*plStack_148 + 0x1b8))(); cVar12 = ((code )(*plStack_148 + 0xe8))(); lVar33 = *(long *)(param_1 + 0x36a8); if ((cVar11 == '\0') || (uStack_ef = true, *(char *)(lVar33 + 0x2300) == '\x01')) { uStack_ef = *(char *)(lVar33 + 0x2301) != cVar12; } *(char *)(lVar33 + 0x2300) = cVar11; *(char *)(lVar33 + 0x2301) = cVar12; *(undefined4 *)(lVar33 + 0x22d0) = 0; uStack_118 = *(undefined8 *)(lVar33 + 0x22d8); local_160.0_8 = lVar33 + 0x2310; local_a0 = *(undefined4 *)(lVar33 + 0x2304); lVar22 = *(long *)(lVar33 + 0x22a0); local_d0 = (undefined4)lVar22; plVar23 = (long )(lVar33 + 0x22c0); if ((long *)*plVar23 != plVar23) { plVar28 = (long *)*plVar23; do { ((code **)((long *)plVar28[5] + 0x40))((long *)plVar28[5],local_160); plVar24 = (long )plVar28[2]; if ((char *)((long)plVar24 + 0x19) == '\0') { plVar28 = (long *)plVar24; if ((char *)((long)plVar28 + 0x19) == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; while (cVar11 == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; } } } else { do { plVar24 = (long )plVar28[1]; if ((char *)((long)plVar24 + 0x19) != '\0') break; bVar39 = plVar28 == (long *)plVar24[2]; plVar28 = plVar24; } while (bVar39); } plVar28 = plVar24; } while (plVar24 != plVar23); lVar33 = *(long *)(param_1 + 0x36a8); lVar22 = *(long )(lVar33 + 0x22a0); } if (lVar22 != 0) { FUN_004255e0(lVar33 + 0x20,local_160,lVar33 + 0x22c0); if (lVar22 * 0x8a0 != 0x8a0) { lVar33 = lVar33 + 0x8c0; lVar22 = lVar22 * 0x8a0 + -0x8a0; do { FUN_004255e0(lVar33,local_160,(long *)(param_1 + 0x36a8) + 0x22c0); lVar33 = lVar33 + 0x8a0; lVar22 = lVar22 + -0x8a0; } while (lVar22 != 0); } lVar33 = *(long *)(param_1 + 0x36a8); } ((code )((long **)(lVar33 + 0x22d8) + 0x20))((long **)(lVar33 + 0x22d8),local_160); } lVar33 = param_1 + 14000; if ((long *)(param_1 + 0x36c0) != 0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { lVar22 = eh_1f3f80(puVar34,"event"); uVar19 = *(undefined8 *)(lVar22 + 8); cVar11 = FUN_00b831c0(uVar19,"ready"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"interior"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"switch"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.start"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.end"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.error"); if (cVar11 == '\0') { ((code )((long **)(param_1 + 0x36c0) + 0x28)) ((long **)(param_1 + 0x36c0),puVar34); goto LAB_0042c563; } uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025dabf0(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1c0,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1c0; } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025da020(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1a8,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1a8; } } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025d9470(lVar33,uVar16,&local_80); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_190,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_190; } } else { cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),&DAT_049bf7ab); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,&DAT_049bf7ab); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x18))(plVar23,uVar16); } cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),"target"); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"target"); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x20))(plVar23,uVar16); } FUN_00b86810(local_178,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_178; } eh_1f5800(puVar31); } else { uVar19 = eh_1f3f80(puVar34,"valid"); uVar13 = FUN_003f4230(uVar19,0); *(undefined1 *)(param_1 + 0x375c) = uVar13; } } else { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"value"); uVar13 = FUN_003f4230(uVar19,0); ((code **)(*plVar23 + 0x10))(plVar23,uVar13); } LAB_0042c563: } } if (local_c8 != (undefined4 *)0x0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { eh_1f5800(puVar34); } uVar37 = lStack_b8 - (long)local_c8; puVar35 = local_c8; if (0xfff < uVar37) { puVar35 = (undefined4 )(local_c8 + -2); uVar37 = uVar37 + 0x27; } operator.delete(puVar35,uVar37); } uStack_f8 = 0; uStack_f7 = 0; uStack_f6 = 0; local_160.12_4 = 0; local_160.0_12 = ZEXT812(0); uStack_118 = 0; plStack_128 = (long *)0x0; uStack_f4 = 0; uStack_f0 = 0; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; lStack_130 = *(undefined8 *)(param_1 + 0x3650); plStack_150 = (long *)(undefined8 )(param_1 + 0x3648); plStack_148 = (long )(undefined8 *)(param_1 + 0x346c8); uStack_110 = (undefined3)lVar29; uStack_10d = (undefined5)((ulong)lVar29 >> 0x18); lVar22 = *(long *)(param_1 + 0x36a8); local_140 = lVar21; plStack_138 = plVar5; local_120 = (undefined4 *)lVar33; dStack_108 = dVar43; uStack_100 = uVar20; if (0 < *(int *)(lVar22 + 0x22a0)) { uVar20 = ((code **)((long *)(lVar22 + 0x20) + 0x18))(lVar22 + 0x20,0); local_160.8_8 = uVar20; } if ((DAT_067d1460 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_067d1460), iVar14 != 0)) { FUN_0097bf90(); __cxa_atexit(FUN_02f3c550,&DAT_067d1338,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_067d1460); } fVar42 = (float)FUN_0042e5e0(&DAT_067d1338,1,&local_80); puVar38 = (uint *)0x0; uStack_f8 = *(float *)(param_1 + 0x2f7e8) < fVar42; uStack_f7 = *(undefined1 *)(param_1 + 0x2f7e1); if (fVar42 <= *(float *)(param_1 + 0x2f7e8)) { uStack_f7 = 0; } *(float *)(param_1 + 0x2f7e8) = fVar42; *(undefined1 *)(param_1 + 0x2f7e1) = local_80.0_1; lVar21 = FUN_0042e050(&DAT_067d1338,0); if (lVar21 != 0) { if (DAT_067d1348 == 0) { fVar42 = 0.0; } else { local_80 = (undefined *)((ulong)local_80 & 0xffffffff00000000); FUN_0042e990(DAT_067d1348,0,&local_80); fVar42 = local_80.0_4 * 1000.0; } puVar27 = *(uint **)(lVar21 + 0x20); if ((puVar27 == *(uint **)(lVar21 + 0x28)) || (fVar42 < (float)*puVar27)) { puVar38 = (uint *)0x0; } else { do { puVar38 = puVar27; puVar27 = puVar38 + 4; if (puVar27 == *(uint **)(lVar21 + 0x28)) break; } while ((float)*puVar27 <= fVar42); uStack_f6 = *(uint )(param_1 + 0x2f7f0) != puVar38; uVar1 = *(undefined2 *)((long)puVar38 + 10); auVar44.2_2 = uVar1; auVar44.0_2 = uVar1; auVar44.4_2 = uVar1; auVar44.6_2 = uVar1; auVar44.8_2 = uVar1; auVar44.10_2 = uVar1; auVar44.12_2 = uVar1; auVar44.14_2 = uVar1; auVar44 = vpand_avx(auVar44,_DAT_046faf40); uStack_f4 = auVar44.0_4; uStack_f0 = (undefined1)puVar38[1]; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; } } plStack_128 = (long *)(param_1 + 0x37a0); (uint **)(param_1 + 0x2f7f0) = puVar38; local_160.0_8 = param_1 + 0x3780; if ((char )(param_1 + 0x2f7e0) == '\x01') { FUN_02383210((undefined8 *)(param_1 + 0x3790),local_160); } if ((DAT_06ba7900 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_06ba7900), iVar14 != 0)) { FUN_00b7f380(&DAT_06ba73a0); __cxa_atexit(FUN_02854f30,&DAT_06ba73a0,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_06ba7900); } auVar9 = _local_160; local_160.0_8 = lVar33; auVar10 = _local_160; plStack_148 = auVar9.24_8; local_160 = auVar10.0_16; plStack_150 = plVar5; local_160.8_8 = lVar29; switch(DAT_06ba7488) { case 1: goto LAB_0042c932; case 2: FUN_028560f0(lVar29,plVar5); break; case 3: FUN_02856180(lVar33,lVar29); break; case 4: FUN_02856410(lVar29); break; case 5: FUN_028564e0(local_160); break; case 6: FUN_02856ac0(local_160); break; case 7: uVar20 = 1; goto LAB_0042c927; case 8: uVar20 = 0; LAB_0042c927: FUN_02856d80(local_160,uVar20); goto LAB_0042c932; case 9: FUN_02856e40(local_160); LAB_0042c932: FUN_02855110(local_160); } lVar21 = ((code )(plVar5 + 0xa8))(); if (lVar21 < 1) { if ((char *)(param_1 + 0x9a8d2) == '\0') { fVar42 = *(float *)(param_1 + 0x9a910); } else { fVar42 = 0.0; } if (1.0 <= fVar42) { fVar42 = 1.0; } lVar21 = (long)(fVar42 * (float)lVar21); } else { plVar23 = (long *)((code )(*plVar5 + 0xb0))(); iVar14 = ((code )(plVar23 + 0x30))(plVar23); lVar21 = (long)iVar14 - (long)(int )((long )((long )(param_1 + 0x346e8) + 8) + 0xd0); } eh_fb2a0((undefined4 *)(param_1 + 0x9f074),param_1 + 0x9a980,lVar21); bVar39 = false; lVar21 = *(long )((long )((long )(param_1 + 0x34620) + 0xc0) + (long)(int )((long )(param_1 + 0x34620) + 0xe0) * 0x10); if (((char )(lVar21 + 0x130374) == '\x01') && ((long *)(lVar21 + 0x1302e0) != 0)) { bVar39 = *(int *)(lVar21 + 0x130340) == 6; } uVar20 = *(undefined8 *)(lVar30 + 8); iVar14 = ((code **)(*plVar5 + 0x28))(); auVar9 = _local_160; local_160.2_6 = 0; local_160.0_2 = (ushort)iVar14; stack0xfffffffffffffea8 = auVar9.8_24; if (0 < iVar14) { iVar15 = 0; lVar30 = *in_FS_OFFSET; LAB_0042cc88: plVar23 = *(long )(lVar30 + -0x98); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { puVar36 = (undefined8 *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((puVar36 + 9 <= (undefined8 *)plVar28[2]) && (plVar28[1] = (long)(puVar36 + 9), puVar36 != (undefined8 *)0x0)) goto LAB_0042ccd3; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar36 = (undefined8 *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[1] = puVar26 + 3; puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < puVar36 + 9) || (puVar26[1] = puVar36 + 9, puVar36 == (undefined8 *)0x0)) { puVar36 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x48,8); } goto LAB_0042ccd3; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); } LAB_0042cfdd: eh_42ba0(local_160); FUN_0042d710(param_1 + 0x9a660,param_1 + 0x34810); cVar11 = ((code )(*plVar5 + 0x10))(); if (cVar11 == '\0' || *(long *)(param_1 + 0x3660) == 0) goto LAB_0042bb57; uVar18 = ((code **)(*plVar5 + 0x30))(); auVar44 = in_ZMM3.0_16; uVar17 = 0xffffffff; if (0 < (int)uVar18) { lVar30 = 8; uVar37 = 0; do { lVar21 = *(long )(param_1 + 0x3660); uVar17 = (uint)uVar37; if ((((0x2f < uVar37) || (((uint )(lVar21 + 0x668 + (uVar37 >> 5) * 4) >> (uVar17 & 0x1f) & 1) == 0)) && (lVar29 = (long)(char *)(lVar21 + 0x608 + uVar37), -1 < lVar29)) && ((plVar5 = *(long )(lVar30 + lVar21 + lVar29 * 8), plVar5 != (long *)0x0 && (cVar11 = ((code )(*plVar5 + 0x250))(plVar5), cVar11 != '\0')))) { cVar11 = ((code **)(plVar5 + 0x1f8))(plVar5); auVar44 = in_ZMM3.0_16; if (cVar11 == '\0') break; } auVar44 = in_ZMM3.0_16; uVar37 = uVar37 + 1; lVar30 = lVar30 + 0x20; uVar17 = 0xffffffff; } while (uVar18 != uVar37); } if ((((long *)(param_1 + 0x3660) == 0) || (lVar30 = *(long )((long *)(param_1 + 0x3660) + 0x678), (int)uVar17 < 0 || lVar30 == 0)) || (plVar5 = *(long **)(lVar30 + 8), (int)plVar5[1] <= (int)uVar17)) { LAB_0042d0e2: _DAT_067100f0 = 0.0; _DAT_067100f4 = 0; _DAT_067100f8 = 0; _DAT_067100fc = 0; DAT_06710100 = 0; DAT_06710104.0_1 = 0; DAT_06710104.3_1 = 1; DAT_06710104.1_1 = '\0'; } else { lVar30 = plVar5; if ((long *)(lVar30 + 0x4b70 + (ulong)uVar17 * 0x4f50) == 0) goto LAB_0042d0e2; auVar46[8] = 0x15; auVar46.0_8 = 0x1515151515151515; auVar46[9] = 0x15; auVar46[10] = 0x15; auVar46[0xb] = 0x15; auVar46[0xc] = 0x15; auVar46[0xd] = 0x15; auVar46[0xe] = 0x15; auVar46[0xf] = 0x15; auVar7 = vpcmpeqd_avx(auVar44,auVar44); lVar30 = *(long *)(lVar30 + (ulong)uVar17 * 0x4f50 + 0x4b88); _DAT_067100f0 = *(float *)(lVar30 + 0x360) + *(float *)(lVar30 + 0x564); _DAT_067100f4 = *(undefined4 *)(lVar30 + 0x100c); _DAT_067100f8 = *(undefined4 *)(lVar30 + 0x1000); _DAT_067100fc = *(undefined4 *)(lVar30 + 0xffc); DAT_06710100 = *(undefined4 *)(lVar30 + 0x10b0); DAT_06710104.0_1 = *(undefined1 *)(lVar30 + 0x10d0); DAT_06710104.3_1 = *(byte *)(lVar30 + 9) >> 2 & 1; bVar2 = *(byte *)(lVar30 + 0x2fb); bVar3 = *(byte *)(lVar30 + 0x4ff); auVar44 = vpinsrb_avx(ZEXT116(bVar2),(uint)bVar3,1); auVar45 = vpinsrb_avx(ZEXT116(bVar2),(uint)(bVar2 & 0xfe),1); bVar2 = *(byte *)(lVar30 + 0x703); bVar4 = *(byte *)(lVar30 + 0x907); auVar45 = vpinsrb_avx(auVar45,(uint)bVar3,2); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar3 & 0xfe),3); auVar44 = vpinsrb_avx(auVar44,(uint)bVar2,2); auVar45 = vpinsrb_avx(auVar45,(uint)bVar2,4); auVar48 = vpinsrb_avx(auVar44,(uint)bVar4,3); auVar44 = vpmaxub_avx(auVar48,auVar46); auVar44 = vpcmpeqb_avx(auVar48,auVar44); auVar48 = vpmovzxbd_avx(auVar48); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar2 & 0xfe),5); auVar47.8_4 = 0x100402; auVar47.0_8 = 0x10040200100402; auVar47.12_4 = 0x100402; auVar45 = vpinsrb_avx(auVar45,(uint)bVar4,6); auVar44 = vpmovsxbd_avx(auVar44 ^ auVar7); auVar7 = vpinsrb_avx(auVar45,(uint)(bVar4 & 0xfe),7); auVar45 = vpsrlvd_avx2(auVar47,auVar48); auVar48.8_8 = 0x204020402040204; auVar48.0_8 = 0x204020402040204; auVar44 = vpand_avx(auVar44,auVar45); auVar45 = vpslld_avx(auVar44,0x1f); auVar44 = vpcmpeqb_avx(auVar7,auVar48); DAT_06710104.1_1 = '\x01'; if ((((SUB161(auVar45 >> 0x1f,0) & 1) == 0 && (SUB161(auVar45 >> 0x3f,0) & 1) == 0) && (SUB161(auVar45 >> 0x5f,0) & 1) == 0) && -1 < auVar45[0xf]) { DAT_06710104.1_1 = ((((((((SUB161(auVar44 >> 7,0) & 1) != 0 || (SUB161(auVar44 >> 0xf,0) & 1) != 0) || (SUB161(auVar44 >> 0x17,0) & 1) != 0) || (SUB161(auVar44 >> 0x1f,0) & 1) != 0) || (SUB161(auVar44 >> 0x27,0) & 1) != 0) || (SUB161(auVar44 >> 0x2f,0) & 1) != 0) || (SUB161(auVar44 >> 0x37,0) & 1) != 0) || (SUB161(auVar44 >> 0x3f,0) & 1) != 0) * '\x02'; } } DAT_06710104.2_1 = DAT_066ea385; local_160.8_8 = &LAB_0298bb50; local_160.0_8 = &PTR_FUN_0546e2b0; plStack_128 = (long *)local_160; lVar30 = *(long *)(param_1 + 0xb98); plVar5 = (long *)(lVar30 + 0x5a0); if (plVar5 == (long *)local_160) { FUN_0042d400(local_160,0); goto LAB_0042bb57; } plVar23 = *(long )(lVar30 + 0x5d8); if (plVar23 != (long *)0x0) { ((code **)(*plVar23 + 0x20))(plVar23,plVar23 != plVar5); *(undefined8 *)(lVar30 + 0x5d8) = 0; if (plStack_128 == (long *)0x0) goto LAB_0042bb57; if (plStack_128 != (long *)local_160) { *(long )(lVar30 + 0x5d8) = plStack_128; goto LAB_0042bb57; } } uVar20 = ((code )(*plStack_128 + 8))(plStack_128,plVar5); *(undefined8 *)(lVar30 + 0x5d8) = uVar20; if (plStack_128 != (long *)0x0) { ((code **)(*plStack_128 + 0x20))(plStack_128,plStack_128 != (long )local_160); } LAB_0042bb57: if (___stack_chk_guard != local_60) { / WARNING: Subroutine does not return */ __stack_chk_fail(); } return; LAB_0042ccd3: *puVar36 = &DAT_0546e0b8; puVar36[1] = param_1; *(int *)(puVar36 + 2) = iVar15; *(float *)((long)puVar36 + 0x14) = fVar41; puVar36[3] = param_1 + 0x34740; puVar36[4] = plVar5; puVar36[5] = param_1 + 0x36a0; puVar36[6] = uVar20; *(bool *)(puVar36 + 7) = bVar39; LOCK(); *(int *)(*plVar23 + 0x10) = *(int *)(*plVar23 + 0x10) + 1; UNLOCK(); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { plVar24 = (long *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((plVar24 + 3 <= (long *)plVar28[2]) && (plVar28[1] = (long)(plVar24 + 3), plVar24 != (long *)0x0)) break; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar26[1] = puVar26 + 3; plVar24 = (long *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < plVar24 + 3) || (puVar26[1] = plVar24 + 3, plVar24 == (long *)0x0)) { plVar24 = (long )eh_dc670((undefined8 *)(*plVar23 + 8),0x18,8); } goto LAB_0042cd5b; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); LAB_0042cd5b: lVar21 = plVar23[1]; *plVar24 = *plVar23; plVar24[1] = lVar21; plVar24[2] = 0; puVar36[8] = plVar24; puVar6 = (ulong *)plVar23[1]; lVar21 = DAT_06c12440; if (puVar6 != (ulong *)0x0) { uVar37 = *puVar6; do { LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | uVar37 & 0xffffffffffff0000; uVar25 = uVar37; } UNLOCK(); lVar21 = DAT_06c12440; uVar37 = uVar25; } while (!bVar40); } do { LOCK(); bVar40 = lVar21 != DAT_06c12440; lVar29 = lVar21 + 1; if (bVar40) { lVar21 = DAT_06c12440; lVar29 = DAT_06c12440; } DAT_06c12440 = lVar29; UNLOCK(); } while (bVar40); uVar37 = (ulong)((uint)lVar21 & 0x3ff); uVar8 = (ushort)((uint)lVar21 >> 9); while ((ushort *)(&DAT_06c12480 + uVar37 * 2) != (uVar8 & 0xfffe)) { nidf_libc_0xf75f5a605191bff9(); } *(undefined1 **)(&DAT_06c13c80 + uVar37 * 0x18) = &LAB_019038f0; *(undefined8 **)(&DAT_06c13c88 + uVar37 * 0x18) = puVar36; *(undefined1 **)(&DAT_06c13c90 + uVar37 * 0x18) = local_160; *(ushort *)(&DAT_06c12480 + uVar37 * 2) = uVar8 | 1; uVar17 = DAT_06c25cc0; do { if ((short)uVar17 < 1) goto LAB_0042cc7a; LOCK(); bVar40 = uVar17 != DAT_06c25cc0; uVar18 = uVar17 - 1 & 0xffff | uVar17 & 0xffff0000; if (bVar40) { uVar17 = DAT_06c25cc0; uVar18 = DAT_06c25cc0; } DAT_06c25cc0 = uVar18; UNLOCK(); } while (bVar40); LOCK(); _DAT_06c25d00 = _DAT_06c25d00 + 1; UNLOCK(); if (DAT_06c25d08 != 0) { if (DAT_06c25d08 < 2) { nidf_libc_0x4e94ff1a958ba44a(); } else { nidf_libc_0x052e6e6b37016bf9(&DAT_06c25d00,1); } } LAB_0042cc7a: iVar15 = iVar15 + 1; if (iVar15 == iVar14) goto LAB_0042cfdd; goto LAB_0042cc88; }

Dr.Binary

That's the same decompile as before — nothing new in it, and the caller isn't visible from inside the function. I need just one line from Ghidra, not the whole function:

Get the caller (10 seconds)

In the listing (not the decompiler), scroll up to the function header of FUN_0042bb00 — right above PUSH RBP there's a comment block that looks like:

FUN_0042bb00                                    XREF[2]:    FUN_00xxxxx:00xxxxxx(c), ...

Paste just that XREF line. (Or: right-click the function name → References → Show References to.)

That caller chain is how we find the global pointer that holds the scene at runtime — the missing piece for turning your camera-state writes into a proper hotkey payload.

And the runtime test is still the highest-value item

While you're at it — the experiment that decides everything else, no Ghidra needed:

With the cheat tool, in a race, write these values one at a time to your found camera-state address and note what each shows:

4   8   0xC (12)   0x10 (16)   0x14 (20)   0x18 (24)

and the combo: write the byte at state_addr + 0xE8 = 1…6, then set the state to 5, then to anything else — applies selection × 4.

If any of those render a different camera, the cycle mod is just "write the next value on keypress" and I'll write the payload around the scene global from the XREF. If none of them change anything, the state field is being overwritten by the director every frame and we pivot to the payload calling the camera manager's +0x20 directly (same XREF needed for that anyway).

So: the XREF line + the write-test results — those two things close this out.

/* WARNING: Removing unreachable block (ram,0x0042d205) / / WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_0042bb00(long param_1)

{ undefined2 uVar1; byte bVar2; byte bVar3; byte bVar4; long *plVar5; ulong *puVar6; undefined1 auVar7 [16]; ushort uVar8; undefined1 auVar9 [32]; undefined1 auVar10 [32]; char cVar11; char cVar12; undefined1 uVar13; int iVar14; int iVar15; undefined4 uVar16; uint uVar17; uint uVar18; undefined8 uVar19; undefined8 uVar20; long lVar21; long lVar22; long *plVar23; long *plVar24; ulong uVar25; undefined8 *puVar26; uint *puVar27; long *plVar28; long lVar29; long lVar30; undefined1 *puVar31; undefined *puVar32; long lVar33; undefined4 *puVar34; undefined4 *puVar35; undefined8 *puVar36; ulong uVar37; uint *puVar38; long *in_FS_OFFSET; bool bVar39; bool bVar40; float fVar41; float fVar42; double dVar43; undefined1 auVar44 [16]; undefined1 auVar45 [16]; undefined1 auVar46 [16]; undefined1 auVar47 [16]; undefined1 auVar48 [16]; undefined1 in_ZMM3 [64]; undefined1 local_1c0 [24]; undefined1 local_1a8 [24]; undefined1 local_190 [24]; undefined1 local_178 [24]; undefined1 local_160 [16]; long *plStack_150; long *plStack_148; long local_140; long *plStack_138; long lStack_130; long *plStack_128; undefined4 *local_120; undefined8 uStack_118; undefined3 uStack_110; undefined5 uStack_10d; double dStack_108; undefined8 uStack_100; undefined1 uStack_f8; undefined1 uStack_f7; undefined1 uStack_f6; undefined1 uStack_f5; undefined4 uStack_f4; undefined1 uStack_f0; undefined1 uStack_ef; undefined1 uStack_ee; undefined1 uStack_ed; double local_e8; undefined8 local_e0; undefined8 local_d8; undefined4 local_d0; undefined4 *local_c8; undefined4 uStack_c0; undefined4 uStack_bc; long lStack_b8; undefined8 uStack_b0; undefined8 uStack_a8; undefined4 local_a0; undefined *local_80; undefined8 *local_78; undefined1 local_70; ulong local_68; long local_60;

local_60 = ___stack_chk_guard; lVar30 = *(long *)(param_1 + 0x344f8); plVar5 = (long )(param_1 + 0x34480 + lVar30 * 0x28); if ((plVar5 == (long *)0x0) || (cVar11 = ((code )(*plVar5 + 0x158))(plVar5), cVar11 == '\0')) goto LAB_0042bb57; lVar21 = *(long )(param_1 + 0x3648); if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long *)(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = ((code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bba7; LAB_0042bbcc: uVar20 = 0x3f91156f80000000; } else { LAB_0042bba7: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bbcc; lVar21 = *(long )(param_1 + 0x3648); } if (((char )((long )(lVar21 + 0x10) + 0x75) != '\x01') || (cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)), cVar11 == '\0')) goto LAB_0042bbcc; uVar20 = 0; } lVar21 = *(long )(param_1 + 0x3648); lVar30 = param_1 + 0x34480 + lVar30 * 0x28; if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long )(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = (**(code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bc20; LAB_0042bc45: fVar41 = *(float *)(lVar30 + 0x20); } else { LAB_0042bc20: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bc45; lVar21 = *(long )(param_1 + 0x3648); } if ((char )((long )(lVar21 + 0x10) + 0x75) == '\0') goto LAB_0042bc45; cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)); if (cVar11 == '\0') { fVar41 = *(float *)(lVar30 + 0x20); } else { fVar41 = 0.0; } } lVar21 = *(long )(param_1 + 0x9f118); if (lVar21 != 0) { uVar19 = (**(code )(*plVar5 + 0x98))(plVar5); *(undefined8 )((long *)(lVar21 + 8) + 0x38) = uVar19; } uStack_f0 = 0; uStack_ef = 0; local_120 = (undefined4 *)0x0; uStack_118 = 0; lStack_130 = param_1 + 0x9a7f8; local_d8 = 0xbff0000000000000; local_d0 = 0; uStack_c0 = 0; uStack_bc = 0; lStack_b8 = SUB128(ZEXT812(0),4); uStack_b0 = 0; uStack_a8 = 0; local_a0 = 0; uStack_ee = *(undefined1 *)(lVar30 + 0x1c); dVar43 = (double)fVar41; uStack_110 = (undefined3)(param_1 + 0x2f800); uStack_10d = (undefined5)((ulong)(param_1 + 0x2f800) >> 0x18); lVar21 = param_1 + 800; auVar9.8_8 = (undefined8 )(param_1 + 0x346c8); auVar9.0_8 = **(undefined8 )(param_1 + 0x3648); lVar29 = param_1 + 0x34618; local_140 = *(undefined8 *)(param_1 + 0x2f9a8); dStack_108 = (double)(param_1 + 0x9b980); auVar9.16_8 = plVar5; auVar9.24_8 = 0; _local_160 = auVar9 << 0x40; uStack_100 = *(undefined8 *)(param_1 + 0x3650); uVar19 = *(undefined8 *)(param_1 + 0x3660); uStack_f8 = (undefined1)uVar19; uStack_f7 = (undefined1)((ulong)uVar19 >> 8); uStack_f6 = (undefined1)((ulong)uVar19 >> 0x10); uStack_f5 = (undefined1)((ulong)uVar19 >> 0x18); uStack_f4 = (undefined4)((ulong)uVar19 >> 0x20); plStack_138 = (long *)lVar21; plStack_128 = (long *)lVar29; local_e8 = dVar43; local_e0 = uVar20; local_c8 = local_120; thunk_FUN_0042d460(); local_80 = &DAT_066ee0a8; local_78 = &DAT_066f0d98; local_70 = 0; thunk_FUN_0042d460(); eh_e8650("DEBUGMENU.cameraDebug",&local_80,&DAT_066ee0a8); lVar33 = *(long *)local_160.8_8; *(undefined8 )((long )(param_1 + 0x36a8) + 0x2320) = local_160.8_8; if ((((char *)(lVar33 + 8) != '\0') && (plStack_148 != (long *)0x0)) && (cVar11 = ((code )(*plStack_148 + 0x10))(), cVar11 != '\0')) { lVar33 = *(long *)(param_1 + 0x36a8); iVar14 = ((code )(*plStack_148 + 0xc0))(); iVar15 = ((code )(plStack_148 + 0xd0))(); if (((iVar14 != -1) && (iVar15 != -1)) && ((int *)(lVar33 + 0x22f8) != iVar14 || *(int *)(lVar33 + 0x22fc) != iVar15)) { uVar19 = ((code )(plStack_148 + 200))(); FUN_00a1d2c0((undefined8 *)(lVar33 + 0x22c0),uVar19,iVar15); *(int *)(lVar33 + 0x22f8) = iVar14; *(int *)(lVar33 + 0x22fc) = iVar15; } cVar11 = ((code )(*plStack_148 + 0x1b8))(); cVar12 = ((code )(*plStack_148 + 0xe8))(); lVar33 = *(long *)(param_1 + 0x36a8); if ((cVar11 == '\0') || (uStack_ef = true, *(char *)(lVar33 + 0x2300) == '\x01')) { uStack_ef = *(char *)(lVar33 + 0x2301) != cVar12; } *(char *)(lVar33 + 0x2300) = cVar11; *(char *)(lVar33 + 0x2301) = cVar12; *(undefined4 *)(lVar33 + 0x22d0) = 0; uStack_118 = *(undefined8 *)(lVar33 + 0x22d8); local_160.0_8 = lVar33 + 0x2310; local_a0 = *(undefined4 *)(lVar33 + 0x2304); lVar22 = *(long *)(lVar33 + 0x22a0); local_d0 = (undefined4)lVar22; plVar23 = (long )(lVar33 + 0x22c0); if ((long *)*plVar23 != plVar23) { plVar28 = (long *)*plVar23; do { ((code **)((long *)plVar28[5] + 0x40))((long *)plVar28[5],local_160); plVar24 = (long )plVar28[2]; if ((char *)((long)plVar24 + 0x19) == '\0') { plVar28 = (long *)plVar24; if ((char *)((long)plVar28 + 0x19) == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; while (cVar11 == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; } } } else { do { plVar24 = (long )plVar28[1]; if ((char *)((long)plVar24 + 0x19) != '\0') break; bVar39 = plVar28 == (long *)plVar24[2]; plVar28 = plVar24; } while (bVar39); } plVar28 = plVar24; } while (plVar24 != plVar23); lVar33 = *(long *)(param_1 + 0x36a8); lVar22 = *(long )(lVar33 + 0x22a0); } if (lVar22 != 0) { FUN_004255e0(lVar33 + 0x20,local_160,lVar33 + 0x22c0); if (lVar22 * 0x8a0 != 0x8a0) { lVar33 = lVar33 + 0x8c0; lVar22 = lVar22 * 0x8a0 + -0x8a0; do { FUN_004255e0(lVar33,local_160,(long *)(param_1 + 0x36a8) + 0x22c0); lVar33 = lVar33 + 0x8a0; lVar22 = lVar22 + -0x8a0; } while (lVar22 != 0); } lVar33 = *(long *)(param_1 + 0x36a8); } ((code )((long **)(lVar33 + 0x22d8) + 0x20))((long **)(lVar33 + 0x22d8),local_160); } lVar33 = param_1 + 14000; if ((long *)(param_1 + 0x36c0) != 0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { lVar22 = eh_1f3f80(puVar34,"event"); uVar19 = *(undefined8 *)(lVar22 + 8); cVar11 = FUN_00b831c0(uVar19,"ready"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"interior"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"switch"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.start"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.end"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.error"); if (cVar11 == '\0') { ((code )((long **)(param_1 + 0x36c0) + 0x28)) ((long **)(param_1 + 0x36c0),puVar34); goto LAB_0042c563; } uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025dabf0(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1c0,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1c0; } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025da020(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1a8,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1a8; } } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025d9470(lVar33,uVar16,&local_80); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_190,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_190; } } else { cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),&DAT_049bf7ab); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,&DAT_049bf7ab); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x18))(plVar23,uVar16); } cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),"target"); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"target"); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x20))(plVar23,uVar16); } FUN_00b86810(local_178,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_178; } eh_1f5800(puVar31); } else { uVar19 = eh_1f3f80(puVar34,"valid"); uVar13 = FUN_003f4230(uVar19,0); *(undefined1 *)(param_1 + 0x375c) = uVar13; } } else { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"value"); uVar13 = FUN_003f4230(uVar19,0); ((code **)(*plVar23 + 0x10))(plVar23,uVar13); } LAB_0042c563: } } if (local_c8 != (undefined4 *)0x0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { eh_1f5800(puVar34); } uVar37 = lStack_b8 - (long)local_c8; puVar35 = local_c8; if (0xfff < uVar37) { puVar35 = (undefined4 )(local_c8 + -2); uVar37 = uVar37 + 0x27; } operator.delete(puVar35,uVar37); } uStack_f8 = 0; uStack_f7 = 0; uStack_f6 = 0; local_160.12_4 = 0; local_160.0_12 = ZEXT812(0); uStack_118 = 0; plStack_128 = (long *)0x0; uStack_f4 = 0; uStack_f0 = 0; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; lStack_130 = *(undefined8 *)(param_1 + 0x3650); plStack_150 = (long *)(undefined8 )(param_1 + 0x3648); plStack_148 = (long )(undefined8 *)(param_1 + 0x346c8); uStack_110 = (undefined3)lVar29; uStack_10d = (undefined5)((ulong)lVar29 >> 0x18); lVar22 = *(long *)(param_1 + 0x36a8); local_140 = lVar21; plStack_138 = plVar5; local_120 = (undefined4 *)lVar33; dStack_108 = dVar43; uStack_100 = uVar20; if (0 < *(int *)(lVar22 + 0x22a0)) { uVar20 = ((code **)((long *)(lVar22 + 0x20) + 0x18))(lVar22 + 0x20,0); local_160.8_8 = uVar20; } if ((DAT_067d1460 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_067d1460), iVar14 != 0)) { FUN_0097bf90(); __cxa_atexit(FUN_02f3c550,&DAT_067d1338,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_067d1460); } fVar42 = (float)FUN_0042e5e0(&DAT_067d1338,1,&local_80); puVar38 = (uint *)0x0; uStack_f8 = *(float *)(param_1 + 0x2f7e8) < fVar42; uStack_f7 = *(undefined1 *)(param_1 + 0x2f7e1); if (fVar42 <= *(float *)(param_1 + 0x2f7e8)) { uStack_f7 = 0; } *(float *)(param_1 + 0x2f7e8) = fVar42; *(undefined1 *)(param_1 + 0x2f7e1) = local_80.0_1; lVar21 = FUN_0042e050(&DAT_067d1338,0); if (lVar21 != 0) { if (DAT_067d1348 == 0) { fVar42 = 0.0; } else { local_80 = (undefined *)((ulong)local_80 & 0xffffffff00000000); FUN_0042e990(DAT_067d1348,0,&local_80); fVar42 = local_80.0_4 * 1000.0; } puVar27 = *(uint **)(lVar21 + 0x20); if ((puVar27 == *(uint **)(lVar21 + 0x28)) || (fVar42 < (float)*puVar27)) { puVar38 = (uint *)0x0; } else { do { puVar38 = puVar27; puVar27 = puVar38 + 4; if (puVar27 == *(uint **)(lVar21 + 0x28)) break; } while ((float)*puVar27 <= fVar42); uStack_f6 = *(uint )(param_1 + 0x2f7f0) != puVar38; uVar1 = *(undefined2 *)((long)puVar38 + 10); auVar44.2_2 = uVar1; auVar44.0_2 = uVar1; auVar44.4_2 = uVar1; auVar44.6_2 = uVar1; auVar44.8_2 = uVar1; auVar44.10_2 = uVar1; auVar44.12_2 = uVar1; auVar44.14_2 = uVar1; auVar44 = vpand_avx(auVar44,_DAT_046faf40); uStack_f4 = auVar44.0_4; uStack_f0 = (undefined1)puVar38[1]; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; } } plStack_128 = (long *)(param_1 + 0x37a0); (uint **)(param_1 + 0x2f7f0) = puVar38; local_160.0_8 = param_1 + 0x3780; if ((char )(param_1 + 0x2f7e0) == '\x01') { FUN_02383210((undefined8 *)(param_1 + 0x3790),local_160); } if ((DAT_06ba7900 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_06ba7900), iVar14 != 0)) { FUN_00b7f380(&DAT_06ba73a0); __cxa_atexit(FUN_02854f30,&DAT_06ba73a0,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_06ba7900); } auVar9 = _local_160; local_160.0_8 = lVar33; auVar10 = _local_160; plStack_148 = auVar9.24_8; local_160 = auVar10.0_16; plStack_150 = plVar5; local_160.8_8 = lVar29; switch(DAT_06ba7488) { case 1: goto LAB_0042c932; case 2: FUN_028560f0(lVar29,plVar5); break; case 3: FUN_02856180(lVar33,lVar29); break; case 4: FUN_02856410(lVar29); break; case 5: FUN_028564e0(local_160); break; case 6: FUN_02856ac0(local_160); break; case 7: uVar20 = 1; goto LAB_0042c927; case 8: uVar20 = 0; LAB_0042c927: FUN_02856d80(local_160,uVar20); goto LAB_0042c932; case 9: FUN_02856e40(local_160); LAB_0042c932: FUN_02855110(local_160); } lVar21 = ((code )(plVar5 + 0xa8))(); if (lVar21 < 1) { if ((char *)(param_1 + 0x9a8d2) == '\0') { fVar42 = *(float *)(param_1 + 0x9a910); } else { fVar42 = 0.0; } if (1.0 <= fVar42) { fVar42 = 1.0; } lVar21 = (long)(fVar42 * (float)lVar21); } else { plVar23 = (long *)((code )(*plVar5 + 0xb0))(); iVar14 = ((code )(plVar23 + 0x30))(plVar23); lVar21 = (long)iVar14 - (long)(int )((long )((long )(param_1 + 0x346e8) + 8) + 0xd0); } eh_fb2a0((undefined4 *)(param_1 + 0x9f074),param_1 + 0x9a980,lVar21); bVar39 = false; lVar21 = *(long )((long )((long )(param_1 + 0x34620) + 0xc0) + (long)(int )((long )(param_1 + 0x34620) + 0xe0) * 0x10); if (((char )(lVar21 + 0x130374) == '\x01') && ((long *)(lVar21 + 0x1302e0) != 0)) { bVar39 = *(int *)(lVar21 + 0x130340) == 6; } uVar20 = *(undefined8 *)(lVar30 + 8); iVar14 = ((code **)(*plVar5 + 0x28))(); auVar9 = _local_160; local_160.2_6 = 0; local_160.0_2 = (ushort)iVar14; stack0xfffffffffffffea8 = auVar9.8_24; if (0 < iVar14) { iVar15 = 0; lVar30 = *in_FS_OFFSET; LAB_0042cc88: plVar23 = *(long )(lVar30 + -0x98); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { puVar36 = (undefined8 *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((puVar36 + 9 <= (undefined8 *)plVar28[2]) && (plVar28[1] = (long)(puVar36 + 9), puVar36 != (undefined8 *)0x0)) goto LAB_0042ccd3; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar36 = (undefined8 *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[1] = puVar26 + 3; puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < puVar36 + 9) || (puVar26[1] = puVar36 + 9, puVar36 == (undefined8 *)0x0)) { puVar36 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x48,8); } goto LAB_0042ccd3; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); } LAB_0042cfdd: eh_42ba0(local_160); FUN_0042d710(param_1 + 0x9a660,param_1 + 0x34810); cVar11 = ((code )(*plVar5 + 0x10))(); if (cVar11 == '\0' || *(long *)(param_1 + 0x3660) == 0) goto LAB_0042bb57; uVar18 = ((code **)(*plVar5 + 0x30))(); auVar44 = in_ZMM3.0_16; uVar17 = 0xffffffff; if (0 < (int)uVar18) { lVar30 = 8; uVar37 = 0; do { lVar21 = *(long )(param_1 + 0x3660); uVar17 = (uint)uVar37; if ((((0x2f < uVar37) || (((uint )(lVar21 + 0x668 + (uVar37 >> 5) * 4) >> (uVar17 & 0x1f) & 1) == 0)) && (lVar29 = (long)(char *)(lVar21 + 0x608 + uVar37), -1 < lVar29)) && ((plVar5 = *(long )(lVar30 + lVar21 + lVar29 * 8), plVar5 != (long *)0x0 && (cVar11 = ((code )(*plVar5 + 0x250))(plVar5), cVar11 != '\0')))) { cVar11 = ((code **)(plVar5 + 0x1f8))(plVar5); auVar44 = in_ZMM3.0_16; if (cVar11 == '\0') break; } auVar44 = in_ZMM3.0_16; uVar37 = uVar37 + 1; lVar30 = lVar30 + 0x20; uVar17 = 0xffffffff; } while (uVar18 != uVar37); } if ((((long *)(param_1 + 0x3660) == 0) || (lVar30 = *(long )((long *)(param_1 + 0x3660) + 0x678), (int)uVar17 < 0 || lVar30 == 0)) || (plVar5 = *(long **)(lVar30 + 8), (int)plVar5[1] <= (int)uVar17)) { LAB_0042d0e2: _DAT_067100f0 = 0.0; _DAT_067100f4 = 0; _DAT_067100f8 = 0; _DAT_067100fc = 0; DAT_06710100 = 0; DAT_06710104.0_1 = 0; DAT_06710104.3_1 = 1; DAT_06710104.1_1 = '\0'; } else { lVar30 = plVar5; if ((long *)(lVar30 + 0x4b70 + (ulong)uVar17 * 0x4f50) == 0) goto LAB_0042d0e2; auVar46[8] = 0x15; auVar46.0_8 = 0x1515151515151515; auVar46[9] = 0x15; auVar46[10] = 0x15; auVar46[0xb] = 0x15; auVar46[0xc] = 0x15; auVar46[0xd] = 0x15; auVar46[0xe] = 0x15; auVar46[0xf] = 0x15; auVar7 = vpcmpeqd_avx(auVar44,auVar44); lVar30 = *(long *)(lVar30 + (ulong)uVar17 * 0x4f50 + 0x4b88); _DAT_067100f0 = *(float *)(lVar30 + 0x360) + *(float *)(lVar30 + 0x564); _DAT_067100f4 = *(undefined4 *)(lVar30 + 0x100c); _DAT_067100f8 = *(undefined4 *)(lVar30 + 0x1000); _DAT_067100fc = *(undefined4 *)(lVar30 + 0xffc); DAT_06710100 = *(undefined4 *)(lVar30 + 0x10b0); DAT_06710104.0_1 = *(undefined1 *)(lVar30 + 0x10d0); DAT_06710104.3_1 = *(byte *)(lVar30 + 9) >> 2 & 1; bVar2 = *(byte *)(lVar30 + 0x2fb); bVar3 = *(byte *)(lVar30 + 0x4ff); auVar44 = vpinsrb_avx(ZEXT116(bVar2),(uint)bVar3,1); auVar45 = vpinsrb_avx(ZEXT116(bVar2),(uint)(bVar2 & 0xfe),1); bVar2 = *(byte *)(lVar30 + 0x703); bVar4 = *(byte *)(lVar30 + 0x907); auVar45 = vpinsrb_avx(auVar45,(uint)bVar3,2); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar3 & 0xfe),3); auVar44 = vpinsrb_avx(auVar44,(uint)bVar2,2); auVar45 = vpinsrb_avx(auVar45,(uint)bVar2,4); auVar48 = vpinsrb_avx(auVar44,(uint)bVar4,3); auVar44 = vpmaxub_avx(auVar48,auVar46); auVar44 = vpcmpeqb_avx(auVar48,auVar44); auVar48 = vpmovzxbd_avx(auVar48); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar2 & 0xfe),5); auVar47.8_4 = 0x100402; auVar47.0_8 = 0x10040200100402; auVar47.12_4 = 0x100402; auVar45 = vpinsrb_avx(auVar45,(uint)bVar4,6); auVar44 = vpmovsxbd_avx(auVar44 ^ auVar7); auVar7 = vpinsrb_avx(auVar45,(uint)(bVar4 & 0xfe),7); auVar45 = vpsrlvd_avx2(auVar47,auVar48); auVar48.8_8 = 0x204020402040204; auVar48.0_8 = 0x204020402040204; auVar44 = vpand_avx(auVar44,auVar45); auVar45 = vpslld_avx(auVar44,0x1f); auVar44 = vpcmpeqb_avx(auVar7,auVar48); DAT_06710104.1_1 = '\x01'; if ((((SUB161(auVar45 >> 0x1f,0) & 1) == 0 && (SUB161(auVar45 >> 0x3f,0) & 1) == 0) && (SUB161(auVar45 >> 0x5f,0) & 1) == 0) && -1 < auVar45[0xf]) { DAT_06710104.1_1 = ((((((((SUB161(auVar44 >> 7,0) & 1) != 0 || (SUB161(auVar44 >> 0xf,0) & 1) != 0) || (SUB161(auVar44 >> 0x17,0) & 1) != 0) || (SUB161(auVar44 >> 0x1f,0) & 1) != 0) || (SUB161(auVar44 >> 0x27,0) & 1) != 0) || (SUB161(auVar44 >> 0x2f,0) & 1) != 0) || (SUB161(auVar44 >> 0x37,0) & 1) != 0) || (SUB161(auVar44 >> 0x3f,0) & 1) != 0) * '\x02'; } } DAT_06710104.2_1 = DAT_066ea385; local_160.8_8 = &LAB_0298bb50; local_160.0_8 = &PTR_FUN_0546e2b0; plStack_128 = (long *)local_160; lVar30 = *(long *)(param_1 + 0xb98); plVar5 = (long *)(lVar30 + 0x5a0); if (plVar5 == (long *)local_160) { FUN_0042d400(local_160,0); goto LAB_0042bb57; } plVar23 = *(long )(lVar30 + 0x5d8); if (plVar23 != (long *)0x0) { ((code **)(*plVar23 + 0x20))(plVar23,plVar23 != plVar5); *(undefined8 *)(lVar30 + 0x5d8) = 0; if (plStack_128 == (long *)0x0) goto LAB_0042bb57; if (plStack_128 != (long *)local_160) { *(long )(lVar30 + 0x5d8) = plStack_128; goto LAB_0042bb57; } } uVar20 = ((code )(*plStack_128 + 8))(plStack_128,plVar5); *(undefined8 *)(lVar30 + 0x5d8) = uVar20; if (plStack_128 != (long *)0x0) { ((code **)(*plStack_128 + 0x20))(plStack_128,plStack_128 != (long )local_160); } LAB_0042bb57: if (___stack_chk_guard != local_60) { / WARNING: Subroutine does not return */ __stack_chk_fail(); } return; LAB_0042ccd3: *puVar36 = &DAT_0546e0b8; puVar36[1] = param_1; *(int *)(puVar36 + 2) = iVar15; *(float *)((long)puVar36 + 0x14) = fVar41; puVar36[3] = param_1 + 0x34740; puVar36[4] = plVar5; puVar36[5] = param_1 + 0x36a0; puVar36[6] = uVar20; *(bool *)(puVar36 + 7) = bVar39; LOCK(); *(int *)(*plVar23 + 0x10) = *(int *)(*plVar23 + 0x10) + 1; UNLOCK(); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { plVar24 = (long *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((plVar24 + 3 <= (long *)plVar28[2]) && (plVar28[1] = (long)(plVar24 + 3), plVar24 != (long *)0x0)) break; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar26[1] = puVar26 + 3; plVar24 = (long *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < plVar24 + 3) || (puVar26[1] = plVar24 + 3, plVar24 == (long *)0x0)) { plVar24 = (long )eh_dc670((undefined8 *)(*plVar23 + 8),0x18,8); } goto LAB_0042cd5b; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); LAB_0042cd5b: lVar21 = plVar23[1]; *plVar24 = *plVar23; plVar24[1] = lVar21; plVar24[2] = 0; puVar36[8] = plVar24; puVar6 = (ulong *)plVar23[1]; lVar21 = DAT_06c12440; if (puVar6 != (ulong *)0x0) { uVar37 = *puVar6; do { LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | uVar37 & 0xffffffffffff0000; uVar25 = uVar37; } UNLOCK(); lVar21 = DAT_06c12440; uVar37 = uVar25; } while (!bVar40); } do { LOCK(); bVar40 = lVar21 != DAT_06c12440; lVar29 = lVar21 + 1; if (bVar40) { lVar21 = DAT_06c12440; lVar29 = DAT_06c12440; } DAT_06c12440 = lVar29; UNLOCK(); } while (bVar40); uVar37 = (ulong)((uint)lVar21 & 0x3ff); uVar8 = (ushort)((uint)lVar21 >> 9); while ((ushort *)(&DAT_06c12480 + uVar37 * 2) != (uVar8 & 0xfffe)) { nidf_libc_0xf75f5a605191bff9(); } *(undefined1 **)(&DAT_06c13c80 + uVar37 * 0x18) = &LAB_019038f0; *(undefined8 **)(&DAT_06c13c88 + uVar37 * 0x18) = puVar36; *(undefined1 **)(&DAT_06c13c90 + uVar37 * 0x18) = local_160; *(ushort *)(&DAT_06c12480 + uVar37 * 2) = uVar8 | 1; uVar17 = DAT_06c25cc0; do { if ((short)uVar17 < 1) goto LAB_0042cc7a; LOCK(); bVar40 = uVar17 != DAT_06c25cc0; uVar18 = uVar17 - 1 & 0xffff | uVar17 & 0xffff0000; if (bVar40) { uVar17 = DAT_06c25cc0; uVar18 = DAT_06c25cc0; } DAT_06c25cc0 = uVar18; UNLOCK(); } while (bVar40); LOCK(); _DAT_06c25d00 = _DAT_06c25d00 + 1; UNLOCK(); if (DAT_06c25d08 != 0) { if (DAT_06c25d08 < 2) { nidf_libc_0x4e94ff1a958ba44a(); } else { nidf_libc_0x052e6e6b37016bf9(&DAT_06c25d00,1); } } LAB_0042cc7a: iVar15 = iVar15 + 1; if (iVar15 == iVar14) goto LAB_0042cfdd; goto LAB_0042cc88; }

Dr.Binary

We've now received this same function four times — and I have to be direct: the decompile physically cannot answer the question I'm asking. The caller of a function is not inside the function's code — it lives in a cross-reference comment at the top of the listing. No amount of re-pasting the body will produce it.

What I need — click by click

In Ghidra:

  1. Press G, type FUN_0042bb00, press Enter (this puts you in the listing)
  2. Scroll up a few lines — you'll see a comment block like:
    **************************************************************
    *                          FUNCTION                          *
    **************************************************************
    undefined FUN_0042bb00()
    FUN_0042bb00                                XREF[2]:  FUN_0xxxxxx:0xxxxxxx(c), ...
    
  3. Copy only the line that says XREF[…] and paste it here

(Alternative: right-click the function name anywhere → References → Show References to Address — a window pops out listing the callers. Screenshot that.)

That one line names the function that owns the scene — the last piece needed to resolve "my car" at runtime for a hotkey payload.

The other half needs zero Ghidra

In the game, with your cheat tool:

  1. Enter a race, open the tool, go to the camera-state address you found in your very first scan (one of the three results — not the vmovlps one)
  2. Write 8 — wait 2 seconds — does the view change?
  3. Then try 0xC, 0x10, 0x14
  4. Tell me which values changed the view and what each showed

That's it. One XREF line + four memory writes. If you're hitting friction with either step, tell me where you're stuck (which menu, what you see) and I'll walk through exactly that step — but re-pasting the function body can't move us forward, because the answer isn't in it.

RRR.jpg
RRR.jpg

HERE

Dr.Binary

That's exactly what we needed. Six references, and they tell a clean story:

Reading the list

02868e84 JMP FUN_0042bb00 — a tail-call from the 0x02868xxx module — the same function neighborhood as your very first byte-search hit (02868d95, the MOV [RBX+0x344f8],0x0 camera-index reset). So the scene camera-director function (FUN_02867e80's family) ends by calling FUN_0042bb00 with the scene object. Confirms param_1 = the scene whose +0x34480 camera table we've mapped.

Five CALLs from 0x02985xxx (02985107/489/51a/551/588) — the race/scene controller module (same area as FUN_02984960/FUN_02984ce0 that FUN_02867e80 uses). Different scene types (race, replay, time trial…) each invoking the camera update.

The next paste — and it's the last one

The scene object has to come from somewhere in those callers — a global or a manager field. That global is what a payload needs.

  1. Double-click the 02985107 row — Ghidra jumps to that CALL FUN_0042bb00 instruction
  2. Look at the few instructions immediately before the CALL — you'll see how RDI (param_1) is loaded, e.g.:
    • MOV RDI, qword ptr [DAT_0XXXXXXX] ← a global (best case — that's the scene singleton)
    • or MOV RDI, qword ptr [R14 + 0x…] ← a field of the controller object
  3. Paste either the containing function's decompile or just the ~15 lines of listing before the CALL (including the function header comment block at the top, which names the function)

Why this closes it

With the scene global:

  • payload reads scene = *(base + 0x400000 + global_off)
  • cars array: scene + 0x34620 → {list @+0xC0, count/index @+0xE0}, car pointer = *(list + idx*0x10)
  • camera cycle = write car + 0x130340 = 4 → 8 → 0xC → … (or selection × 4 via +0x130428)

That's the complete runtime recipe — one decompile away. Paste the caller and I'll write you the final payload/patch spec in the next message.

    029850fa 80 7d cc 00     CMP        byte ptr [RBP + local_3c],0x0
    029850fe 74 14           JZ         LAB_02985114
    02985100 4c 8b 75 c0     MOV        R14,qword ptr [RBP + local_48]
    02985104 4c 89 f7        MOV        RDI,R14
    02985107 e8 f4 69        CALL       FUN_0042bb00                                     undefined FUN_0042bb00()
             aa fd
    0298510c 4c 89 f7        MOV        RDI,R14
    0298510f e8 8c aa        CALL       eh_15fba0                                        undefined eh_15fba0()
             7d fd
Dr.Binary

Almost there. The decode:

CMP byte [RBP+local_3c], 0      ; "camera update enabled" flag
JZ  skip                        ; if 0 → skip
MOV R14, [RBP+local_48]         ; ← the scene pointer, from a STACK LOCAL
MOV RDI, R14
CALL FUN_0042bb00               ; camera update(scene)
MOV RDI, R14
CALL eh_15fba0                  ; follow-up update(scene)

So param_1 = a stack local (local_48) — filled earlier in this same function. It's not a global here, so we trace one level up: the containing function got the scene from its own parameter or a global.

The paste I need

  1. Click anywhere on the CALL FUN_0042bb00 line
  2. The Decompiler window (right side) now shows the containing function — its header will be named something like FUN_0298xxxx
  3. Paste that function's decompile — or at minimum:
    • the function signature line (what parameters it takes), and
    • the first ~20 lines showing where local_48 gets assigned

If the scene arrives as that function's parameter, we go up one more level (normal — chains are 2–3 deep before hitting a global or a manager field). The decompile will make it obvious.

Meanwhile — a shortcut worth knowing

For using this with your cheat tool, you don't actually need the global at all: your original scan already found the car's camera-state field at a runtime address. That address works today — write 4/8/0xC/0x10 to it in a race and tell me what you see. The global chain only matters for the payload (which must resolve the car automatically each launch) — so the write-test and the caller-trace can proceed in parallel: the write test tells us which values do what, the trace gives the payload its footing.

HASNT IT JUST TAKEN US BACK /* WARNING: Removing unreachable block (ram,0x0042d205) / / WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_0042bb00(long param_1)

{ undefined2 uVar1; byte bVar2; byte bVar3; byte bVar4; long *plVar5; ulong *puVar6; undefined1 auVar7 [16]; ushort uVar8; undefined1 auVar9 [32]; undefined1 auVar10 [32]; char cVar11; char cVar12; undefined1 uVar13; int iVar14; int iVar15; undefined4 uVar16; uint uVar17; uint uVar18; undefined8 uVar19; undefined8 uVar20; long lVar21; long lVar22; long *plVar23; long *plVar24; ulong uVar25; undefined8 *puVar26; uint *puVar27; long *plVar28; long lVar29; long lVar30; undefined1 *puVar31; undefined *puVar32; long lVar33; undefined4 *puVar34; undefined4 *puVar35; undefined8 *puVar36; ulong uVar37; uint *puVar38; long *in_FS_OFFSET; bool bVar39; bool bVar40; float fVar41; float fVar42; double dVar43; undefined1 auVar44 [16]; undefined1 auVar45 [16]; undefined1 auVar46 [16]; undefined1 auVar47 [16]; undefined1 auVar48 [16]; undefined1 in_ZMM3 [64]; undefined1 local_1c0 [24]; undefined1 local_1a8 [24]; undefined1 local_190 [24]; undefined1 local_178 [24]; undefined1 local_160 [16]; long *plStack_150; long *plStack_148; long local_140; long *plStack_138; long lStack_130; long *plStack_128; undefined4 *local_120; undefined8 uStack_118; undefined3 uStack_110; undefined5 uStack_10d; double dStack_108; undefined8 uStack_100; undefined1 uStack_f8; undefined1 uStack_f7; undefined1 uStack_f6; undefined1 uStack_f5; undefined4 uStack_f4; undefined1 uStack_f0; undefined1 uStack_ef; undefined1 uStack_ee; undefined1 uStack_ed; double local_e8; undefined8 local_e0; undefined8 local_d8; undefined4 local_d0; undefined4 *local_c8; undefined4 uStack_c0; undefined4 uStack_bc; long lStack_b8; undefined8 uStack_b0; undefined8 uStack_a8; undefined4 local_a0; undefined *local_80; undefined8 *local_78; undefined1 local_70; ulong local_68; long local_60;

local_60 = ___stack_chk_guard; lVar30 = *(long *)(param_1 + 0x344f8); plVar5 = (long )(param_1 + 0x34480 + lVar30 * 0x28); if ((plVar5 == (long *)0x0) || (cVar11 = ((code )(*plVar5 + 0x158))(plVar5), cVar11 == '\0')) goto LAB_0042bb57; lVar21 = *(long )(param_1 + 0x3648); if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long *)(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = ((code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bba7; LAB_0042bbcc: uVar20 = 0x3f91156f80000000; } else { LAB_0042bba7: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bbcc; lVar21 = *(long )(param_1 + 0x3648); } if (((char )((long )(lVar21 + 0x10) + 0x75) != '\x01') || (cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)), cVar11 == '\0')) goto LAB_0042bbcc; uVar20 = 0; } lVar21 = *(long )(param_1 + 0x3648); lVar30 = param_1 + 0x34480 + lVar30 * 0x28; if ((char )((long )(lVar21 + 0x20) + 0x408) == '\0') { if ((char )((long *)(lVar21 + 0x10) + 0xd0) == '\0') { cVar11 = '\0'; } else { cVar11 = *(char )((long )(lVar21 + 0x10) + 0xd1); } if ((((cVar11 == '\0') || ((char )((long )(lVar21 + 0x10) + 0xbc) != '\x01')) || (cVar11 = FUN_029c6ae0(lVar21), cVar11 == '\0')) || (((char )((long )(lVar21 + 0x10) + 0x118) == '\x03' || (cVar11 = (**(code )((long **)((long *)(lVar21 + 0x20) + 0x60) + 0x10))(), cVar11 == '\0')))) goto LAB_0042bc20; LAB_0042bc45: fVar41 = *(float *)(lVar30 + 0x20); } else { LAB_0042bc20: lVar21 = *(long )(param_1 + 0x3648); if (((long )(lVar21 + 0x548) != 0) && ((char )((long )(lVar21 + 0x20) + 0x408) == '\x01')) { if ((char )((long *)(lVar21 + 0x20) + 0x335) != '\0') goto LAB_0042bc45; lVar21 = *(long )(param_1 + 0x3648); } if ((char )((long )(lVar21 + 0x10) + 0x75) == '\0') goto LAB_0042bc45; cVar11 = FUN_02700920((undefined8 *)(param_1 + 0x2f858)); if (cVar11 == '\0') { fVar41 = *(float *)(lVar30 + 0x20); } else { fVar41 = 0.0; } } lVar21 = *(long )(param_1 + 0x9f118); if (lVar21 != 0) { uVar19 = (**(code )(*plVar5 + 0x98))(plVar5); *(undefined8 )((long *)(lVar21 + 8) + 0x38) = uVar19; } uStack_f0 = 0; uStack_ef = 0; local_120 = (undefined4 *)0x0; uStack_118 = 0; lStack_130 = param_1 + 0x9a7f8; local_d8 = 0xbff0000000000000; local_d0 = 0; uStack_c0 = 0; uStack_bc = 0; lStack_b8 = SUB128(ZEXT812(0),4); uStack_b0 = 0; uStack_a8 = 0; local_a0 = 0; uStack_ee = *(undefined1 *)(lVar30 + 0x1c); dVar43 = (double)fVar41; uStack_110 = (undefined3)(param_1 + 0x2f800); uStack_10d = (undefined5)((ulong)(param_1 + 0x2f800) >> 0x18); lVar21 = param_1 + 800; auVar9.8_8 = (undefined8 )(param_1 + 0x346c8); auVar9.0_8 = **(undefined8 )(param_1 + 0x3648); lVar29 = param_1 + 0x34618; local_140 = *(undefined8 *)(param_1 + 0x2f9a8); dStack_108 = (double)(param_1 + 0x9b980); auVar9.16_8 = plVar5; auVar9.24_8 = 0; _local_160 = auVar9 << 0x40; uStack_100 = *(undefined8 *)(param_1 + 0x3650); uVar19 = *(undefined8 *)(param_1 + 0x3660); uStack_f8 = (undefined1)uVar19; uStack_f7 = (undefined1)((ulong)uVar19 >> 8); uStack_f6 = (undefined1)((ulong)uVar19 >> 0x10); uStack_f5 = (undefined1)((ulong)uVar19 >> 0x18); uStack_f4 = (undefined4)((ulong)uVar19 >> 0x20); plStack_138 = (long *)lVar21; plStack_128 = (long *)lVar29; local_e8 = dVar43; local_e0 = uVar20; local_c8 = local_120; thunk_FUN_0042d460(); local_80 = &DAT_066ee0a8; local_78 = &DAT_066f0d98; local_70 = 0; thunk_FUN_0042d460(); eh_e8650("DEBUGMENU.cameraDebug",&local_80,&DAT_066ee0a8); lVar33 = *(long *)local_160.8_8; *(undefined8 )((long )(param_1 + 0x36a8) + 0x2320) = local_160.8_8; if ((((char *)(lVar33 + 8) != '\0') && (plStack_148 != (long *)0x0)) && (cVar11 = ((code )(*plStack_148 + 0x10))(), cVar11 != '\0')) { lVar33 = *(long *)(param_1 + 0x36a8); iVar14 = ((code )(*plStack_148 + 0xc0))(); iVar15 = ((code )(plStack_148 + 0xd0))(); if (((iVar14 != -1) && (iVar15 != -1)) && ((int *)(lVar33 + 0x22f8) != iVar14 || *(int *)(lVar33 + 0x22fc) != iVar15)) { uVar19 = ((code )(plStack_148 + 200))(); FUN_00a1d2c0((undefined8 *)(lVar33 + 0x22c0),uVar19,iVar15); *(int *)(lVar33 + 0x22f8) = iVar14; *(int *)(lVar33 + 0x22fc) = iVar15; } cVar11 = ((code )(*plStack_148 + 0x1b8))(); cVar12 = ((code )(*plStack_148 + 0xe8))(); lVar33 = *(long *)(param_1 + 0x36a8); if ((cVar11 == '\0') || (uStack_ef = true, *(char *)(lVar33 + 0x2300) == '\x01')) { uStack_ef = *(char *)(lVar33 + 0x2301) != cVar12; } *(char *)(lVar33 + 0x2300) = cVar11; *(char *)(lVar33 + 0x2301) = cVar12; *(undefined4 *)(lVar33 + 0x22d0) = 0; uStack_118 = *(undefined8 *)(lVar33 + 0x22d8); local_160.0_8 = lVar33 + 0x2310; local_a0 = *(undefined4 *)(lVar33 + 0x2304); lVar22 = *(long *)(lVar33 + 0x22a0); local_d0 = (undefined4)lVar22; plVar23 = (long )(lVar33 + 0x22c0); if ((long *)*plVar23 != plVar23) { plVar28 = (long *)*plVar23; do { ((code **)((long *)plVar28[5] + 0x40))((long *)plVar28[5],local_160); plVar24 = (long )plVar28[2]; if ((char *)((long)plVar24 + 0x19) == '\0') { plVar28 = (long *)plVar24; if ((char *)((long)plVar28 + 0x19) == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; while (cVar11 == '\0') { cVar11 = *(char *)(*plVar28 + 0x19); plVar24 = plVar28; plVar28 = (long *)*plVar28; } } } else { do { plVar24 = (long )plVar28[1]; if ((char *)((long)plVar24 + 0x19) != '\0') break; bVar39 = plVar28 == (long *)plVar24[2]; plVar28 = plVar24; } while (bVar39); } plVar28 = plVar24; } while (plVar24 != plVar23); lVar33 = *(long *)(param_1 + 0x36a8); lVar22 = *(long )(lVar33 + 0x22a0); } if (lVar22 != 0) { FUN_004255e0(lVar33 + 0x20,local_160,lVar33 + 0x22c0); if (lVar22 * 0x8a0 != 0x8a0) { lVar33 = lVar33 + 0x8c0; lVar22 = lVar22 * 0x8a0 + -0x8a0; do { FUN_004255e0(lVar33,local_160,(long *)(param_1 + 0x36a8) + 0x22c0); lVar33 = lVar33 + 0x8a0; lVar22 = lVar22 + -0x8a0; } while (lVar22 != 0); } lVar33 = *(long *)(param_1 + 0x36a8); } ((code )((long **)(lVar33 + 0x22d8) + 0x20))((long **)(lVar33 + 0x22d8),local_160); } lVar33 = param_1 + 14000; if ((long *)(param_1 + 0x36c0) != 0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { lVar22 = eh_1f3f80(puVar34,"event"); uVar19 = *(undefined8 *)(lVar22 + 8); cVar11 = FUN_00b831c0(uVar19,"ready"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"interior"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"switch"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.start"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.end"); if (cVar11 == '\0') { cVar11 = FUN_00b831c0(uVar19,"motion.error"); if (cVar11 == '\0') { ((code )((long **)(param_1 + 0x36c0) + 0x28)) ((long **)(param_1 + 0x36c0),puVar34); goto LAB_0042c563; } uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025dabf0(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1c0,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1c0; } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025da020(lVar33,uVar16); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_1a8,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_1a8; } } else { uVar19 = eh_1f3f80(puVar34,"window"); uVar16 = FUN_003e8a80(uVar19,0); uVar19 = eh_1f3f80(puVar34,&DAT_049a4400); FUN_004e6530(&local_80,uVar19); FUN_025d9470(lVar33,uVar16,&local_80); if (0xf < local_68) { uVar37 = local_68 + 1; puVar32 = local_80; if (0xfff < uVar37) { puVar32 = *(undefined **)(local_80 + -8); uVar37 = local_68 + 0x28; } operator.delete(puVar32,uVar37); } FUN_00b86810(local_190,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_190; } } else { cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),&DAT_049bf7ab); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,&DAT_049bf7ab); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x18))(plVar23,uVar16); } cVar11 = FUN_003eff80(puVar34,(undefined8 *)(puVar34 + 2),"target"); if (cVar11 != '\0') { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"target"); uVar16 = FUN_003e8a80(uVar19,0); ((code **)(*plVar23 + 0x20))(plVar23,uVar16); } FUN_00b86810(local_178,CONCAT53(uStack_10d,uStack_110),puVar34); puVar31 = local_178; } eh_1f5800(puVar31); } else { uVar19 = eh_1f3f80(puVar34,"valid"); uVar13 = FUN_003f4230(uVar19,0); *(undefined1 *)(param_1 + 0x375c) = uVar13; } } else { plVar23 = *(long )(param_1 + 0x36c0); uVar19 = eh_1f3f80(puVar34,"value"); uVar13 = FUN_003f4230(uVar19,0); ((code **)(*plVar23 + 0x10))(plVar23,uVar13); } LAB_0042c563: } } if (local_c8 != (undefined4 *)0x0) { puVar35 = (undefined4 *)CONCAT44(uStack_bc,uStack_c0); for (puVar34 = local_c8; puVar34 != puVar35; puVar34 = puVar34 + 6) { eh_1f5800(puVar34); } uVar37 = lStack_b8 - (long)local_c8; puVar35 = local_c8; if (0xfff < uVar37) { puVar35 = (undefined4 )(local_c8 + -2); uVar37 = uVar37 + 0x27; } operator.delete(puVar35,uVar37); } uStack_f8 = 0; uStack_f7 = 0; uStack_f6 = 0; local_160.12_4 = 0; local_160.0_12 = ZEXT812(0); uStack_118 = 0; plStack_128 = (long *)0x0; uStack_f4 = 0; uStack_f0 = 0; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; lStack_130 = *(undefined8 *)(param_1 + 0x3650); plStack_150 = (long *)(undefined8 )(param_1 + 0x3648); plStack_148 = (long )(undefined8 *)(param_1 + 0x346c8); uStack_110 = (undefined3)lVar29; uStack_10d = (undefined5)((ulong)lVar29 >> 0x18); lVar22 = *(long *)(param_1 + 0x36a8); local_140 = lVar21; plStack_138 = plVar5; local_120 = (undefined4 *)lVar33; dStack_108 = dVar43; uStack_100 = uVar20; if (0 < *(int *)(lVar22 + 0x22a0)) { uVar20 = ((code **)((long *)(lVar22 + 0x20) + 0x18))(lVar22 + 0x20,0); local_160.8_8 = uVar20; } if ((DAT_067d1460 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_067d1460), iVar14 != 0)) { FUN_0097bf90(); __cxa_atexit(FUN_02f3c550,&DAT_067d1338,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_067d1460); } fVar42 = (float)FUN_0042e5e0(&DAT_067d1338,1,&local_80); puVar38 = (uint *)0x0; uStack_f8 = *(float *)(param_1 + 0x2f7e8) < fVar42; uStack_f7 = *(undefined1 *)(param_1 + 0x2f7e1); if (fVar42 <= *(float *)(param_1 + 0x2f7e8)) { uStack_f7 = 0; } *(float *)(param_1 + 0x2f7e8) = fVar42; *(undefined1 *)(param_1 + 0x2f7e1) = local_80.0_1; lVar21 = FUN_0042e050(&DAT_067d1338,0); if (lVar21 != 0) { if (DAT_067d1348 == 0) { fVar42 = 0.0; } else { local_80 = (undefined *)((ulong)local_80 & 0xffffffff00000000); FUN_0042e990(DAT_067d1348,0,&local_80); fVar42 = local_80.0_4 * 1000.0; } puVar27 = *(uint **)(lVar21 + 0x20); if ((puVar27 == *(uint **)(lVar21 + 0x28)) || (fVar42 < (float)*puVar27)) { puVar38 = (uint *)0x0; } else { do { puVar38 = puVar27; puVar27 = puVar38 + 4; if (puVar27 == *(uint **)(lVar21 + 0x28)) break; } while ((float)*puVar27 <= fVar42); uStack_f6 = *(uint )(param_1 + 0x2f7f0) != puVar38; uVar1 = *(undefined2 *)((long)puVar38 + 10); auVar44.2_2 = uVar1; auVar44.0_2 = uVar1; auVar44.4_2 = uVar1; auVar44.6_2 = uVar1; auVar44.8_2 = uVar1; auVar44.10_2 = uVar1; auVar44.12_2 = uVar1; auVar44.14_2 = uVar1; auVar44 = vpand_avx(auVar44,_DAT_046faf40); uStack_f4 = auVar44.0_4; uStack_f0 = (undefined1)puVar38[1]; uStack_ef = 0; uStack_ee = 0; uStack_ed = 0; } } plStack_128 = (long *)(param_1 + 0x37a0); (uint **)(param_1 + 0x2f7f0) = puVar38; local_160.0_8 = param_1 + 0x3780; if ((char )(param_1 + 0x2f7e0) == '\x01') { FUN_02383210((undefined8 *)(param_1 + 0x3790),local_160); } if ((DAT_06ba7900 == '\0') && (iVar14 = __cxa_guard_acquire(&DAT_06ba7900), iVar14 != 0)) { FUN_00b7f380(&DAT_06ba73a0); __cxa_atexit(FUN_02854f30,&DAT_06ba73a0,&PTR_LOOP_05790000); __cxa_guard_release(&DAT_06ba7900); } auVar9 = _local_160; local_160.0_8 = lVar33; auVar10 = _local_160; plStack_148 = auVar9.24_8; local_160 = auVar10.0_16; plStack_150 = plVar5; local_160.8_8 = lVar29; switch(DAT_06ba7488) { case 1: goto LAB_0042c932; case 2: FUN_028560f0(lVar29,plVar5); break; case 3: FUN_02856180(lVar33,lVar29); break; case 4: FUN_02856410(lVar29); break; case 5: FUN_028564e0(local_160); break; case 6: FUN_02856ac0(local_160); break; case 7: uVar20 = 1; goto LAB_0042c927; case 8: uVar20 = 0; LAB_0042c927: FUN_02856d80(local_160,uVar20); goto LAB_0042c932; case 9: FUN_02856e40(local_160); LAB_0042c932: FUN_02855110(local_160); } lVar21 = ((code )(plVar5 + 0xa8))(); if (lVar21 < 1) { if ((char *)(param_1 + 0x9a8d2) == '\0') { fVar42 = *(float *)(param_1 + 0x9a910); } else { fVar42 = 0.0; } if (1.0 <= fVar42) { fVar42 = 1.0; } lVar21 = (long)(fVar42 * (float)lVar21); } else { plVar23 = (long *)((code )(*plVar5 + 0xb0))(); iVar14 = ((code )(plVar23 + 0x30))(plVar23); lVar21 = (long)iVar14 - (long)(int )((long )((long )(param_1 + 0x346e8) + 8) + 0xd0); } eh_fb2a0((undefined4 *)(param_1 + 0x9f074),param_1 + 0x9a980,lVar21); bVar39 = false; lVar21 = *(long )((long )((long )(param_1 + 0x34620) + 0xc0) + (long)(int )((long )(param_1 + 0x34620) + 0xe0) * 0x10); if (((char )(lVar21 + 0x130374) == '\x01') && ((long *)(lVar21 + 0x1302e0) != 0)) { bVar39 = *(int *)(lVar21 + 0x130340) == 6; } uVar20 = *(undefined8 *)(lVar30 + 8); iVar14 = ((code **)(*plVar5 + 0x28))(); auVar9 = _local_160; local_160.2_6 = 0; local_160.0_2 = (ushort)iVar14; stack0xfffffffffffffea8 = auVar9.8_24; if (0 < iVar14) { iVar15 = 0; lVar30 = *in_FS_OFFSET; LAB_0042cc88: plVar23 = *(long )(lVar30 + -0x98); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { puVar36 = (undefined8 *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((puVar36 + 9 <= (undefined8 *)plVar28[2]) && (plVar28[1] = (long)(puVar36 + 9), puVar36 != (undefined8 *)0x0)) goto LAB_0042ccd3; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar36 = (undefined8 *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[1] = puVar26 + 3; puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < puVar36 + 9) || (puVar26[1] = puVar36 + 9, puVar36 == (undefined8 *)0x0)) { puVar36 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x48,8); } goto LAB_0042ccd3; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); } LAB_0042cfdd: eh_42ba0(local_160); FUN_0042d710(param_1 + 0x9a660,param_1 + 0x34810); cVar11 = ((code )(*plVar5 + 0x10))(); if (cVar11 == '\0' || *(long *)(param_1 + 0x3660) == 0) goto LAB_0042bb57; uVar18 = ((code **)(*plVar5 + 0x30))(); auVar44 = in_ZMM3.0_16; uVar17 = 0xffffffff; if (0 < (int)uVar18) { lVar30 = 8; uVar37 = 0; do { lVar21 = *(long )(param_1 + 0x3660); uVar17 = (uint)uVar37; if ((((0x2f < uVar37) || (((uint )(lVar21 + 0x668 + (uVar37 >> 5) * 4) >> (uVar17 & 0x1f) & 1) == 0)) && (lVar29 = (long)(char *)(lVar21 + 0x608 + uVar37), -1 < lVar29)) && ((plVar5 = *(long )(lVar30 + lVar21 + lVar29 * 8), plVar5 != (long *)0x0 && (cVar11 = ((code )(*plVar5 + 0x250))(plVar5), cVar11 != '\0')))) { cVar11 = ((code **)(plVar5 + 0x1f8))(plVar5); auVar44 = in_ZMM3.0_16; if (cVar11 == '\0') break; } auVar44 = in_ZMM3.0_16; uVar37 = uVar37 + 1; lVar30 = lVar30 + 0x20; uVar17 = 0xffffffff; } while (uVar18 != uVar37); } if ((((long *)(param_1 + 0x3660) == 0) || (lVar30 = *(long )((long *)(param_1 + 0x3660) + 0x678), (int)uVar17 < 0 || lVar30 == 0)) || (plVar5 = *(long **)(lVar30 + 8), (int)plVar5[1] <= (int)uVar17)) { LAB_0042d0e2: _DAT_067100f0 = 0.0; _DAT_067100f4 = 0; _DAT_067100f8 = 0; _DAT_067100fc = 0; DAT_06710100 = 0; DAT_06710104.0_1 = 0; DAT_06710104.3_1 = 1; DAT_06710104.1_1 = '\0'; } else { lVar30 = plVar5; if ((long *)(lVar30 + 0x4b70 + (ulong)uVar17 * 0x4f50) == 0) goto LAB_0042d0e2; auVar46[8] = 0x15; auVar46.0_8 = 0x1515151515151515; auVar46[9] = 0x15; auVar46[10] = 0x15; auVar46[0xb] = 0x15; auVar46[0xc] = 0x15; auVar46[0xd] = 0x15; auVar46[0xe] = 0x15; auVar46[0xf] = 0x15; auVar7 = vpcmpeqd_avx(auVar44,auVar44); lVar30 = *(long *)(lVar30 + (ulong)uVar17 * 0x4f50 + 0x4b88); _DAT_067100f0 = *(float *)(lVar30 + 0x360) + *(float *)(lVar30 + 0x564); _DAT_067100f4 = *(undefined4 *)(lVar30 + 0x100c); _DAT_067100f8 = *(undefined4 *)(lVar30 + 0x1000); _DAT_067100fc = *(undefined4 *)(lVar30 + 0xffc); DAT_06710100 = *(undefined4 *)(lVar30 + 0x10b0); DAT_06710104.0_1 = *(undefined1 *)(lVar30 + 0x10d0); DAT_06710104.3_1 = *(byte *)(lVar30 + 9) >> 2 & 1; bVar2 = *(byte *)(lVar30 + 0x2fb); bVar3 = *(byte *)(lVar30 + 0x4ff); auVar44 = vpinsrb_avx(ZEXT116(bVar2),(uint)bVar3,1); auVar45 = vpinsrb_avx(ZEXT116(bVar2),(uint)(bVar2 & 0xfe),1); bVar2 = *(byte *)(lVar30 + 0x703); bVar4 = *(byte *)(lVar30 + 0x907); auVar45 = vpinsrb_avx(auVar45,(uint)bVar3,2); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar3 & 0xfe),3); auVar44 = vpinsrb_avx(auVar44,(uint)bVar2,2); auVar45 = vpinsrb_avx(auVar45,(uint)bVar2,4); auVar48 = vpinsrb_avx(auVar44,(uint)bVar4,3); auVar44 = vpmaxub_avx(auVar48,auVar46); auVar44 = vpcmpeqb_avx(auVar48,auVar44); auVar48 = vpmovzxbd_avx(auVar48); auVar45 = vpinsrb_avx(auVar45,(uint)(bVar2 & 0xfe),5); auVar47.8_4 = 0x100402; auVar47.0_8 = 0x10040200100402; auVar47.12_4 = 0x100402; auVar45 = vpinsrb_avx(auVar45,(uint)bVar4,6); auVar44 = vpmovsxbd_avx(auVar44 ^ auVar7); auVar7 = vpinsrb_avx(auVar45,(uint)(bVar4 & 0xfe),7); auVar45 = vpsrlvd_avx2(auVar47,auVar48); auVar48.8_8 = 0x204020402040204; auVar48.0_8 = 0x204020402040204; auVar44 = vpand_avx(auVar44,auVar45); auVar45 = vpslld_avx(auVar44,0x1f); auVar44 = vpcmpeqb_avx(auVar7,auVar48); DAT_06710104.1_1 = '\x01'; if ((((SUB161(auVar45 >> 0x1f,0) & 1) == 0 && (SUB161(auVar45 >> 0x3f,0) & 1) == 0) && (SUB161(auVar45 >> 0x5f,0) & 1) == 0) && -1 < auVar45[0xf]) { DAT_06710104.1_1 = ((((((((SUB161(auVar44 >> 7,0) & 1) != 0 || (SUB161(auVar44 >> 0xf,0) & 1) != 0) || (SUB161(auVar44 >> 0x17,0) & 1) != 0) || (SUB161(auVar44 >> 0x1f,0) & 1) != 0) || (SUB161(auVar44 >> 0x27,0) & 1) != 0) || (SUB161(auVar44 >> 0x2f,0) & 1) != 0) || (SUB161(auVar44 >> 0x37,0) & 1) != 0) || (SUB161(auVar44 >> 0x3f,0) & 1) != 0) * '\x02'; } } DAT_06710104.2_1 = DAT_066ea385; local_160.8_8 = &LAB_0298bb50; local_160.0_8 = &PTR_FUN_0546e2b0; plStack_128 = (long *)local_160; lVar30 = *(long *)(param_1 + 0xb98); plVar5 = (long *)(lVar30 + 0x5a0); if (plVar5 == (long *)local_160) { FUN_0042d400(local_160,0); goto LAB_0042bb57; } plVar23 = *(long )(lVar30 + 0x5d8); if (plVar23 != (long *)0x0) { ((code **)(*plVar23 + 0x20))(plVar23,plVar23 != plVar5); *(undefined8 *)(lVar30 + 0x5d8) = 0; if (plStack_128 == (long *)0x0) goto LAB_0042bb57; if (plStack_128 != (long *)local_160) { *(long )(lVar30 + 0x5d8) = plStack_128; goto LAB_0042bb57; } } uVar20 = ((code )(*plStack_128 + 8))(plStack_128,plVar5); *(undefined8 *)(lVar30 + 0x5d8) = uVar20; if (plStack_128 != (long *)0x0) { ((code **)(*plStack_128 + 0x20))(plStack_128,plStack_128 != (long )local_160); } LAB_0042bb57: if (___stack_chk_guard != local_60) { / WARNING: Subroutine does not return */ __stack_chk_fail(); } return; LAB_0042ccd3: *puVar36 = &DAT_0546e0b8; puVar36[1] = param_1; *(int *)(puVar36 + 2) = iVar15; *(float *)((long)puVar36 + 0x14) = fVar41; puVar36[3] = param_1 + 0x34740; puVar36[4] = plVar5; puVar36[5] = param_1 + 0x36a0; puVar36[6] = uVar20; *(bool *)(puVar36 + 7) = bVar39; LOCK(); *(int *)(*plVar23 + 0x10) = *(int *)(*plVar23 + 0x10) + 1; UNLOCK(); plVar28 = (long *)plVar23[2]; do { if (plVar28 != (long *)0x0) { plVar24 = (long *)(plVar28[1] + 7U & 0xfffffffffffffff8); if ((plVar24 + 3 <= (long *)plVar28[2]) && (plVar28[1] = (long)(plVar24 + 3), plVar24 != (long *)0x0)) break; } lVar21 = *plVar23; uVar37 = *(ulong *)(lVar21 + 0x28); do { if (uVar37 < 0x10000) { plVar23[2] = 0; puVar26 = (undefined8 )eh_dc670((undefined8 *)(*plVar23 + 8),0x10000,8); *puVar26 = 0; puVar26[1] = puVar26 + 3; plVar24 = (long *)((long)puVar26 + 0x1fU & 0xfffffffffffffff8); puVar26[2] = puVar26 + 0x2000; plVar23[2] = (long)puVar26; if ((puVar26 + 0x2000 < plVar24 + 3) || (puVar26[1] = plVar24 + 3, plVar24 == (long *)0x0)) { plVar24 = (long )eh_dc670((undefined8 *)(*plVar23 + 8),0x18,8); } goto LAB_0042cd5b; } plVar28 = (long *)((long)uVar37 >> 0x10); puVar6 = (ulong *)(lVar21 + 0x28); LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { *puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | *plVar28 << 0x10; uVar25 = uVar37; } UNLOCK(); uVar37 = uVar25; } while (!bVar40); plVar23[2] = (long)plVar28; } while( true ); LAB_0042cd5b: lVar21 = plVar23[1]; *plVar24 = *plVar23; plVar24[1] = lVar21; plVar24[2] = 0; puVar36[8] = plVar24; puVar6 = (ulong *)plVar23[1]; lVar21 = DAT_06c12440; if (puVar6 != (ulong *)0x0) { uVar37 = *puVar6; do { LOCK(); uVar25 = *puVar6; bVar40 = uVar37 == uVar25; if (bVar40) { puVar6 = (ulong)((int)uVar37 + 1U & 0xffff) | uVar37 & 0xffffffffffff0000; uVar25 = uVar37; } UNLOCK(); lVar21 = DAT_06c12440; uVar37 = uVar25; } while (!bVar40); } do { LOCK(); bVar40 = lVar21 != DAT_06c12440; lVar29 = lVar21 + 1; if (bVar40) { lVar21 = DAT_06c12440; lVar29 = DAT_06c12440; } DAT_06c12440 = lVar29; UNLOCK(); } while (bVar40); uVar37 = (ulong)((uint)lVar21 & 0x3ff); uVar8 = (ushort)((uint)lVar21 >> 9); while ((ushort *)(&DAT_06c12480 + uVar37 * 2) != (uVar8 & 0xfffe)) { nidf_libc_0xf75f5a605191bff9(); } *(undefined1 **)(&DAT_06c13c80 + uVar37 * 0x18) = &LAB_019038f0; *(undefined8 **)(&DAT_06c13c88 + uVar37 * 0x18) = puVar36; *(undefined1 **)(&DAT_06c13c90 + uVar37 * 0x18) = local_160; *(ushort *)(&DAT_06c12480 + uVar37 * 2) = uVar8 | 1; uVar17 = DAT_06c25cc0; do { if ((short)uVar17 < 1) goto LAB_0042cc7a; LOCK(); bVar40 = uVar17 != DAT_06c25cc0; uVar18 = uVar17 - 1 & 0xffff | uVar17 & 0xffff0000; if (bVar40) { uVar17 = DAT_06c25cc0; uVar18 = DAT_06c25cc0; } DAT_06c25cc0 = uVar18; UNLOCK(); } while (bVar40); LOCK(); _DAT_06c25d00 = _DAT_06c25d00 + 1; UNLOCK(); if (DAT_06c25d08 != 0) { if (DAT_06c25d08 < 2) { nidf_libc_0x4e94ff1a958ba44a(); } else { nidf_libc_0x052e6e6b37016bf9(&DAT_06c25d00,1); } } LAB_0042cc7a: iVar15 = iVar15 + 1; if (iVar15 == iVar14) goto LAB_0042cfdd; goto LAB_0042cc88; }

Dr.Binary

You're right to call it out — yes, we've been circling, and that's on me for not forcing a status check earlier. Let me stop, level with you, and lock in what you actually have.

The honest state of affairs

What's proven and working today (via your cheat tool, base = 0x400000):

  • Replay seek/mark: write frame to 0x6FA7498, then 7 to 0x6FA7488 → jump to that frame (7 with 0 = restart — what you saw)
  • Debug camera state machine is live in release mode; 8 = disable transition
  • Car camera state field found (car+0x130340, 6 = bumper, selection×4 values) and the selection byte at +0xE8 from it

What we never got: a "cycle cameras" increment — because after exhaustively mapping every writer, the truth is GT7 has no camera counter to patch. The View button works through the command layer with per-car camera data, not a counter. And the free-camera reward at the end of this tunnel requires a PS5 payload (resolve scene → cars → write states on hotkey), which means: tracing the scene global through a few more call layers, then actually building and loading a payload. That's a real project — not something more pastes of this function will shortcut. Pasting FUN_0042bb00 again can't answer it; the answer is either the write-test (30 seconds, no Ghidra) or a payload development effort.

Your deliverable — everything we learned, saved

Let me put the whole session's findings into a reference file you keep:

write_file

Saved everything to GT7_camera_RE_notes.md — every offset, field, function, and recipe from this whole session in one reference you keep.

Where this leaves you — the honest fork

Option A — use what works today (zero further effort): Replay scrubbing/rewind via 0x6FA7498 + 0x6FA7488 = 7, using your cheat tool. Re-scan the car's camera-state address each session and poke values into it manually. Real, works, but manual.

Option B — the 30-second test that's still never been done: In a race, write 8, 0xC, 0x10, 0x14 to your found camera-state address. If any show a different camera, you have a one-address camera cycle and I'll spec the hotkey payload immediately. This is the single highest-value action left, and it needs no Ghidra.

Option C — the payload project (the "real" debug camera): Trace the scene global (2–3 more caller levels from 0x2985107), then build a PS5 payload that resolves scene → cars → cycles car+0x130340 on hotkey. Doable, but it's development work — a weekend, not a patch. The notes file has the full recipe for when/if you want to attempt it.

My genuine advice: do Option B before anything else. It's been asked for several rounds and never run — and its result determines whether C is even worth building. If the writes do nothing, we know the director overwrites the state every frame and the payload must call the camera manager's +0x20 instead — which changes the design. If they do work, you're one small payload away from the mod you started this session for.

Whatever you decide — the notes file means none of this knowledge is lost. Good hunting. 🏁