{"type": "func", "start": 6443334720, "end": 6443334839, "name": "sub_1800D7C40", "pseudocode": "// \n// sub_1800D7C40 from 0x1800d7c40 to 0x1800d7cb7 (119 bytes)\n// \n// 2 xrefs:\n// > sub_1800E4480 @ 0x1800e44bd\n// > <???> @ 0x1801ff084\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:12 +0000\n// \n\n__int64 __fastcall sub_1800D7C40(__int64 a1, int a2, int a3, _DWORD *a4)\n{\n  __int64 v4; // rbx\n  __int64 v7; // rax\n\n  v4 = a3;\n  if ( a4 && a3 >= 0 )\n  {\n    v7 = sub_1800D7E40();\n    if ( v7 )\n    {\n      if ( (int)v4 < *(_DWORD *)v7 )\n      {\n        *a4 = *(_DWORD *)(*(_QWORD *)(v7 + 8) + 4 * v4);\n        return 0;\n      }\n    }\n    else if ( !(_DWORD)v4 )\n    {\n      *a4 = a2;\n      return 0;\n    }\n  }\n  return 31;\n}", "assembly": "; \n; sub_1800D7C40 from 0x1800d7c40 to 0x1800d7cb7 (119 bytes)\n; \n; 2 xrefs:\n; > sub_1800E4480 @ 0x1800e44bd\n; > <???> @ 0x1801ff084\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:12 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800d7c40\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800d7c45\npush    rdi                                                            ; +0xa, 0x1800d7c4a\nsub     rsp, 20h                                                       ; +0xb, 0x1800d7c4b\nmovsxd  rbx, r8d                                                       ; +0xf, 0x1800d7c4f\nmov     rsi, r9                                                        ; +0x12, 0x1800d7c52\nmov     edi, edx                                                       ; +0x15, 0x1800d7c55\ntest    r9, r9                                                         ; +0x17, 0x1800d7c57\njz      short loc_1800D7CA2                                            ; +0x1a, 0x1800d7c5a\ntest    r8d, r8d                                                       ; +0x1c, 0x1800d7c5c\njs      short loc_1800D7CA2                                            ; +0x1f, 0x1800d7c5f\ncall    sub_1800D7E40                                                  ; +0x21, 0x1800d7c61\ntest    rax, rax                                                       ; +0x26, 0x1800d7c66\njz      short loc_1800D7C8A                                            ; +0x29, 0x1800d7c69\ncmp     ebx, [rax]                                                     ; +0x2b, 0x1800d7c6b\njge     short loc_1800D7CA2                                            ; +0x2d, 0x1800d7c6d\nmov     rax, [rax+8]                                                   ; +0x2f, 0x1800d7c6f\nmov     edi, [rax+rbx*4]                                               ; +0x33, 0x1800d7c73\nxor     eax, eax                                                       ; +0x36, 0x1800d7c76\nmov     [rsi], edi                                                     ; +0x38, 0x1800d7c78\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x3a, 0x1800d7c7a\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x3f, 0x1800d7c7f\nadd     rsp, 20h                                                       ; +0x44, 0x1800d7c84\npop     rdi                                                            ; +0x48, 0x1800d7c88\nretn                                                                   ; +0x49, 0x1800d7c89\ntest    ebx, ebx                                                       ; +0x4a, 0x1800d7c8a\njnz     short loc_1800D7CA2                                            ; +0x4c, 0x1800d7c8c\nmov     [rsi], edi                                                     ; +0x4e, 0x1800d7c8e\nxor     eax, eax                                                       ; +0x50, 0x1800d7c90\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x52, 0x1800d7c92\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x57, 0x1800d7c97\nadd     rsp, 20h                                                       ; +0x5c, 0x1800d7c9c\npop     rdi                                                            ; +0x60, 0x1800d7ca0\nretn                                                                   ; +0x61, 0x1800d7ca1\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x62, 0x1800d7ca2\nmov     eax, 1Fh                                                       ; +0x67, 0x1800d7ca7\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x6c, 0x1800d7cac\nadd     rsp, 20h                                                       ; +0x71, 0x1800d7cb1\npop     rdi                                                            ; +0x75, 0x1800d7cb5\nretn                                                                   ; +0x76, 0x1800d7cb6", "xrefs": ["sub_1800E4480 @ 0x1800e44bd", "<???> @ 0x1801ff084"], "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"}