{"type": "func", "start": 6443207392, "end": 6443207516, "name": "sub_1800B8AE0", "pseudocode": "// \n// sub_1800B8AE0 from 0x1800b8ae0 to 0x1800b8b5c (124 bytes)\n// \n// 5 xrefs:\n// > sub_180102CA0 @ 0x180103160\n// > sub_180102CA0 @ 0x180103182\n// > <???> @ 0x180189ab8\n// > <???> @ 0x180189ac8\n// > <???> @ 0x1801fd32c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 10:54:00 +0000\n// \n\n__int64 __fastcall sub_1800B8AE0(__int64 a1, char a2)\n{\n  int v4; // eax\n  unsigned int v7; // eax\n  unsigned int v8; // ecx\n\n  if ( !*(_BYTE *)(a1 + 56) )\n    return 0;\n  if ( !a2 )\n  {\n    if ( (*(_DWORD *)(a1 + 52))-- == 1 )\n    {\n      FMOD_OS_Time_GetUs(a1 + 16);\n      v7 = *(_DWORD *)(a1 + 16);\n      v8 = *(_DWORD *)(a1 + 12);\n      if ( v7 > v8 )\n        *(_DWORD *)(a1 + 48) += v7 - v8;\n    }\n    *(_BYTE *)(a1 + 44) = a2;\n    return 0;\n  }\n  v4 = *(_DWORD *)(a1 + 52);\n  if ( !v4 )\n  {\n    FMOD_OS_Time_GetUs(a1 + 12);\n    v4 = *(_DWORD *)(a1 + 52);\n  }\n  *(_BYTE *)(a1 + 44) = a2;\n  *(_DWORD *)(a1 + 52) = v4 + 1;\n  return 0;\n}", "assembly": "; \n; sub_1800B8AE0 from 0x1800b8ae0 to 0x1800b8b5c (124 bytes)\n; \n; 5 xrefs:\n; > sub_180102CA0 @ 0x180103160\n; > sub_180102CA0 @ 0x180103182\n; > <???> @ 0x180189ab8\n; > <???> @ 0x180189ac8\n; > <???> @ 0x1801fd32c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 10:54:00 +0000\n; \nmov     [rsp+arg_8], rsi                                               ; +0x0, 0x1800b8ae0\npush    rdi                                                            ; +0x5, 0x1800b8ae5\nsub     rsp, 20h                                                       ; +0x6, 0x1800b8ae6\ncmp     byte ptr [rcx+38h], 0                                          ; +0xa, 0x1800b8aea\nmovzx   esi, dl                                                        ; +0xe, 0x1800b8aee\nmov     rdi, rcx                                                       ; +0x11, 0x1800b8af1\njz      short loc_1800B8B4F                                            ; +0x14, 0x1800b8af4\ntest    dl, dl                                                         ; +0x16, 0x1800b8af6\njz      short loc_1800B8B23                                            ; +0x18, 0x1800b8af8\nmov     eax, [rcx+34h]                                                 ; +0x1a, 0x1800b8afa\ntest    eax, eax                                                       ; +0x1d, 0x1800b8afd\njnz     short loc_1800B8B0D                                            ; +0x1f, 0x1800b8aff\nadd     rcx, 0Ch                                                       ; +0x21, 0x1800b8b01\ncall    FMOD_OS_Time_GetUs                                             ; +0x25, 0x1800b8b05\nmov     eax, [rdi+34h]                                                 ; +0x2a, 0x1800b8b0a\ninc     eax                                                            ; +0x2d, 0x1800b8b0d\nmov     [rdi+2Ch], sil                                                 ; +0x2f, 0x1800b8b0f\nmov     [rdi+34h], eax                                                 ; +0x33, 0x1800b8b13\nxor     eax, eax                                                       ; +0x36, 0x1800b8b16\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x38, 0x1800b8b18\nadd     rsp, 20h                                                       ; +0x3d, 0x1800b8b1d\npop     rdi                                                            ; +0x41, 0x1800b8b21\nretn                                                                   ; +0x42, 0x1800b8b22\nsub     dword ptr [rcx+34h], 1                                         ; +0x43, 0x1800b8b23\njnz     short loc_1800B8B4B                                            ; +0x47, 0x1800b8b27\nadd     rcx, 10h                                                       ; +0x49, 0x1800b8b29\nmov     [rsp+28h+arg_0], rbx                                           ; +0x4d, 0x1800b8b2d\ncall    FMOD_OS_Time_GetUs                                             ; +0x52, 0x1800b8b32\nmov     eax, [rdi+10h]                                                 ; +0x57, 0x1800b8b37\nmov     ecx, [rdi+0Ch]                                                 ; +0x5a, 0x1800b8b3a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x5d, 0x1800b8b3d\ncmp     eax, ecx                                                       ; +0x62, 0x1800b8b42\njbe     short loc_1800B8B4B                                            ; +0x64, 0x1800b8b44\nsub     eax, ecx                                                       ; +0x66, 0x1800b8b46\nadd     [rdi+30h], eax                                                 ; +0x68, 0x1800b8b48\nmov     [rdi+2Ch], sil                                                 ; +0x6b, 0x1800b8b4b\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x6f, 0x1800b8b4f\nxor     eax, eax                                                       ; +0x74, 0x1800b8b54\nadd     rsp, 20h                                                       ; +0x76, 0x1800b8b56\npop     rdi                                                            ; +0x7a, 0x1800b8b5a\nretn                                                                   ; +0x7b, 0x1800b8b5b", "xrefs": ["sub_180102CA0 @ 0x180103160", "sub_180102CA0 @ 0x180103182", "<???> @ 0x180189ab8", "<???> @ 0x180189ac8", "<???> @ 0x1801fd32c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}