{"type": "func", "start": 6443013360, "end": 6443013739, "name": "sub_1800894F0", "pseudocode": "// \n// sub_1800894F0 from 0x1800894f0 to 0x18008966b (379 bytes)\n// \n// 16 xrefs:\n// > sub_180084AF0 @ 0x180084b41\n// > sub_180084AF0 @ 0x180084bfb\n// > sub_180084AF0 @ 0x180084cb0\n// > sub_180084AF0 @ 0x180084e21\n// > sub_180084AF0 @ 0x180084e4a\n// > sub_180084AF0 @ 0x180084ea4\n// > sub_180084AF0 @ 0x180084f32\n// > sub_180084AF0 @ 0x180084f94\n// > sub_1800850E0 @ 0x180085181\n// > sub_1800850E0 @ 0x180085254\n// > sub_180088990 @ 0x1800889c1\n// > sub_1800894C0 @ 0x1800894eb\n// > <???> @ 0x180145ae0\n// > <???> @ 0x180145af0\n// > <???> @ 0x1801bf94c\n// > <???> @ 0x1801bf958\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 11:22:05 +0000\n// \n\nvoid *__fastcall sub_1800894F0(__int64 a1, char *a2, size_t a3)\n{\n  __int64 v3; // r15\n  size_t v4; // r14\n  void *result; // rax\n  unsigned __int64 v8; // rax\n  _BYTE *v9; // rdx\n  __int64 v10; // rdi\n  __int64 v11; // rax\n\n  v3 = *(_QWORD *)(a1 + 10248);\n  v4 = a3;\n  if ( v3 + a3 > 0x800 )\n  {\n    sub_180083D00(a1, a1, *(_QWORD *)(a1 + 10248));\n    v3 = 0;\n    *(_QWORD *)(a1 + 10248) = 0;\n    if ( v4 > 0x800 )\n    {\n      if ( *(_DWORD *)(a1 + 10256) == 1 )\n        return (void *)(*(__int64 (__fastcall **)(_QWORD, char *, size_t))(**(_QWORD **)(a1 + 10240) + 8LL))(\n                         *(_QWORD *)(a1 + 10240),\n                         a2,\n                         v4);\n      do\n      {\n        v8 = 1;\n        v9 = a2 + 2047;\n        while ( (*v9 & 0xC0) == 0x80 )\n        {\n          ++v8;\n          --v9;\n          if ( v8 > 4 )\n          {\n            v10 = 2048;\n            goto LABEL_10;\n          }\n        }\n        v10 = 2048 - v8;\nLABEL_10:\n        if ( *(_DWORD *)(a1 + 10256) == 1 )\n        {\n          (*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 10240) + 8LL))(\n            *(_QWORD *)(a1 + 10240),\n            a2,\n            v10);\n        }\n        else\n        {\n          v11 = sub_180082E30(a1 + 2048, a1 + 2048, a1 + 2048, a1 + 2048, (__int64)a2, v10, *(_DWORD *)(a1 + 10256));\n          (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 10240) + 8LL))(\n            *(_QWORD *)(a1 + 10240),\n            a1 + 2048,\n            v11);\n        }\n        a2 += v10;\n        v4 -= v10;\n      }\n      while ( v4 > 0x800 );\n      *(_QWORD *)(a1 + 10248) = 0;\n    }\n  }\n  result = memcpy((void *)(v3 + a1), a2, v4);\n  *(_QWORD *)(a1 + 10248) += v4;\n  return result;\n}", "assembly": "; \n; sub_1800894F0 from 0x1800894f0 to 0x18008966b (379 bytes)\n; \n; 16 xrefs:\n; > sub_180084AF0 @ 0x180084b41\n; > sub_180084AF0 @ 0x180084bfb\n; > sub_180084AF0 @ 0x180084cb0\n; > sub_180084AF0 @ 0x180084e21\n; > sub_180084AF0 @ 0x180084e4a\n; > sub_180084AF0 @ 0x180084ea4\n; > sub_180084AF0 @ 0x180084f32\n; > sub_180084AF0 @ 0x180084f94\n; > sub_1800850E0 @ 0x180085181\n; > sub_1800850E0 @ 0x180085254\n; > sub_180088990 @ 0x1800889c1\n; > sub_1800894C0 @ 0x1800894eb\n; > <???> @ 0x180145ae0\n; > <???> @ 0x180145af0\n; > <???> @ 0x1801bf94c\n; > <???> @ 0x1801bf958\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 11:22:05 +0000\n; \nmov     [rsp+arg_10], rbp                                              ; +0x0, 0x1800894f0\npush    rsi                                                            ; +0x5, 0x1800894f5\npush    r14                                                            ; +0x6, 0x1800894f6\npush    r15                                                            ; +0x8, 0x1800894f8\nsub     rsp, 40h                                                       ; +0xa, 0x1800894fa\nmov     r15, [rcx+2808h]                                               ; +0xe, 0x1800894fe\nmov     r14, r8                                                        ; +0x15, 0x180089505\nmov     rbp, rdx                                                       ; +0x18, 0x180089508\nmov     rsi, rcx                                                       ; +0x1b, 0x18008950b\nlea     rax, [r15+r8]                                                  ; +0x1e, 0x18008950e\ncmp     rax, 800h                                                      ; +0x22, 0x180089512\njbe     loc_180089646                                                  ; +0x28, 0x180089518\nmov     r8, r15                                                        ; +0x2e, 0x18008951e\nmov     rdx, rcx                                                       ; +0x31, 0x180089521\ncall    sub_180083D00                                                  ; +0x34, 0x180089524\nxor     r15d, r15d                                                     ; +0x39, 0x180089529\nmov     [rsi+2808h], r15                                               ; +0x3c, 0x18008952c\ncmp     r14, 800h                                                      ; +0x43, 0x180089533\njbe     loc_180089646                                                  ; +0x4a, 0x18008953a\ncmp     dword ptr [rsi+2810h], 1                                       ; +0x50, 0x180089540\njnz     short loc_18008956B                                            ; +0x57, 0x180089547\nmov     rcx, [rsi+2800h]                                               ; +0x59, 0x180089549\nmov     r8, r14                                                        ; +0x60, 0x180089550\nmov     rdx, rbp                                                       ; +0x63, 0x180089553\nmov     rax, [rcx]                                                     ; +0x66, 0x180089556\nmov     rbp, [rsp+58h+arg_10]                                          ; +0x69, 0x180089559\nadd     rsp, 40h                                                       ; +0x6e, 0x18008955e\npop     r15                                                            ; +0x72, 0x180089562\npop     r14                                                            ; +0x74, 0x180089564\npop     rsi                                                            ; +0x76, 0x180089566\njmp     qword ptr [rax+8]                                              ; +0x77, 0x180089567\nmov     [rsp+58h+arg_8], rdi                                           ; +0x7b, 0x18008956b\nmov     [rsp+58h+arg_0], rbx                                           ; +0x80, 0x180089570\nnop     word ptr [rax+rax+00000000h]                                   ; +0x85, 0x180089575\nmov     eax, 1                                                         ; +0x90, 0x180089580\nlea     rdx, [rbp+7FFh]                                                ; +0x95, 0x180089585\nnop     dword ptr [rax+00h]                                            ; +0x9c, 0x18008958c\nmovzx   ecx, byte ptr [rdx]                                            ; +0xa0, 0x180089590\nand     cl, 0C0h                                                       ; +0xa3, 0x180089593\ncmp     cl, 80h                                                        ; +0xa6, 0x180089596\njnz     short loc_1800895AE                                            ; +0xa9, 0x180089599\ninc     rax                                                            ; +0xab, 0x18008959b\ndec     rdx                                                            ; +0xae, 0x18008959e\ncmp     rax, 4                                                         ; +0xb1, 0x1800895a1\njbe     short loc_180089590                                            ; +0xb5, 0x1800895a5\nmov     edi, 800h                                                      ; +0xb7, 0x1800895a7\njmp     short loc_1800895B8                                            ; +0xbc, 0x1800895ac\nmov     edi, 800h                                                      ; +0xbe, 0x1800895ae\nsub     rdi, rax                                                       ; +0xc3, 0x1800895b3\njz      short loc_180089622                                            ; +0xc6, 0x1800895b6\nmov     eax, [rsi+2810h]                                               ; +0xc8, 0x1800895b8\ncmp     eax, 1                                                         ; +0xce, 0x1800895be\njnz     short loc_1800895D8                                            ; +0xd1, 0x1800895c1\nmov     rcx, [rsi+2800h]                                               ; +0xd3, 0x1800895c3\nmov     r8, rdi                                                        ; +0xda, 0x1800895ca\nmov     rdx, rbp                                                       ; +0xdd, 0x1800895cd\nmov     rax, [rcx]                                                     ; +0xe0, 0x1800895d0\ncall    qword ptr [rax+8]                                              ; +0xe3, 0x1800895d3\njmp     short loc_180089622                                            ; +0xe6, 0x1800895d6\nmov     [rsp+58h+var_28], eax                                          ; +0xe8, 0x1800895d8\nlea     r9, [rsi+800h]                                                 ; +0xec, 0x1800895dc\nmov     [rsp+58h+var_30], rdi                                          ; +0xf3, 0x1800895e3\nlea     r8, [rsi+800h]                                                 ; +0xf8, 0x1800895e8\nlea     rdx, [rsi+800h]                                                ; +0xff, 0x1800895ef\nmov     [rsp+58h+var_38], rbp                                          ; +0x106, 0x1800895f6\nlea     rcx, [rsi+800h]                                                ; +0x10b, 0x1800895fb\ncall    sub_180082E30                                                  ; +0x112, 0x180089602\nmov     rcx, [rsi+2800h]                                               ; +0x117, 0x180089607\nlea     rdx, [rsi+800h]                                                ; +0x11e, 0x18008960e\nmov     r8, [rcx]                                                      ; +0x125, 0x180089615\nmov     r9, [r8+8]                                                     ; +0x128, 0x180089618\nmov     r8, rax                                                        ; +0x12c, 0x18008961c\ncall    r9                                                             ; +0x12f, 0x18008961f\nadd     rbp, rdi                                                       ; +0x132, 0x180089622\nsub     r14, rdi                                                       ; +0x135, 0x180089625\ncmp     r14, 800h                                                      ; +0x138, 0x180089628\nja      loc_180089580                                                  ; +0x13f, 0x18008962f\nmov     rdi, [rsp+58h+arg_8]                                           ; +0x145, 0x180089635\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x14a, 0x18008963a\nmov     [rsi+2808h], r15                                               ; +0x14f, 0x18008963f\nlea     rcx, [r15+rsi]; void *                                         ; +0x156, 0x180089646\nmov     r8, r14; Size                                                  ; +0x15a, 0x18008964a\nmov     rdx, rbp; Src                                                  ; +0x15d, 0x18008964d\ncall    memcpy                                                         ; +0x160, 0x180089650\nadd     [rsi+2808h], r14                                               ; +0x165, 0x180089655\nmov     rbp, [rsp+58h+arg_10]                                          ; +0x16c, 0x18008965c\nadd     rsp, 40h                                                       ; +0x171, 0x180089661\npop     r15                                                            ; +0x175, 0x180089665\npop     r14                                                            ; +0x177, 0x180089667\npop     rsi                                                            ; +0x179, 0x180089669\nretn                                                                   ; +0x17a, 0x18008966a", "xrefs": ["sub_180084AF0 @ 0x180084b41", "sub_180084AF0 @ 0x180084bfb", "sub_180084AF0 @ 0x180084cb0", "sub_180084AF0 @ 0x180084e21", "sub_180084AF0 @ 0x180084e4a", "sub_180084AF0 @ 0x180084ea4", "sub_180084AF0 @ 0x180084f32", "sub_180084AF0 @ 0x180084f94", "sub_1800850E0 @ 0x180085181", "sub_1800850E0 @ 0x180085254", "sub_180088990 @ 0x1800889c1", "sub_1800894C0 @ 0x1800894eb", "<???> @ 0x180145ae0", "<???> @ 0x180145af0", "<???> @ 0x1801bf94c", "<???> @ 0x1801bf958"], "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"}