{"type": "func", "start": 6443230656, "end": 6443230820, "name": "sub_1800BE5C0", "pseudocode": "// \n// sub_1800BE5C0 from 0x1800be5c0 to 0x1800be664 (164 bytes)\n// \n// 2 xrefs:\n// > _cfltcvt_init @ 0x1800be6c6\n// > <???> @ 0x1801fd89c\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:02 +0000\n// \n\n__int64 __fastcall sub_1800BE5C0(__int64 *a1)\n{\n  __int64 v1; // rbx\n  int v3; // esi\n  __int64 result; // rax\n  __int64 v5; // r9\n  int v6; // ecx\n  __int64 v7; // r8\n  __int64 v8; // rdx\n  int v9; // [rsp+30h] [rbp+8h] BYREF\n\n  v1 = *a1;\n  v3 = 0;\n  v9 = 0;\n  result = sub_1800C1770(&v9);\n  if ( !(_DWORD)result )\n  {\n    v6 = v9 - *(_DWORD *)(v1 + 12);\n    v7 = *(unsigned int *)(v1 + 4);\n    *(_DWORD *)(v1 + 12) = v9;\n    if ( v6 <= 1000 )\n      v3 = v6;\n    v8 = (unsigned int)(*(_DWORD *)v1 * v3 / 1000);\n    *(_DWORD *)(v1 + 20) += v8;\n    if ( *(_DWORD *)(v1 + 20) - *(_DWORD *)(v1 + 16) >= (int)v7 )\n    {\n      result = ((__int64 (__fastcall *)(__int64 *, _QWORD))a1[1])(a1, *(_QWORD *)(v1 + 24));\n      if ( !(_DWORD)result )\n      {\n        *(_DWORD *)(v1 + 16) += *(_DWORD *)(v1 + 4);\n        return 0;\n      }\n    }\n    else\n    {\n      FMOD_OS_Time_Sleep(*(unsigned int *)(v1 + 8), v8, v7, v5);\n      return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_1800BE5C0 from 0x1800be5c0 to 0x1800be664 (164 bytes)\n; \n; 2 xrefs:\n; > _cfltcvt_init @ 0x1800be6c6\n; > <???> @ 0x1801fd89c\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:02 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800be5c0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800be5c5\npush    rdi                                                            ; +0xa, 0x1800be5ca\nsub     rsp, 20h                                                       ; +0xb, 0x1800be5cb\nmov     rbx, [rcx]                                                     ; +0xf, 0x1800be5cf\nmov     rdi, rcx                                                       ; +0x12, 0x1800be5d2\nxor     esi, esi                                                       ; +0x15, 0x1800be5d5\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x17, 0x1800be5d7\nmov     [rsp+28h+arg_0], esi                                           ; +0x1c, 0x1800be5dc\ncall    sub_1800C1770                                                  ; +0x20, 0x1800be5e0\ntest    eax, eax                                                       ; +0x25, 0x1800be5e5\njnz     short loc_1800BE654                                            ; +0x27, 0x1800be5e7\nmov     eax, [rsp+28h+arg_0]                                           ; +0x29, 0x1800be5e9\nmov     ecx, eax                                                       ; +0x2d, 0x1800be5ed\nsub     ecx, [rbx+0Ch]                                                 ; +0x2f, 0x1800be5ef\nmov     r8d, [rbx+4]                                                   ; +0x32, 0x1800be5f2\ncmp     ecx, 3E8h                                                      ; +0x36, 0x1800be5f6\nmov     [rbx+0Ch], eax                                                 ; +0x3c, 0x1800be5fc\nmov     eax, 10624DD3h                                                 ; +0x3f, 0x1800be5ff\ncmovle  esi, ecx                                                       ; +0x44, 0x1800be604\nimul    esi, [rbx]                                                     ; +0x47, 0x1800be607\nimul    esi                                                            ; +0x4a, 0x1800be60a\nsar     edx, 6                                                         ; +0x4c, 0x1800be60c\nmov     eax, edx                                                       ; +0x4f, 0x1800be60f\nshr     eax, 1Fh                                                       ; +0x51, 0x1800be611\nadd     edx, eax                                                       ; +0x54, 0x1800be614\nadd     [rbx+14h], edx                                                 ; +0x56, 0x1800be616\nmov     eax, [rbx+14h]                                                 ; +0x59, 0x1800be619\nsub     eax, [rbx+10h]                                                 ; +0x5c, 0x1800be61c\ncmp     eax, r8d                                                       ; +0x5f, 0x1800be61f\njge     short loc_1800BE63E                                            ; +0x62, 0x1800be622\nmov     ecx, [rbx+8]                                                   ; +0x64, 0x1800be624\ncall    FMOD_OS_Time_Sleep                                             ; +0x67, 0x1800be627\nxor     eax, eax                                                       ; +0x6c, 0x1800be62c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x6e, 0x1800be62e\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x73, 0x1800be633\nadd     rsp, 20h                                                       ; +0x78, 0x1800be638\npop     rdi                                                            ; +0x7c, 0x1800be63c\nretn                                                                   ; +0x7d, 0x1800be63d\nmov     rdx, [rbx+18h]                                                 ; +0x7e, 0x1800be63e\nmov     rcx, rdi                                                       ; +0x82, 0x1800be642\ncall    qword ptr [rdi+8]                                              ; +0x85, 0x1800be645\ntest    eax, eax                                                       ; +0x88, 0x1800be648\njnz     short loc_1800BE654                                            ; +0x8a, 0x1800be64a\nmov     eax, [rbx+4]                                                   ; +0x8c, 0x1800be64c\nadd     [rbx+10h], eax                                                 ; +0x8f, 0x1800be64f\nxor     eax, eax                                                       ; +0x92, 0x1800be652\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x94, 0x1800be654\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x99, 0x1800be659\nadd     rsp, 20h                                                       ; +0x9e, 0x1800be65e\npop     rdi                                                            ; +0xa2, 0x1800be662\nretn                                                                   ; +0xa3, 0x1800be663", "xrefs": ["_cfltcvt_init @ 0x1800be6c6", "<???> @ 0x1801fd89c"], "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"}