{"type": "func", "start": 6442547616, "end": 6442547824, "name": "sub_1800179A0", "pseudocode": "// \n// sub_1800179A0 from 0x1800179a0 to 0x180017a70 (208 bytes)\n// \n// 15 xrefs:\n// > sub_180018430 @ 0x18001846d\n// > std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`scalar deleting destructor' @ 0x18001874f\n// > sub_180018780 @ 0x1800187cc\n// > DS_Dictionary::setRectArrayForKey @ 0x18001f98e\n// > DS_Dictionary::setRectForKey @ 0x18001fd58\n// > DS_Dictionary::setVec2ArrayForKey @ 0x180020860\n// > DS_Dictionary::setVec2ForKey @ 0x180020be6\n// > sub_1800A2A30 @ 0x1800a2a6d\n// > sub_1800A2A90 @ 0x1800a2acd\n// > sub_1800A2B10 @ 0x1800a2b5c\n// > sub_1800A2BB0 @ 0x1800a2bfc\n// > cocos2d::ZipUtils::hexToChar @ 0x1800a461b\n// > cocos2d::ZipUtils::urlDecode @ 0x1800a494b\n// > cocos2d::ZipUtils::urlDecode @ 0x1800a4b02\n// > <???> @ 0x1801ae6f8\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_1800179A0(__int64 a1)\n{\n  bool v1; // zf\n  __int64 v3; // rax\n  __int64 v4; // rdi\n  _QWORD *v5; // rsi\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        invalid_parameter_noinfo_noreturn();\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_1800179A0 from 0x1800179a0 to 0x180017a70 (208 bytes)\n; \n; 15 xrefs:\n; > sub_180018430 @ 0x18001846d\n; > std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`scalar deleting destructor' @ 0x18001874f\n; > sub_180018780 @ 0x1800187cc\n; > DS_Dictionary::setRectArrayForKey @ 0x18001f98e\n; > DS_Dictionary::setRectForKey @ 0x18001fd58\n; > DS_Dictionary::setVec2ArrayForKey @ 0x180020860\n; > DS_Dictionary::setVec2ForKey @ 0x180020be6\n; > sub_1800A2A30 @ 0x1800a2a6d\n; > sub_1800A2A90 @ 0x1800a2acd\n; > sub_1800A2B10 @ 0x1800a2b5c\n; > sub_1800A2BB0 @ 0x1800a2bfc\n; > cocos2d::ZipUtils::hexToChar @ 0x1800a461b\n; > cocos2d::ZipUtils::urlDecode @ 0x1800a494b\n; > cocos2d::ZipUtils::urlDecode @ 0x1800a4b02\n; > <???> @ 0x1801ae6f8\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800179a0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800179a5\npush    rdi                                                            ; +0xa, 0x1800179aa\nsub     rsp, 20h                                                       ; +0xb, 0x1800179ab\ntest    byte ptr [rcx+70h], 1                                          ; +0xf, 0x1800179af\nlea     rax, ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@; const std::stringbuf::`vftable' ; +0x13, 0x1800179b3\nmov     [rcx], rax                                                     ; +0x1a, 0x1800179ba\nmov     rbx, rcx                                                       ; +0x1d, 0x1800179bd\njz      short loc_180017A25                                            ; +0x20, 0x1800179c0\ncall    cs:?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pptr(void) ; +0x22, 0x1800179c2\nmov     rcx, rbx                                                       ; +0x28, 0x1800179c8\ntest    rax, rax                                                       ; +0x2b, 0x1800179cb\njz      short loc_1800179D8                                            ; +0x2e, 0x1800179ce\ncall    cs:?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::epptr(void) ; +0x30, 0x1800179d0\njmp     short loc_1800179DE                                            ; +0x36, 0x1800179d6\ncall    cs:?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::egptr(void) ; +0x38, 0x1800179d8\nmov     rcx, rbx                                                       ; +0x3e, 0x1800179de\nmov     rdi, rax                                                       ; +0x41, 0x1800179e1\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x44, 0x1800179e4\nmov     rcx, rbx                                                       ; +0x4a, 0x1800179ea\nmov     rsi, rax                                                       ; +0x4d, 0x1800179ed\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x50, 0x1800179f0\nsub     rdi, rax                                                       ; +0x56, 0x1800179f6\ncmp     rdi, 1000h                                                     ; +0x59, 0x1800179f9\njb      short loc_180017A1A                                            ; +0x60, 0x180017a00\nmov     rcx, [rsi-8]                                                   ; +0x62, 0x180017a02\nadd     rdi, 27h ; '''                                                 ; +0x66, 0x180017a06\nsub     rsi, rcx                                                       ; +0x6a, 0x180017a0a\nlea     rax, [rsi-8]                                                   ; +0x6d, 0x180017a0d\ncmp     rax, 1Fh                                                       ; +0x71, 0x180017a11\nja      short loc_180017A69                                            ; +0x75, 0x180017a15\nmov     rsi, rcx                                                       ; +0x77, 0x180017a17\nmov     rdx, rdi                                                       ; +0x7a, 0x180017a1a\nmov     rcx, rsi; Block                                                ; +0x7d, 0x180017a1d\ncall    j_j_free_0                                                     ; +0x80, 0x180017a20\nxor     r9d, r9d                                                       ; +0x85, 0x180017a25\nxor     r8d, r8d                                                       ; +0x88, 0x180017a28\nxor     edx, edx                                                       ; +0x8b, 0x180017a2b\nmov     rcx, rbx                                                       ; +0x8d, 0x180017a2d\ncall    cs:?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z; std::streambuf::setg(char *,char *,char *) ; +0x90, 0x180017a30\nxor     r8d, r8d                                                       ; +0x96, 0x180017a36\nxor     edx, edx                                                       ; +0x99, 0x180017a39\nmov     rcx, rbx                                                       ; +0x9b, 0x180017a3b\ncall    cs:?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z; std::streambuf::setp(char *,char *) ; +0x9e, 0x180017a3e\nand     dword ptr [rbx+70h], 0FFFFFFFEh                                ; +0xa4, 0x180017a44\nmov     rcx, rbx                                                       ; +0xa8, 0x180017a48\nmov     qword ptr [rbx+68h], 0                                         ; +0xab, 0x180017a4b\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xb3, 0x180017a53\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xb8, 0x180017a58\nadd     rsp, 20h                                                       ; +0xbd, 0x180017a5d\npop     rdi                                                            ; +0xc1, 0x180017a61\njmp     cs:__imp_??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ; std::streambuf::~streambuf<char,std::char_traits<char>>(void) ; +0xc2, 0x180017a62\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xc9, 0x180017a69\nalign 10h                                                              ; +0xcf, 0x180017a6f", "xrefs": ["sub_180018430 @ 0x18001846d", "std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char>>::`scalar deleting destructor' @ 0x18001874f", "sub_180018780 @ 0x1800187cc", "DS_Dictionary::setRectArrayForKey @ 0x18001f98e", "DS_Dictionary::setRectForKey @ 0x18001fd58", "DS_Dictionary::setVec2ArrayForKey @ 0x180020860", "DS_Dictionary::setVec2ForKey @ 0x180020be6", "sub_1800A2A30 @ 0x1800a2a6d", "sub_1800A2A90 @ 0x1800a2acd", "sub_1800A2B10 @ 0x1800a2b5c", "sub_1800A2BB0 @ 0x1800a2bfc", "cocos2d::ZipUtils::hexToChar @ 0x1800a461b", "cocos2d::ZipUtils::urlDecode @ 0x1800a494b", "cocos2d::ZipUtils::urlDecode @ 0x1800a4b02", "<???> @ 0x1801ae6f8"], "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"}