{"type": "func", "start": 6443229552, "end": 6443229894, "name": "sub_1800BE170", "pseudocode": "// \n// sub_1800BE170 from 0x1800be170 to 0x1800be2c6 (342 bytes)\n// \n// 4 xrefs:\n// > sub_1800E4E00 @ 0x1800e56aa\n// > <???> @ 0x18018a308\n// > <???> @ 0x18018a328\n// > <???> @ 0x1801fd848\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_1800BE170(_QWORD *a1, int a2)\n{\n  __int64 result; // rax\n  unsigned int v5; // ebx\n  void *v6; // rax\n  __int64 v7; // rax\n  void *v8; // rax\n  __int64 i; // rsi\n  _QWORD *v10; // rdi\n\n  if ( !a1[9] )\n    return 67;\n  if ( !a2 )\n    return 0;\n  v5 = 0;\n  v6 = sub_1800B6530(\n         *((_QWORD *)off_1801AED20 + 52),\n         32,\n         \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_emulated.cpp\",\n         65,\n         0,\n         0,\n         1);\n  if ( !v6 )\n  {\n    a1[8] = 0;\n    return 38;\n  }\n  v7 = sub_1800D0B60(v6);\n  a1[8] = v7;\n  if ( !v7 )\n    return 38;\n  result = sub_1800D0D00(v7, a1[9], a1, (unsigned int)a2);\n  if ( (_DWORD)result )\n    return result;\n  v8 = sub_1800B6880(\n         *((_QWORD *)off_1801AED20 + 52),\n         (unsigned int)(112 * a2),\n         \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_emulated.cpp\",\n         77,\n         0);\n  a1[131] = v8;\n  if ( !v8 )\n    return 38;\n  if ( a2 <= 0 )\n    return 0;\n  for ( i = 0; ; i += 112 )\n  {\n    v10 = (_QWORD *)(i + a1[131]);\n    sub_1800C79A0(v10);\n    *v10 = off_18016BB98;\n    result = sub_1800D0E50(a1[8], v5, a1[131] + 112LL * (int)v5);\n    if ( (_DWORD)result )\n      break;\n    if ( (int)++v5 >= a2 )\n      return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_1800BE170 from 0x1800be170 to 0x1800be2c6 (342 bytes)\n; \n; 4 xrefs:\n; > sub_1800E4E00 @ 0x1800e56aa\n; > <???> @ 0x18018a308\n; > <???> @ 0x18018a328\n; > <???> @ 0x1801fd848\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\npush    rbp                                                            ; +0x0, 0x1800be170\npush    r14                                                            ; +0x2, 0x1800be172\nsub     rsp, 48h                                                       ; +0x4, 0x1800be174\ncmp     qword ptr [rcx+48h], 0                                         ; +0x8, 0x1800be178\nmov     r14d, edx                                                      ; +0xd, 0x1800be17d\nmov     rbp, rcx                                                       ; +0x10, 0x1800be180\njnz     short loc_1800BE192                                            ; +0x13, 0x1800be183\nmov     eax, 43h ; 'C'                                                 ; +0x15, 0x1800be185\nadd     rsp, 48h                                                       ; +0x1a, 0x1800be18a\npop     r14                                                            ; +0x1e, 0x1800be18e\npop     rbp                                                            ; +0x20, 0x1800be190\nretn                                                                   ; +0x21, 0x1800be191\nmov     [rsp+58h+arg_0], rbx                                           ; +0x22, 0x1800be192\nmov     [rsp+58h+arg_8], rsi                                           ; +0x27, 0x1800be197\nmov     [rsp+58h+arg_10], rdi                                          ; +0x2c, 0x1800be19c\nmov     [rsp+58h+var_18], r15                                          ; +0x31, 0x1800be1a1\ntest    r14d, r14d                                                     ; +0x36, 0x1800be1a6\njz      loc_1800BE29D                                                  ; +0x39, 0x1800be1a9\nmov     rcx, cs:off_1801AED20                                          ; +0x3f, 0x1800be1af\nlea     r8, aCBuildagent1Wo_39; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x46, 0x1800be1b6\nxor     ebx, ebx                                                       ; +0x4d, 0x1800be1bd\nmov     [rsp+58h+var_28], 1                                            ; +0x4f, 0x1800be1bf\nmov     [rsp+58h+var_30], 0                                            ; +0x54, 0x1800be1c4\nmov     [rsp+58h+var_38], ebx                                          ; +0x59, 0x1800be1c9\nmov     rcx, [rcx+1A0h]                                                ; +0x5d, 0x1800be1cd\nlea     r9d, [rbx+41h]                                                 ; +0x64, 0x1800be1d4\nlea     edx, [rbx+20h]                                                 ; +0x68, 0x1800be1d8\ncall    sub_1800B6530                                                  ; +0x6b, 0x1800be1db\ntest    rax, rax                                                       ; +0x70, 0x1800be1e0\njz      loc_1800BE2BB                                                  ; +0x73, 0x1800be1e3\nmov     rcx, rax                                                       ; +0x79, 0x1800be1e9\ncall    sub_1800D0B60                                                  ; +0x7c, 0x1800be1ec\nmov     [rbp+40h], rax                                                 ; +0x81, 0x1800be1f1\ntest    rax, rax                                                       ; +0x85, 0x1800be1f5\njz      loc_1800BE2BF                                                  ; +0x88, 0x1800be1f8\nmov     rdx, [rbp+48h]                                                 ; +0x8e, 0x1800be1fe\nmov     r9d, r14d                                                      ; +0x92, 0x1800be202\nmov     r8, rbp                                                        ; +0x95, 0x1800be205\nmov     rcx, rax                                                       ; +0x98, 0x1800be208\ncall    sub_1800D0D00                                                  ; +0x9b, 0x1800be20b\ntest    eax, eax                                                       ; +0xa0, 0x1800be210\njnz     loc_1800BE29F                                                  ; +0xa2, 0x1800be212\nmov     rcx, cs:off_1801AED20                                          ; +0xa8, 0x1800be218\nlea     r9d, [rbx+4Dh]                                                 ; +0xaf, 0x1800be21f\nimul    edx, r14d, 70h ; 'p'                                           ; +0xb3, 0x1800be223\nlea     r8, aCBuildagent1Wo_39; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0xb7, 0x1800be227\nmov     [rsp+58h+var_38], ebx                                          ; +0xbe, 0x1800be22e\nmov     rcx, [rcx+1A0h]                                                ; +0xc2, 0x1800be232\ncall    sub_1800B6880                                                  ; +0xc9, 0x1800be239\nmov     [rbp+418h], rax                                                ; +0xce, 0x1800be23e\ntest    rax, rax                                                       ; +0xd5, 0x1800be245\njz      short loc_1800BE2BF                                            ; +0xd8, 0x1800be248\ntest    r14d, r14d                                                     ; +0xda, 0x1800be24a\njle     short loc_1800BE29D                                            ; +0xdd, 0x1800be24d\nmov     esi, ebx                                                       ; +0xdf, 0x1800be24f\nlea     r15, off_18016BB98                                             ; +0xe1, 0x1800be251\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xe8, 0x1800be258\nmov     rdi, [rbp+418h]                                                ; +0xf0, 0x1800be260\nadd     rdi, rsi                                                       ; +0xf7, 0x1800be267\nmov     rcx, rdi                                                       ; +0xfa, 0x1800be26a\ncall    sub_1800C79A0                                                  ; +0xfd, 0x1800be26d\nmov     [rdi], r15                                                     ; +0x102, 0x1800be272\nmov     edx, ebx                                                       ; +0x105, 0x1800be275\nmov     rcx, [rbp+40h]                                                 ; +0x107, 0x1800be277\nmovsxd  rax, ebx                                                       ; +0x10b, 0x1800be27b\nimul    r8, rax, 70h ; 'p'                                             ; +0x10e, 0x1800be27e\nadd     r8, [rbp+418h]                                                 ; +0x112, 0x1800be282\ncall    sub_1800D0E50                                                  ; +0x119, 0x1800be289\ntest    eax, eax                                                       ; +0x11e, 0x1800be28e\njnz     short loc_1800BE29F                                            ; +0x120, 0x1800be290\ninc     ebx                                                            ; +0x122, 0x1800be292\nadd     rsi, 70h ; 'p'                                                 ; +0x124, 0x1800be294\ncmp     ebx, r14d                                                      ; +0x128, 0x1800be298\njl      short loc_1800BE260                                            ; +0x12b, 0x1800be29b\nxor     eax, eax                                                       ; +0x12d, 0x1800be29d\nmov     rdi, [rsp+58h+arg_10]                                          ; +0x12f, 0x1800be29f\nmov     rsi, [rsp+58h+arg_8]                                           ; +0x134, 0x1800be2a4\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x139, 0x1800be2a9\nmov     r15, [rsp+58h+var_18]                                          ; +0x13e, 0x1800be2ae\nadd     rsp, 48h                                                       ; +0x143, 0x1800be2b3\npop     r14                                                            ; +0x147, 0x1800be2b7\npop     rbp                                                            ; +0x149, 0x1800be2b9\nretn                                                                   ; +0x14a, 0x1800be2ba\nmov     [rbp+40h], rbx                                                 ; +0x14b, 0x1800be2bb\nmov     eax, 26h ; '&'                                                 ; +0x14f, 0x1800be2bf\njmp     short loc_1800BE29F                                            ; +0x154, 0x1800be2c4", "xrefs": ["sub_1800E4E00 @ 0x1800e56aa", "<???> @ 0x18018a308", "<???> @ 0x18018a328", "<???> @ 0x1801fd848"], "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"}