{"type": "func", "start": 6443574256, "end": 6443574362, "name": "sub_1801123F0", "pseudocode": "// \n// sub_1801123F0 from 0x1801123f0 to 0x18011245a (106 bytes)\n// \n// 5 xrefs:\n// > sub_180111EE0 @ 0x180111f18\n// > sub_180111F40 @ 0x180111f7c\n// > sub_1801122A0 @ 0x180112371\n// > sub_1801122A0 @ 0x1801123ae\n// > <???> @ 0x180201c10\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_1801123F0(__int64 a1)\n{\n  struct _RTL_CRITICAL_SECTION *v1; // rbp\n  int v3; // ebx\n  unsigned int v4; // esi\n\n  v1 = *(struct _RTL_CRITICAL_SECTION **)(a1 + 32);\n  FMOD_OS_CriticalSection_Enter(v1);\n  if ( *(int *)(a1 + 60) <= 0 )\n  {\nLABEL_6:\n    v4 = 0;\n  }\n  else\n  {\n    v3 = 0;\n    while ( 1 )\n    {\n      v4 = sub_1800C14F0(*(void **)(a1 + 48));\n      if ( v4 )\n        break;\n      if ( ++v3 >= *(_DWORD *)(a1 + 60) )\n      {\n        *(_DWORD *)(a1 + 60) = 0;\n        goto LABEL_6;\n      }\n    }\n  }\n  FMOD_OS_CriticalSection_Leave(v1);\n  return v4;\n}", "assembly": "; \n; sub_1801123F0 from 0x1801123f0 to 0x18011245a (106 bytes)\n; \n; 5 xrefs:\n; > sub_180111EE0 @ 0x180111f18\n; > sub_180111F40 @ 0x180111f7c\n; > sub_1801122A0 @ 0x180112371\n; > sub_1801122A0 @ 0x1801123ae\n; > <???> @ 0x180201c10\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1801123f0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1801123f5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1801123fa\npush    rdi                                                            ; +0xf, 0x1801123ff\nsub     rsp, 20h                                                       ; +0x10, 0x180112400\nmov     rbp, [rcx+20h]                                                 ; +0x14, 0x180112404\nmov     rdi, rcx                                                       ; +0x18, 0x180112408\nmov     rcx, rbp                                                       ; +0x1b, 0x18011240b\ncall    FMOD_OS_CriticalSection_Enter                                  ; +0x1e, 0x18011240e\ncmp     dword ptr [rdi+3Ch], 0                                         ; +0x23, 0x180112413\njle     short loc_180112439                                            ; +0x27, 0x180112417\nxor     ebx, ebx                                                       ; +0x29, 0x180112419\nnop     dword ptr [rax+rax+00h]                                        ; +0x2b, 0x18011241b\nmov     rcx, [rdi+30h]                                                 ; +0x30, 0x180112420\ncall    sub_1800C14F0                                                  ; +0x34, 0x180112424\nmov     esi, eax                                                       ; +0x39, 0x180112429\ntest    eax, eax                                                       ; +0x3b, 0x18011242b\njnz     short loc_18011243B                                            ; +0x3d, 0x18011242d\ninc     ebx                                                            ; +0x3f, 0x18011242f\ncmp     ebx, [rdi+3Ch]                                                 ; +0x41, 0x180112431\njl      short loc_180112420                                            ; +0x44, 0x180112434\nmov     [rdi+3Ch], eax                                                 ; +0x46, 0x180112436\nxor     esi, esi                                                       ; +0x49, 0x180112439\nmov     rcx, rbp                                                       ; +0x4b, 0x18011243b\ncall    FMOD_OS_CriticalSection_Leave                                  ; +0x4e, 0x18011243e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x53, 0x180112443\nmov     eax, esi                                                       ; +0x58, 0x180112448\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x5a, 0x18011244a\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x5f, 0x18011244f\nadd     rsp, 20h                                                       ; +0x64, 0x180112454\npop     rdi                                                            ; +0x68, 0x180112458\nretn                                                                   ; +0x69, 0x180112459", "xrefs": ["sub_180111EE0 @ 0x180111f18", "sub_180111F40 @ 0x180111f7c", "sub_1801122A0 @ 0x180112371", "sub_1801122A0 @ 0x1801123ae", "<???> @ 0x180201c10"], "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"}