{"type": "func", "start": 6443230320, "end": 6443230645, "name": "sub_1800BE470", "pseudocode": "// \n// sub_1800BE470 from 0x1800be470 to 0x1800be5b5 (325 bytes)\n// \n// 2 xrefs:\n// > _cfltcvt_init @ 0x1800be69c\n// > <???> @ 0x1801fd890\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_1800BE470(\n        _QWORD *a1,\n        __int64 a2,\n        __int64 a3,\n        int *a4,\n        _DWORD *a5,\n        _DWORD *a6,\n        _DWORD *a7,\n        unsigned int a8)\n{\n  __int64 v10; // rbx\n  _DWORD *v11; // rax\n  _DWORD *v12; // rdi\n  int v13; // ecx\n  unsigned __int64 v14; // r8\n  int v15; // edx\n  void *v16; // rax\n\n  if ( !*a5 )\n  {\n    *a5 = 3;\n    *a6 = 2;\n  }\n  v10 = 32;\n  v11 = sub_1800B6880(\n          *((_QWORD *)off_1801AED20 + 52),\n          32,\n          \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_nosound.cpp\",\n          67,\n          0);\n  *a1 = v11;\n  v12 = v11;\n  if ( !v11 )\n    return 38;\n  v13 = *a4;\n  LODWORD(v14) = a8;\n  *v11 = *a4;\n  v11[1] = a8;\n  v15 = (int)(1000 * a8) / v13 / 3;\n  if ( v15 < 1 )\n    v15 = 1;\n  v11[2] = v15;\n  switch ( *a7 )\n  {\n    case 1:\n      v10 = 8;\n      break;\n    case 2:\n      v10 = 16;\n      break;\n    case 3:\n      v10 = 24;\n      break;\n    default:\n      if ( (unsigned int)(*a7 - 4) > 1 )\n        goto LABEL_15;\n      break;\n  }\n  v14 = (v10 * (unsigned __int64)a8) >> 3;\nLABEL_15:\n  v16 = sub_1800B6880(\n          *((_QWORD *)off_1801AED20 + 52),\n          (unsigned int)(v14 * *a6),\n          \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_nosound.cpp\",\n          84,\n          0);\n  *((_QWORD *)v12 + 3) = v16;\n  if ( v16 )\n    return 0;\n  return 38;\n}", "assembly": "; \n; sub_1800BE470 from 0x1800be470 to 0x1800be5b5 (325 bytes)\n; \n; 2 xrefs:\n; > _cfltcvt_init @ 0x1800be69c\n; > <???> @ 0x1801fd890\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_0], rbx                                               ; +0x0, 0x1800be470\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800be475\nmov     [rsp+arg_10], rdi                                              ; +0xa, 0x1800be47a\nmov     [rsp+arg_18], r14                                              ; +0xf, 0x1800be47f\npush    r15                                                            ; +0x14, 0x1800be484\nsub     rsp, 30h                                                       ; +0x16, 0x1800be486\nmov     rax, [rsp+38h+arg_20]                                          ; +0x1a, 0x1800be48a\nmov     r15, r9                                                        ; +0x1f, 0x1800be48f\nmov     rsi, [rsp+38h+arg_28]                                          ; +0x22, 0x1800be492\nmov     r14, rcx                                                       ; +0x27, 0x1800be497\ncmp     dword ptr [rax], 0                                             ; +0x2a, 0x1800be49a\njnz     short loc_1800BE4AB                                            ; +0x2d, 0x1800be49d\nmov     dword ptr [rax], 3                                             ; +0x2f, 0x1800be49f\nmov     dword ptr [rsi], 2                                             ; +0x35, 0x1800be4a5\nmov     rcx, cs:off_1801AED20                                          ; +0x3b, 0x1800be4ab\nlea     r8, aCBuildagent1Wo_40; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x42, 0x1800be4b2\nmov     ebx, 20h ; ' '                                                 ; +0x49, 0x1800be4b9\nmov     [rsp+38h+var_18], 0                                            ; +0x4e, 0x1800be4be\nmov     r9d, 43h ; 'C'                                                 ; +0x56, 0x1800be4c6\nmov     edx, ebx                                                       ; +0x5c, 0x1800be4cc\nmov     rcx, [rcx+1A0h]                                                ; +0x5e, 0x1800be4ce\ncall    sub_1800B6880                                                  ; +0x65, 0x1800be4d5\nmov     [r14], rax                                                     ; +0x6a, 0x1800be4da\nmov     rdi, rax                                                       ; +0x6d, 0x1800be4dd\ntest    rax, rax                                                       ; +0x70, 0x1800be4e0\njz      loc_1800BE595                                                  ; +0x73, 0x1800be4e3\nmov     ecx, [r15]                                                     ; +0x79, 0x1800be4e9\nmov     r8d, [rsp+38h+arg_38]                                          ; +0x7c, 0x1800be4ec\nmov     [rax], ecx                                                     ; +0x81, 0x1800be4f1\nmov     [rax+4], r8d                                                   ; +0x83, 0x1800be4f3\nimul    eax, r8d, 3E8h                                                 ; +0x87, 0x1800be4f7\ncdq                                                                    ; +0x8e, 0x1800be4fe\nidiv    ecx                                                            ; +0x8f, 0x1800be4ff\nmov     ecx, eax                                                       ; +0x91, 0x1800be501\nmov     eax, 55555556h                                                 ; +0x93, 0x1800be503\nimul    ecx                                                            ; +0x98, 0x1800be508\nmov     rcx, [rsp+38h+arg_30]                                          ; +0x9a, 0x1800be50a\nmov     eax, edx                                                       ; +0x9f, 0x1800be50f\nshr     eax, 1Fh                                                       ; +0xa1, 0x1800be511\nadd     edx, eax                                                       ; +0xa4, 0x1800be514\nmov     eax, 1                                                         ; +0xa6, 0x1800be516\ncmp     edx, eax                                                       ; +0xab, 0x1800be51b\ncmovl   edx, eax                                                       ; +0xad, 0x1800be51d\nmov     [rdi+8], edx                                                   ; +0xb0, 0x1800be520\nmov     edx, [rcx]                                                     ; +0xb3, 0x1800be523\nmov     r10d, [rsi]                                                    ; +0xb5, 0x1800be525\nsub     edx, eax                                                       ; +0xb8, 0x1800be528\njz      short loc_1800BE54C                                            ; +0xba, 0x1800be52a\nsub     edx, eax                                                       ; +0xbc, 0x1800be52c\njz      short loc_1800BE545                                            ; +0xbe, 0x1800be52e\nsub     edx, eax                                                       ; +0xc0, 0x1800be530\njz      short loc_1800BE53E                                            ; +0xc2, 0x1800be532\nsub     edx, eax                                                       ; +0xc4, 0x1800be534\njz      short loc_1800BE551                                            ; +0xc6, 0x1800be536\ncmp     edx, eax                                                       ; +0xc8, 0x1800be538\njnz     short loc_1800BE559                                            ; +0xca, 0x1800be53a\njmp     short loc_1800BE551                                            ; +0xcc, 0x1800be53c\nmov     ebx, 18h                                                       ; +0xce, 0x1800be53e\njmp     short loc_1800BE551                                            ; +0xd3, 0x1800be543\nmov     ebx, 10h                                                       ; +0xd5, 0x1800be545\njmp     short loc_1800BE551                                            ; +0xda, 0x1800be54a\nmov     ebx, 8                                                         ; +0xdc, 0x1800be54c\nimul    r8, rbx                                                        ; +0xe1, 0x1800be551\nshr     r8, 3                                                          ; +0xe5, 0x1800be555\nmov     rcx, cs:off_1801AED20                                          ; +0xe9, 0x1800be559\nmov     r9d, 54h ; 'T'                                                 ; +0xf0, 0x1800be560\nimul    r10d, r8d                                                      ; +0xf6, 0x1800be566\nlea     r8, aCBuildagent1Wo_40; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0xfa, 0x1800be56a\nmov     [rsp+38h+var_18], 0                                            ; +0x101, 0x1800be571\nmov     rcx, [rcx+1A0h]                                                ; +0x109, 0x1800be579\nmov     edx, r10d                                                      ; +0x110, 0x1800be580\ncall    sub_1800B6880                                                  ; +0x113, 0x1800be583\nmov     [rdi+18h], rax                                                 ; +0x118, 0x1800be588\ntest    rax, rax                                                       ; +0x11c, 0x1800be58c\njz      short loc_1800BE595                                            ; +0x11f, 0x1800be58f\nxor     eax, eax                                                       ; +0x121, 0x1800be591\njmp     short loc_1800BE59A                                            ; +0x123, 0x1800be593\nmov     eax, 26h ; '&'                                                 ; +0x125, 0x1800be595\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x12a, 0x1800be59a\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x12f, 0x1800be59f\nmov     rdi, [rsp+38h+arg_10]                                          ; +0x134, 0x1800be5a4\nmov     r14, [rsp+38h+arg_18]                                          ; +0x139, 0x1800be5a9\nadd     rsp, 30h                                                       ; +0x13e, 0x1800be5ae\npop     r15                                                            ; +0x142, 0x1800be5b2\nretn                                                                   ; +0x144, 0x1800be5b4", "xrefs": ["_cfltcvt_init @ 0x1800be69c", "<???> @ 0x1801fd890"], "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"}