{"type": "func", "start": 6443320608, "end": 6443320747, "name": "sub_1800D4520", "pseudocode": "// \n// sub_1800D4520 from 0x1800d4520 to 0x1800d45ab (139 bytes)\n// \n// 2 xrefs:\n// > sub_1800E69E0 @ 0x1800e6a5a\n// > <???> @ 0x1801fed9c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall sub_1800D4520(__int64 a1)\n{\n  __int64 result; // rax\n  struct _RTL_CRITICAL_SECTION *v4; // rcx\n  struct _RTL_CRITICAL_SECTION *v5; // rcx\n  struct _RTL_CRITICAL_SECTION *v6; // rcx\n\n  if ( (*(_DWORD *)a1)-- != 1 )\n    return 0;\n  result = sub_1800C7170();\n  if ( !(_DWORD)result )\n  {\n    result = sub_1800B3C40();\n    if ( !(_DWORD)result )\n    {\n      result = sub_1800C13E0();\n      if ( !(_DWORD)result )\n      {\n        v4 = *(struct _RTL_CRITICAL_SECTION **)(a1 + 296);\n        if ( v4 )\n        {\n          FMOD_OS_CriticalSection_Free(v4, 0);\n          *(_QWORD *)(a1 + 296) = 0;\n        }\n        v5 = *(struct _RTL_CRITICAL_SECTION **)(a1 + 288);\n        if ( v5 )\n        {\n          FMOD_OS_CriticalSection_Free(v5, 0);\n          *(_QWORD *)(a1 + 288) = 0;\n        }\n        v6 = *(struct _RTL_CRITICAL_SECTION **)(a1 + 280);\n        if ( v6 )\n        {\n          FMOD_OS_CriticalSection_Free(v6, 0);\n          *(_QWORD *)(a1 + 280) = 0;\n        }\n        return 0;\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_1800D4520 from 0x1800d4520 to 0x1800d45ab (139 bytes)\n; \n; 2 xrefs:\n; > sub_1800E69E0 @ 0x1800e6a5a\n; > <???> @ 0x1801fed9c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbx                                                            ; +0x0, 0x1800d4520\nsub     rsp, 20h                                                       ; +0x2, 0x1800d4522\nsub     dword ptr [rcx], 1                                             ; +0x6, 0x1800d4526\nmov     rbx, rcx                                                       ; +0x9, 0x1800d4529\njnz     short loc_1800D45A3                                            ; +0xc, 0x1800d452c\ncall    sub_1800C7170                                                  ; +0xe, 0x1800d452e\ntest    eax, eax                                                       ; +0x13, 0x1800d4533\njnz     short loc_1800D45A5                                            ; +0x15, 0x1800d4535\ncall    sub_1800B3C40                                                  ; +0x17, 0x1800d4537\ntest    eax, eax                                                       ; +0x1c, 0x1800d453c\njnz     short loc_1800D45A5                                            ; +0x1e, 0x1800d453e\ncall    sub_1800C13E0                                                  ; +0x20, 0x1800d4540\ntest    eax, eax                                                       ; +0x25, 0x1800d4545\njnz     short loc_1800D45A5                                            ; +0x27, 0x1800d4547\nmov     rcx, [rbx+128h]; lpCriticalSection                             ; +0x29, 0x1800d4549\ntest    rcx, rcx                                                       ; +0x30, 0x1800d4550\njz      short loc_1800D4567                                            ; +0x33, 0x1800d4553\nxor     edx, edx                                                       ; +0x35, 0x1800d4555\ncall    FMOD_OS_CriticalSection_Free                                   ; +0x37, 0x1800d4557\nmov     qword ptr [rbx+128h], 0                                        ; +0x3c, 0x1800d455c\nmov     rcx, [rbx+120h]; lpCriticalSection                             ; +0x47, 0x1800d4567\ntest    rcx, rcx                                                       ; +0x4e, 0x1800d456e\njz      short loc_1800D4585                                            ; +0x51, 0x1800d4571\nxor     edx, edx                                                       ; +0x53, 0x1800d4573\ncall    FMOD_OS_CriticalSection_Free                                   ; +0x55, 0x1800d4575\nmov     qword ptr [rbx+120h], 0                                        ; +0x5a, 0x1800d457a\nmov     rcx, [rbx+118h]; lpCriticalSection                             ; +0x65, 0x1800d4585\ntest    rcx, rcx                                                       ; +0x6c, 0x1800d458c\njz      short loc_1800D45A3                                            ; +0x6f, 0x1800d458f\nxor     edx, edx                                                       ; +0x71, 0x1800d4591\ncall    FMOD_OS_CriticalSection_Free                                   ; +0x73, 0x1800d4593\nmov     qword ptr [rbx+118h], 0                                        ; +0x78, 0x1800d4598\nxor     eax, eax                                                       ; +0x83, 0x1800d45a3\nadd     rsp, 20h                                                       ; +0x85, 0x1800d45a5\npop     rbx                                                            ; +0x89, 0x1800d45a9\nretn                                                                   ; +0x8a, 0x1800d45aa", "xrefs": ["sub_1800E69E0 @ 0x1800e6a5a", "<???> @ 0x1801fed9c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}