{"type": "func", "start": 6443324080, "end": 6443324671, "name": "sub_1800D52B0", "pseudocode": "// \n// sub_1800D52B0 from 0x1800d52b0 to 0x1800d54ff (591 bytes)\n// \n// 5 xrefs:\n// > sub_180018DF0 @ 0x18001ba81\n// > sub_180026050 @ 0x180027208\n// > sub_1800364B0 @ 0x1800378fc\n// > sub_18003DB30 @ 0x18003f061\n// > <???> @ 0x1801fee80\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_1800D52B0(__int64 a1, int a2)\n{\n  unsigned int v4; // ebp\n  void *v5; // rax\n  int v6; // edx\n  __int64 v7; // r8\n  _QWORD *v8; // rcx\n  void *v9; // rax\n  int v10; // eax\n  int v11; // esi\n  __int64 v12; // r14\n  __int64 v13; // rdi\n  __int64 result; // rax\n  void *v15; // rax\n  __int64 v16; // r14\n  __int64 v17; // rsi\n  __int64 v18; // rdi\n  __int64 v19; // rcx\n  __int64 v20; // rcx\n\n  *(_DWORD *)(a1 + 1488) = a2;\n  v4 = 0;\n  v5 = sub_1800B6880(\n         *((_QWORD *)off_1801AED20 + 52),\n         (unsigned int)(200 * a2),\n         \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_music.cpp\",\n         597,\n         0);\n  *(_QWORD *)(a1 + 1496) = v5;\n  if ( !v5 )\n    return 38;\n  v6 = 0;\n  if ( *(int *)(a1 + 1488) > 0 )\n  {\n    v7 = 0;\n    do\n    {\n      ++v6;\n      v8 = (_QWORD *)(v7 + *(_QWORD *)(a1 + 1496));\n      v7 += 200;\n      v8[1] = v8;\n      *v8 = v8;\n      v8[2] = 0;\n    }\n    while ( v6 < *(_DWORD *)(a1 + 1488) );\n  }\n  *(_DWORD *)(a1 + 972) = 2 * a2;\n  v9 = sub_1800B6880(\n         *((_QWORD *)off_1801AED20 + 52),\n         (unsigned int)(1120 * a2),\n         \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_music.cpp\",\n         612,\n         0);\n  *(_QWORD *)(a1 + 1504) = v9;\n  if ( !v9 )\n    return 38;\n  v10 = *(_DWORD *)(a1 + 972);\n  v11 = 0;\n  if ( v10 <= 0 )\n  {\nLABEL_10:\n    v15 = sub_1800B6880(\n            *((_QWORD *)off_1801AED20 + 52),\n            (unsigned int)(784 * v10),\n            \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_music.cpp\",\n            625,\n            0);\n    *(_QWORD *)(a1 + 1512) = v15;\n    if ( v15 )\n    {\n      if ( *(int *)(a1 + 972) > 0 )\n      {\n        v16 = 0;\n        do\n        {\n          v17 = (int)v4;\n          v18 = 784LL * (int)v4;\n          sub_1800C7D90(v18 + *(_QWORD *)(a1 + 1512));\n          *(_QWORD *)(v16 + *(_QWORD *)(a1 + 1504) + 472) = v18 + *(_QWORD *)(a1 + 1512);\n          v19 = *(_QWORD *)(v16 + *(_QWORD *)(a1 + 1504) + 472);\n          (*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v19 + 16LL))(\n            v19,\n            v4,\n            *(_QWORD *)(a1 + 32),\n            *(_QWORD *)(*(_QWORD *)(a1 + 32) + 1648LL));\n          v16 += 560;\n          ++v4;\n          v20 = *(_QWORD *)(v16 + *(_QWORD *)(a1 + 1504) - 88);\n          *(_DWORD *)(v20 + 60) |= 0x10000u;\n          *(_QWORD *)(*(_QWORD *)(v16 + *(_QWORD *)(a1 + 1504) - 88) + 24LL) = *(_QWORD *)(a1 + 1504) + 560 * v17;\n        }\n        while ( (signed int)v4 < *(_DWORD *)(a1 + 972) );\n      }\n      return 0;\n    }\n    return 38;\n  }\n  v12 = 0;\n  while ( 1 )\n  {\n    v13 = 560LL * v11;\n    sub_1800CCB00(v13 + *(_QWORD *)(a1 + 1504));\n    result = sub_1800CDF70(v13 + *(_QWORD *)(a1 + 1504), v11, *(_QWORD *)(a1 + 32));\n    if ( (_DWORD)result )\n      return result;\n    ++v11;\n    *(_DWORD *)(v12 + *(_QWORD *)(a1 + 1504) + 548) = 1000;\n    v12 += 560;\n    v10 = *(_DWORD *)(a1 + 972);\n    if ( v11 >= v10 )\n      goto LABEL_10;\n  }\n}", "assembly": "; \n; sub_1800D52B0 from 0x1800d52b0 to 0x1800d54ff (591 bytes)\n; \n; 5 xrefs:\n; > sub_180018DF0 @ 0x18001ba81\n; > sub_180026050 @ 0x180027208\n; > sub_1800364B0 @ 0x1800378fc\n; > sub_18003DB30 @ 0x18003f061\n; > <???> @ 0x1801fee80\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, 0x1800d52b0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800d52b5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800d52ba\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x1800d52bf\npush    r14                                                            ; +0x14, 0x1800d52c4\nsub     rsp, 30h                                                       ; +0x16, 0x1800d52c6\nmov     [rcx+5D0h], edx                                                ; +0x1a, 0x1800d52ca\nlea     r8, aCBuildagent1Wo_56; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x20, 0x1800d52d0\nmov     rbx, rcx                                                       ; +0x27, 0x1800d52d7\nmov     edi, edx                                                       ; +0x2a, 0x1800d52da\nmov     rcx, cs:off_1801AED20                                          ; +0x2c, 0x1800d52dc\nxor     ebp, ebp                                                       ; +0x33, 0x1800d52e3\nimul    edx, 0C8h                                                      ; +0x35, 0x1800d52e5\nmov     r9d, 255h                                                      ; +0x3b, 0x1800d52eb\nmov     [rsp+38h+var_18], ebp                                          ; +0x41, 0x1800d52f1\nmov     rcx, [rcx+1A0h]                                                ; +0x45, 0x1800d52f5\ncall    sub_1800B6880                                                  ; +0x4c, 0x1800d52fc\nmov     [rbx+5D8h], rax                                                ; +0x51, 0x1800d5301\ntest    rax, rax                                                       ; +0x58, 0x1800d5308\njz      loc_1800D54DF                                                  ; +0x5b, 0x1800d530b\nmov     edx, ebp                                                       ; +0x61, 0x1800d5311\ncmp     [rbx+5D0h], edx                                                ; +0x63, 0x1800d5313\njle     short loc_1800D5346                                            ; +0x69, 0x1800d5319\nmov     r8d, ebp                                                       ; +0x6b, 0x1800d531b\nxchg    ax, ax                                                         ; +0x6e, 0x1800d531e\nmov     rcx, [rbx+5D8h]                                                ; +0x70, 0x1800d5320\ninc     edx                                                            ; +0x77, 0x1800d5327\nadd     rcx, r8                                                        ; +0x79, 0x1800d5329\nadd     r8, 0C8h                                                       ; +0x7c, 0x1800d532c\nmov     [rcx+8], rcx                                                   ; +0x83, 0x1800d5333\nmov     [rcx], rcx                                                     ; +0x87, 0x1800d5337\nmov     [rcx+10h], rbp                                                 ; +0x8a, 0x1800d533a\ncmp     edx, [rbx+5D0h]                                                ; +0x8e, 0x1800d533e\njl      short loc_1800D5320                                            ; +0x94, 0x1800d5344\nlea     eax, [rdi+rdi]                                                 ; +0x96, 0x1800d5346\nmov     [rsp+38h+var_18], ebp                                          ; +0x99, 0x1800d5349\nmov     [rbx+3CCh], eax                                                ; +0x9d, 0x1800d534d\nlea     r8, aCBuildagent1Wo_56; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0xa3, 0x1800d5353\nmov     rcx, cs:off_1801AED20                                          ; +0xaa, 0x1800d535a\nmov     r9d, 264h                                                      ; +0xb1, 0x1800d5361\nimul    edx, eax, 230h                                                 ; +0xb7, 0x1800d5367\nmov     rcx, [rcx+1A0h]                                                ; +0xbd, 0x1800d536d\ncall    sub_1800B6880                                                  ; +0xc4, 0x1800d5374\nmov     [rbx+5E0h], rax                                                ; +0xc9, 0x1800d5379\ntest    rax, rax                                                       ; +0xd0, 0x1800d5380\njz      loc_1800D54DF                                                  ; +0xd3, 0x1800d5383\nmov     eax, [rbx+3CCh]                                                ; +0xd9, 0x1800d5389\nmov     esi, ebp                                                       ; +0xdf, 0x1800d538f\ntest    eax, eax                                                       ; +0xe1, 0x1800d5391\njle     short loc_1800D53FC                                            ; +0xe3, 0x1800d5393\nmov     r14, rbp                                                       ; +0xe5, 0x1800d5395\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xe8, 0x1800d5398\nmov     rcx, [rbx+5E0h]                                                ; +0xf0, 0x1800d53a0\nmovsxd  rax, esi                                                       ; +0xf7, 0x1800d53a7\nimul    rdi, rax, 230h                                                 ; +0xfa, 0x1800d53aa\nadd     rcx, rdi                                                       ; +0x101, 0x1800d53b1\ncall    sub_1800CCB00                                                  ; +0x104, 0x1800d53b4\nmov     rcx, [rbx+5E0h]                                                ; +0x109, 0x1800d53b9\nmov     edx, esi                                                       ; +0x110, 0x1800d53c0\nmov     r8, [rbx+20h]                                                  ; +0x112, 0x1800d53c2\nadd     rcx, rdi                                                       ; +0x116, 0x1800d53c6\ncall    sub_1800CDF70                                                  ; +0x119, 0x1800d53c9\ntest    eax, eax                                                       ; +0x11e, 0x1800d53ce\njnz     loc_1800D54E4                                                  ; +0x120, 0x1800d53d0\nmov     rax, [rbx+5E0h]                                                ; +0x126, 0x1800d53d6\ninc     esi                                                            ; +0x12d, 0x1800d53dd\nmov     dword ptr [r14+rax+224h], 3E8h                                 ; +0x12f, 0x1800d53df\nadd     r14, 230h                                                      ; +0x13b, 0x1800d53eb\nmov     eax, [rbx+3CCh]                                                ; +0x142, 0x1800d53f2\ncmp     esi, eax                                                       ; +0x148, 0x1800d53f8\njl      short loc_1800D53A0                                            ; +0x14a, 0x1800d53fa\nmov     rcx, cs:off_1801AED20                                          ; +0x14c, 0x1800d53fc\nlea     r8, aCBuildagent1Wo_56; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x153, 0x1800d5403\nimul    edx, eax, 310h                                                 ; +0x15a, 0x1800d540a\nmov     r9d, 271h                                                      ; +0x160, 0x1800d5410\nmov     [rsp+38h+var_18], ebp                                          ; +0x166, 0x1800d5416\nmov     rcx, [rcx+1A0h]                                                ; +0x16a, 0x1800d541a\ncall    sub_1800B6880                                                  ; +0x171, 0x1800d5421\nmov     [rbx+5E8h], rax                                                ; +0x176, 0x1800d5426\ntest    rax, rax                                                       ; +0x17d, 0x1800d542d\njz      loc_1800D54DF                                                  ; +0x180, 0x1800d5430\ncmp     [rbx+3CCh], ebp                                                ; +0x186, 0x1800d5436\njle     loc_1800D54DB                                                  ; +0x18c, 0x1800d543c\nmov     r14, rbp                                                       ; +0x192, 0x1800d5442\nmov     rcx, [rbx+5E8h]                                                ; +0x195, 0x1800d5445\nmovsxd  rsi, ebp                                                       ; +0x19c, 0x1800d544c\nimul    rdi, rsi, 310h                                                 ; +0x19f, 0x1800d544f\nadd     rcx, rdi                                                       ; +0x1a6, 0x1800d5456\ncall    sub_1800C7D90                                                  ; +0x1a9, 0x1800d5459\nmov     rax, [rbx+5E0h]                                                ; +0x1ae, 0x1800d545e\nmov     edx, ebp                                                       ; +0x1b5, 0x1800d5465\nmov     rcx, [rbx+5E8h]                                                ; +0x1b7, 0x1800d5467\nadd     rcx, rdi                                                       ; +0x1be, 0x1800d546e\nmov     [r14+rax+1D8h], rcx                                            ; +0x1c1, 0x1800d5471\nmov     rax, [rbx+5E0h]                                                ; +0x1c9, 0x1800d5479\nmov     r8, [rbx+20h]                                                  ; +0x1d0, 0x1800d5480\nmov     rcx, [r14+rax+1D8h]                                            ; +0x1d4, 0x1800d5484\nmov     r9, [r8+670h]                                                  ; +0x1dc, 0x1800d548c\nmov     rax, [rcx]                                                     ; +0x1e3, 0x1800d5493\ncall    qword ptr [rax+10h]                                            ; +0x1e6, 0x1800d5496\nmov     rax, [rbx+5E0h]                                                ; +0x1e9, 0x1800d5499\nlea     r14, [r14+230h]                                                ; +0x1f0, 0x1800d54a0\ninc     ebp                                                            ; +0x1f7, 0x1800d54a7\nmov     rcx, [r14+rax-58h]                                             ; +0x1f9, 0x1800d54a9\nor      dword ptr [rcx+3Ch], 10000h                                    ; +0x1fe, 0x1800d54ae\nmov     rax, [rbx+5E0h]                                                ; +0x205, 0x1800d54b5\nimul    rcx, rsi, 230h                                                 ; +0x20c, 0x1800d54bc\nadd     rcx, rax                                                       ; +0x213, 0x1800d54c3\nmov     rax, [r14+rax-58h]                                             ; +0x216, 0x1800d54c6\nmov     [rax+18h], rcx                                                 ; +0x21b, 0x1800d54cb\ncmp     ebp, [rbx+3CCh]                                                ; +0x21f, 0x1800d54cf\njl      loc_1800D5445                                                  ; +0x225, 0x1800d54d5\nxor     eax, eax                                                       ; +0x22b, 0x1800d54db\njmp     short loc_1800D54E4                                            ; +0x22d, 0x1800d54dd\nmov     eax, 26h ; '&'                                                 ; +0x22f, 0x1800d54df\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x234, 0x1800d54e4\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x239, 0x1800d54e9\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x23e, 0x1800d54ee\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x243, 0x1800d54f3\nadd     rsp, 30h                                                       ; +0x248, 0x1800d54f8\npop     r14                                                            ; +0x24c, 0x1800d54fc\nretn                                                                   ; +0x24e, 0x1800d54fe", "xrefs": ["sub_180018DF0 @ 0x18001ba81", "sub_180026050 @ 0x180027208", "sub_1800364B0 @ 0x1800378fc", "sub_18003DB30 @ 0x18003f061", "<???> @ 0x1801fee80"], "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"}