{"type": "func", "start": 6443131872, "end": 6443132219, "name": "sub_1800A63E0", "pseudocode": "// \n// sub_1800A63E0 from 0x1800a63e0 to 0x1800a653b (347 bytes)\n// \n// 2 xrefs:\n// > cocos2d::ZipUtils::hexToChar @ 0x1800a7e9c\n// > <???> @ 0x1801c1cb0\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:15 +0000\n// \n\n// Hidden C++ exception states: #wind=3\n__int64 __fastcall sub_1800A63E0(__int64 a1, size_t *a2, char a3, int a4)\n{\n  int v7; // edx\n  int v8; // ebx\n  const void *v9; // r15\n  size_t v10; // rbp\n  char *v11; // r14\n  char *v12; // r8\n\n  if ( a4 )\n  {\n    *(_QWORD *)a1 = &unk_18010B3B8;\n    std::ios::ios(a1 + 144);\n  }\n  std::istream::istream(a1, a1 + 16, 0, 0);\n  *(_QWORD *)(*(int *)(*(_QWORD *)a1 + 4LL) + a1) = &std::istringstream::`vftable';\n  *(_DWORD *)(*(int *)(*(_QWORD *)a1 + 4LL) + a1 - 4) = *(_DWORD *)(*(_QWORD *)a1 + 4LL) - 144;\n  std::streambuf::streambuf(a1 + 16);\n  *(_QWORD *)(a1 + 16) = &std::stringbuf::`vftable';\n  v7 = ~a3 & 2 | 8;\n  if ( (a3 & 8) == 0 )\n    v7 = ~a3 & 2;\n  v8 = v7 | 0x10;\n  if ( (a3 & 4) == 0 )\n    v8 = v7;\n  v9 = a2;\n  if ( a2[3] > 0xF )\n    v9 = (const void *)*a2;\n  v10 = a2[2];\n  if ( v10 > 0x7FFFFFFF )\n  {\n    std::_Xbad_alloc();\n    JUMPOUT(0x1800A653BLL);\n  }\n  if ( v10 )\n  {\n    v11 = (char *)sub_18000CE80(v10);\n    memcpy(v11, v9, v10);\n    *(_QWORD *)(a1 + 120) = &v11[v10];\n    std::streambuf::setg(a1 + 16, v11, v11, &v11[v10]);\n    if ( (v8 & 2) == 0 )\n    {\n      if ( (v8 & 0x18) != 0 )\n        v12 = *(char **)(a1 + 120);\n      else\n        v12 = v11;\n      std::streambuf::setp(a1 + 16, v11, v12, *(_QWORD *)(a1 + 120));\n    }\n    v8 |= 1u;\n  }\n  else\n  {\n    *(_QWORD *)(a1 + 120) = 0;\n  }\n  *(_DWORD *)(a1 + 128) = v8;\n  return a1;\n}", "assembly": "; \n; sub_1800A63E0 from 0x1800a63e0 to 0x1800a653b (347 bytes)\n; \n; 2 xrefs:\n; > cocos2d::ZipUtils::hexToChar @ 0x1800a7e9c\n; > <???> @ 0x1801c1cb0\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:15 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x1800a63e0\nmov     [rsp+arg_0], rcx                                               ; +0x5, 0x1800a63e5\npush    rbp                                                            ; +0xa, 0x1800a63ea\npush    rsi                                                            ; +0xb, 0x1800a63eb\npush    rdi                                                            ; +0xc, 0x1800a63ec\npush    r14                                                            ; +0xd, 0x1800a63ed\npush    r15                                                            ; +0xf, 0x1800a63ef\nsub     rsp, 20h                                                       ; +0x11, 0x1800a63f1\nmov     r14d, r8d                                                      ; +0x15, 0x1800a63f5\nmov     rbp, rdx                                                       ; +0x18, 0x1800a63f8\nmov     rsi, rcx                                                       ; +0x1b, 0x1800a63fb\nmov     [rsp+48h+arg_10], 0                                            ; +0x1e, 0x1800a63fe\ntest    r9d, r9d                                                       ; +0x26, 0x1800a6406\njz      short loc_1800A642B                                            ; +0x29, 0x1800a6409\nlea     rax, unk_18010B3B8                                             ; +0x2b, 0x1800a640b\nmov     [rcx], rax                                                     ; +0x32, 0x1800a6412\nadd     rcx, 90h                                                       ; +0x35, 0x1800a6415\ncall    cs:??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ; std::ios::ios(void) ; +0x3c, 0x1800a641c\nnop                                                                    ; +0x42, 0x1800a6422\nmov     [rsp+48h+arg_10], 1                                            ; +0x43, 0x1800a6423\nlea     rdi, [rsi+10h]                                                 ; +0x4b, 0x1800a642b\nxor     r9d, r9d                                                       ; +0x4f, 0x1800a642f\nxor     r8d, r8d                                                       ; +0x52, 0x1800a6432\nmov     rdx, rdi                                                       ; +0x55, 0x1800a6435\nmov     rcx, rsi                                                       ; +0x58, 0x1800a6438\ncall    cs:??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z; std::istream::istream(std::streambuf *,bool) ; +0x5b, 0x1800a643b\nnop                                                                    ; +0x61, 0x1800a6441\nmov     rax, [rsi]                                                     ; +0x62, 0x1800a6442\nmovsxd  rcx, dword ptr [rax+4]                                         ; +0x65, 0x1800a6445\nlea     rax, ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@; const std::istringstream::`vftable' ; +0x69, 0x1800a6449\nmov     [rcx+rsi], rax                                                 ; +0x70, 0x1800a6450\nmov     rax, [rsi]                                                     ; +0x74, 0x1800a6454\nmovsxd  rcx, dword ptr [rax+4]                                         ; +0x77, 0x1800a6457\nlea     edx, [rcx-90h]                                                 ; +0x7b, 0x1800a645b\nmov     [rcx+rsi-4], edx                                               ; +0x81, 0x1800a6461\nmov     [rsp+48h+arg_8], rdi                                           ; +0x85, 0x1800a6465\nmov     rcx, rdi                                                       ; +0x8a, 0x1800a646a\ncall    cs:??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ; std::streambuf::streambuf(void) ; +0x8d, 0x1800a646d\nnop                                                                    ; +0x93, 0x1800a6473\nlea     rax, ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@; const std::stringbuf::`vftable' ; +0x94, 0x1800a6474\nmov     [rdi], rax                                                     ; +0x9b, 0x1800a647b\nmov     ecx, r14d                                                      ; +0x9e, 0x1800a647e\nnot     ecx                                                            ; +0xa1, 0x1800a6481\nand     ecx, 2                                                         ; +0xa3, 0x1800a6483\nmov     edx, ecx                                                       ; +0xa6, 0x1800a6486\nor      edx, 8                                                         ; +0xa8, 0x1800a6488\ntest    r14b, 8                                                        ; +0xab, 0x1800a648b\ncmovz   edx, ecx                                                       ; +0xaf, 0x1800a648f\nmov     ebx, edx                                                       ; +0xb2, 0x1800a6492\nor      ebx, 10h                                                       ; +0xb4, 0x1800a6494\ntest    r14b, 4                                                        ; +0xb7, 0x1800a6497\ncmovz   ebx, edx                                                       ; +0xbb, 0x1800a649b\nmov     r15, rbp                                                       ; +0xbe, 0x1800a649e\ncmp     qword ptr [rbp+18h], 0Fh                                       ; +0xc1, 0x1800a64a1\njbe     short loc_1800A64AC                                            ; +0xc6, 0x1800a64a6\nmov     r15, [rbp+0]                                                   ; +0xc8, 0x1800a64a8\nmov     rbp, [rbp+10h]                                                 ; +0xcc, 0x1800a64ac\ncmp     rbp, 7FFFFFFFh                                                 ; +0xd0, 0x1800a64b0\nja      short loc_1800A6535                                            ; +0xd7, 0x1800a64b7\ntest    rbp, rbp                                                       ; +0xd9, 0x1800a64b9\njz      short loc_1800A6516                                            ; +0xdc, 0x1800a64bc\nmov     rcx, rbp                                                       ; +0xde, 0x1800a64be\ncall    sub_18000CE80                                                  ; +0xe1, 0x1800a64c1\nmov     r14, rax                                                       ; +0xe6, 0x1800a64c6\nmov     r8, rbp; Size                                                  ; +0xe9, 0x1800a64c9\nmov     rdx, r15; Src                                                  ; +0xec, 0x1800a64cc\nmov     rcx, rax; void *                                               ; +0xef, 0x1800a64cf\ncall    memcpy                                                         ; +0xf2, 0x1800a64d2\nlea     r9, [r14+rbp]                                                  ; +0xf7, 0x1800a64d7\nmov     [rdi+68h], r9                                                  ; +0xfb, 0x1800a64db\nmov     r8, r14                                                        ; +0xff, 0x1800a64df\nmov     rdx, r14                                                       ; +0x102, 0x1800a64e2\nmov     rcx, rdi                                                       ; +0x105, 0x1800a64e5\ncall    cs:?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z; std::streambuf::setg(char *,char *,char *) ; +0x108, 0x1800a64e8\ntest    bl, 2                                                          ; +0x10e, 0x1800a64ee\njnz     short loc_1800A6511                                            ; +0x111, 0x1800a64f1\ntest    bl, 18h                                                        ; +0x113, 0x1800a64f3\njz      short loc_1800A64FE                                            ; +0x116, 0x1800a64f6\nmov     r8, [rdi+68h]                                                  ; +0x118, 0x1800a64f8\njmp     short loc_1800A6501                                            ; +0x11c, 0x1800a64fc\nmov     r8, r14                                                        ; +0x11e, 0x1800a64fe\nmov     r9, [rdi+68h]                                                  ; +0x121, 0x1800a6501\nmov     rdx, r14                                                       ; +0x125, 0x1800a6505\nmov     rcx, rdi                                                       ; +0x128, 0x1800a6508\ncall    cs:?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z; std::streambuf::setp(char *,char *,char *) ; +0x12b, 0x1800a650b\nor      ebx, 1                                                         ; +0x131, 0x1800a6511\njmp     short loc_1800A651E                                            ; +0x134, 0x1800a6514\nmov     qword ptr [rdi+68h], 0                                         ; +0x136, 0x1800a6516\nmov     [rdi+70h], ebx                                                 ; +0x13e, 0x1800a651e\nmov     rax, rsi                                                       ; +0x141, 0x1800a6521\nmov     rbx, [rsp+48h+arg_18]                                          ; +0x144, 0x1800a6524\nadd     rsp, 20h                                                       ; +0x149, 0x1800a6529\npop     r15                                                            ; +0x14d, 0x1800a652d\npop     r14                                                            ; +0x14f, 0x1800a652f\npop     rdi                                                            ; +0x151, 0x1800a6531\npop     rsi                                                            ; +0x152, 0x1800a6532\npop     rbp                                                            ; +0x153, 0x1800a6533\nretn                                                                   ; +0x154, 0x1800a6534\ncall    ?_Xbad_alloc@std@@YAXXZ; std::_Xbad_alloc(void)                ; +0x155, 0x1800a6535\nnop                                                                    ; +0x15a, 0x1800a653a", "xrefs": ["cocos2d::ZipUtils::hexToChar @ 0x1800a7e9c", "<???> @ 0x1801c1cb0"], "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"}