{"type": "func", "start": 6442546400, "end": 6442546627, "name": "sub_1800174E0", "pseudocode": "// \n// sub_1800174E0 from 0x1800174e0 to 0x1800175c3 (227 bytes)\n// \n// 15 xrefs:\n// > sub_180018080 @ 0x1800180bd\n// > sub_180018430 @ 0x18001843f\n// > sub_180018470 @ 0x1800184bb\n// > DS_Dictionary::setRectArrayForKey @ 0x18001fb46\n// > DS_Dictionary::setRectForKey @ 0x18001ff48\n// > DS_Dictionary::setVec2ArrayForKey @ 0x180020a61\n// > DS_Dictionary::setVec2ForKey @ 0x180020e1d\n// > sub_1800A6540 @ 0x1800a657d\n// > sub_1800A65A0 @ 0x1800a65dd\n// > sub_1800A6620 @ 0x1800a666b\n// > sub_1800A66B0 @ 0x1800a66fb\n// > cocos2d::ZipUtils::hexToChar @ 0x1800a7f0a\n// > cocos2d::ZipUtils::urlDecode @ 0x1800a84ca\n// > cocos2d::ZipUtils::urlDecode @ 0x1800a8584\n// > <???> @ 0x1801b874c\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:21:25 +0000\n// \n\n__int64 __fastcall sub_1800174E0(__int64 a1)\n{\n  bool v1; // zf\n  __int64 v3; // rax\n  __int64 v4; // rsi\n  _QWORD *v5; // rdi\n\n  v1 = (*(_BYTE *)(a1 + 112) & 1) == 0;\n  *(_QWORD *)a1 = &std::stringbuf::`vftable';\n  if ( !v1 )\n  {\n    if ( std::streambuf::pptr() )\n      v3 = std::streambuf::epptr(a1);\n    else\n      v3 = std::streambuf::egptr(a1);\n    v4 = v3;\n    v5 = (_QWORD *)std::streambuf::eback(a1);\n    if ( (unsigned __int64)(v4 - std::streambuf::eback(a1)) >= 0x1000 )\n    {\n      if ( (unsigned __int64)v5 - *(v5 - 1) - 8 > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      v5 = (_QWORD *)*(v5 - 1);\n    }\n    j_j_free_0(v5);\n  }\n  std::streambuf::setg(a1, 0, 0, 0);\n  std::streambuf::setp(a1, 0, 0);\n  *(_DWORD *)(a1 + 112) &= ~1u;\n  *(_QWORD *)(a1 + 104) = 0;\n  return std::streambuf::~streambuf<char,std::char_traits<char>>(a1);\n}", "assembly": "; \n; sub_1800174E0 from 0x1800174e0 to 0x1800175c3 (227 bytes)\n; \n; 15 xrefs:\n; > sub_180018080 @ 0x1800180bd\n; > sub_180018430 @ 0x18001843f\n; > sub_180018470 @ 0x1800184bb\n; > DS_Dictionary::setRectArrayForKey @ 0x18001fb46\n; > DS_Dictionary::setRectForKey @ 0x18001ff48\n; > DS_Dictionary::setVec2ArrayForKey @ 0x180020a61\n; > DS_Dictionary::setVec2ForKey @ 0x180020e1d\n; > sub_1800A6540 @ 0x1800a657d\n; > sub_1800A65A0 @ 0x1800a65dd\n; > sub_1800A6620 @ 0x1800a666b\n; > sub_1800A66B0 @ 0x1800a66fb\n; > cocos2d::ZipUtils::hexToChar @ 0x1800a7f0a\n; > cocos2d::ZipUtils::urlDecode @ 0x1800a84ca\n; > cocos2d::ZipUtils::urlDecode @ 0x1800a8584\n; > <???> @ 0x1801b874c\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:21:25 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800174e0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800174e5\npush    rdi                                                            ; +0xa, 0x1800174ea\nsub     rsp, 30h                                                       ; +0xb, 0x1800174eb\ntest    byte ptr [rcx+70h], 1                                          ; +0xf, 0x1800174ef\nlea     rax, ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@; const std::stringbuf::`vftable' ; +0x13, 0x1800174f3\nmov     [rcx], rax                                                     ; +0x1a, 0x1800174fa\nmov     rbx, rcx                                                       ; +0x1d, 0x1800174fd\njz      short loc_180017565                                            ; +0x20, 0x180017500\ncall    cs:?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pptr(void) ; +0x22, 0x180017502\nmov     rcx, rbx                                                       ; +0x28, 0x180017508\ntest    rax, rax                                                       ; +0x2b, 0x18001750b\njz      short loc_180017518                                            ; +0x2e, 0x18001750e\ncall    cs:?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::epptr(void) ; +0x30, 0x180017510\njmp     short loc_18001751E                                            ; +0x36, 0x180017516\ncall    cs:?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::egptr(void) ; +0x38, 0x180017518\nmov     rcx, rbx                                                       ; +0x3e, 0x18001751e\nmov     rsi, rax                                                       ; +0x41, 0x180017521\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x44, 0x180017524\nmov     rcx, rbx                                                       ; +0x4a, 0x18001752a\nmov     rdi, rax                                                       ; +0x4d, 0x18001752d\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x50, 0x180017530\nsub     rsi, rax                                                       ; +0x56, 0x180017536\ncmp     rsi, 1000h                                                     ; +0x59, 0x180017539\njb      short loc_18001755A                                            ; +0x60, 0x180017540\nmov     rax, [rdi-8]                                                   ; +0x62, 0x180017542\nadd     rsi, 27h ; '''                                                 ; +0x66, 0x180017546\nsub     rdi, rax                                                       ; +0x6a, 0x18001754a\nsub     rdi, 8                                                         ; +0x6d, 0x18001754d\ncmp     rdi, 1Fh                                                       ; +0x71, 0x180017551\nja      short loc_1800175A9                                            ; +0x75, 0x180017555\nmov     rdi, rax                                                       ; +0x77, 0x180017557\nmov     rdx, rsi                                                       ; +0x7a, 0x18001755a\nmov     rcx, rdi; Block                                                ; +0x7d, 0x18001755d\ncall    j_j_free_0                                                     ; +0x80, 0x180017560\nxor     r9d, r9d                                                       ; +0x85, 0x180017565\nxor     r8d, r8d                                                       ; +0x88, 0x180017568\nxor     edx, edx                                                       ; +0x8b, 0x18001756b\nmov     rcx, rbx                                                       ; +0x8d, 0x18001756d\ncall    cs:?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z; std::streambuf::setg(char *,char *,char *) ; +0x90, 0x180017570\nxor     r8d, r8d                                                       ; +0x96, 0x180017576\nxor     edx, edx                                                       ; +0x99, 0x180017579\nmov     rcx, rbx                                                       ; +0x9b, 0x18001757b\ncall    cs:?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z; std::streambuf::setp(char *,char *) ; +0x9e, 0x18001757e\nand     dword ptr [rbx+70h], 0FFFFFFFEh                                ; +0xa4, 0x180017584\nmov     rcx, rbx                                                       ; +0xa8, 0x180017588\nmov     qword ptr [rbx+68h], 0                                         ; +0xab, 0x18001758b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xb3, 0x180017593\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xb8, 0x180017598\nadd     rsp, 30h                                                       ; +0xbd, 0x18001759d\npop     rdi                                                            ; +0xc1, 0x1800175a1\njmp     cs:__imp_??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ; std::streambuf::~streambuf<char,std::char_traits<char>>(void) ; +0xc2, 0x1800175a2\nxor     r9d, r9d; LineNo                                               ; +0xc9, 0x1800175a9\nmov     [rsp+38h+Reserved], 0; Reserved                                ; +0xcc, 0x1800175ac\nxor     r8d, r8d; FileName                                             ; +0xd5, 0x1800175b5\nxor     edx, edx; FunctionName                                         ; +0xd8, 0x1800175b8\nxor     ecx, ecx; Expression                                           ; +0xda, 0x1800175ba\ncall    cs:_invoke_watson                                              ; +0xdc, 0x1800175bc\ndb 0CCh                                                                ; +0xe2, 0x1800175c2", "xrefs": ["sub_180018080 @ 0x1800180bd", "sub_180018430 @ 0x18001843f", "sub_180018470 @ 0x1800184bb", "DS_Dictionary::setRectArrayForKey @ 0x18001fb46", "DS_Dictionary::setRectForKey @ 0x18001ff48", "DS_Dictionary::setVec2ArrayForKey @ 0x180020a61", "DS_Dictionary::setVec2ForKey @ 0x180020e1d", "sub_1800A6540 @ 0x1800a657d", "sub_1800A65A0 @ 0x1800a65dd", "sub_1800A6620 @ 0x1800a666b", "sub_1800A66B0 @ 0x1800a66fb", "cocos2d::ZipUtils::hexToChar @ 0x1800a7f0a", "cocos2d::ZipUtils::urlDecode @ 0x1800a84ca", "cocos2d::ZipUtils::urlDecode @ 0x1800a8584", "<???> @ 0x1801b874c"], "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"}