{"type": "func", "start": 6442588448, "end": 6442588681, "name": "sub_180021920", "pseudocode": "// \n// sub_180021920 from 0x180021920 to 0x180021a09 (233 bytes)\n// \n// 3 xrefs:\n// > DS_Dictionary::setRectForKey @ 0x18001fe4c\n// > DS_Dictionary::setVec2ForKey @ 0x180020d21\n// > <???> @ 0x1801b8ee4\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:28 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall sub_180021920(__int64 a1, __int64 a2)\n{\n  __int64 v3; // rbx\n  void *v4; // rsi\n  unsigned __int64 v5; // rdi\n  size_t v6; // rdi\n\n  v3 = a1 + 24;\n  *(_OWORD *)a2 = 0;\n  *(_QWORD *)(a2 + 16) = 0;\n  *(_QWORD *)(a2 + 24) = 15;\n  *(_BYTE *)a2 = 0;\n  if ( (*(_DWORD *)(a1 + 136) & 0x22) == 2 || !std::streambuf::pptr(a1 + 24) )\n  {\n    if ( (*(_BYTE *)(v3 + 112) & 4) != 0 || !std::streambuf::gptr(v3) )\n    {\n      v6 = 0;\n      v4 = nullptr;\n    }\n    else\n    {\n      v4 = (void *)std::streambuf::eback(v3);\n      v6 = std::streambuf::egptr(v3) - (_QWORD)v4;\n    }\n  }\n  else\n  {\n    v4 = (void *)std::streambuf::pbase(v3);\n    v5 = std::streambuf::pptr(v3);\n    if ( v5 < *(_QWORD *)(v3 + 104) )\n      v5 = *(_QWORD *)(v3 + 104);\n    v6 = v5 - (_QWORD)v4;\n    std::streambuf::epptr(v3);\n  }\n  if ( v4 )\n    sub_1800101E0((void **)a2, v4, v6);\n  return a2;\n}", "assembly": "; \n; sub_180021920 from 0x180021920 to 0x180021a09 (233 bytes)\n; \n; 3 xrefs:\n; > DS_Dictionary::setRectForKey @ 0x18001fe4c\n; > DS_Dictionary::setVec2ForKey @ 0x180020d21\n; > <???> @ 0x1801b8ee4\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:28 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x180021920\npush    rsi                                                            ; +0x5, 0x180021925\npush    rdi                                                            ; +0x6, 0x180021926\npush    r14                                                            ; +0x7, 0x180021927\nsub     rsp, 50h                                                       ; +0x9, 0x180021929\nmov     r14, rdx                                                       ; +0xd, 0x18002192d\nmov     [rsp+68h+var_28], rdx                                          ; +0x10, 0x180021930\nxor     eax, eax                                                       ; +0x15, 0x180021935\nmov     [rsp+68h+var_48], eax                                          ; +0x17, 0x180021937\nlea     rbx, [rcx+18h]                                                 ; +0x1b, 0x18002193b\nxorps   xmm0, xmm0                                                     ; +0x1f, 0x18002193f\nmovups  xmmword ptr [rdx], xmm0                                        ; +0x22, 0x180021942\nmov     [rdx+10h], rax                                                 ; +0x25, 0x180021945\nmov     qword ptr [rdx+18h], 0Fh                                       ; +0x29, 0x180021949\nmov     [rdx], al                                                      ; +0x31, 0x180021951\nmov     [rsp+68h+var_48], 2                                            ; +0x33, 0x180021953\nmovups  [rsp+68h+var_40], xmm0                                         ; +0x3b, 0x18002195b\nmov     eax, [rbx+70h]                                                 ; +0x40, 0x180021960\nand     al, 22h                                                        ; +0x43, 0x180021963\ncmp     al, 2                                                          ; +0x45, 0x180021965\njz      short loc_1800219A6                                            ; +0x47, 0x180021967\nmov     rcx, rbx                                                       ; +0x49, 0x180021969\ncall    cs:?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pptr(void) ; +0x4c, 0x18002196c\ntest    rax, rax                                                       ; +0x52, 0x180021972\njz      short loc_1800219A6                                            ; +0x55, 0x180021975\nmov     rcx, rbx                                                       ; +0x57, 0x180021977\ncall    cs:?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pbase(void) ; +0x5a, 0x18002197a\nmov     rsi, rax                                                       ; +0x60, 0x180021980\nmov     rcx, rbx                                                       ; +0x63, 0x180021983\ncall    cs:?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pptr(void) ; +0x66, 0x180021986\nmov     rdi, rax                                                       ; +0x6c, 0x18002198c\ncmp     rax, [rbx+68h]                                                 ; +0x6f, 0x18002198f\ncmovb   rdi, [rbx+68h]                                                 ; +0x73, 0x180021993\nsub     rdi, rsi                                                       ; +0x78, 0x180021998\nmov     rcx, rbx                                                       ; +0x7b, 0x18002199b\ncall    cs:?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::epptr(void) ; +0x7e, 0x18002199e\njmp     short loc_1800219E1                                            ; +0x84, 0x1800219a4\ntest    byte ptr [rbx+70h], 4                                          ; +0x86, 0x1800219a6\njnz     short loc_1800219D7                                            ; +0x8a, 0x1800219aa\nmov     rcx, rbx                                                       ; +0x8c, 0x1800219ac\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x8f, 0x1800219af\ntest    rax, rax                                                       ; +0x95, 0x1800219b5\njz      short loc_1800219D7                                            ; +0x98, 0x1800219b8\nmov     rcx, rbx                                                       ; +0x9a, 0x1800219ba\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x9d, 0x1800219bd\nmov     rsi, rax                                                       ; +0xa3, 0x1800219c3\nmov     rcx, rbx                                                       ; +0xa6, 0x1800219c6\ncall    cs:?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::egptr(void) ; +0xa9, 0x1800219c9\nmov     rdi, rax                                                       ; +0xaf, 0x1800219cf\nsub     rdi, rsi                                                       ; +0xb2, 0x1800219d2\njmp     short loc_1800219E1                                            ; +0xb5, 0x1800219d5\nmov     rdi, qword ptr [rsp+68h+var_40+8]                              ; +0xb7, 0x1800219d7\nmov     rsi, qword ptr [rsp+68h+var_40]                                ; +0xbc, 0x1800219dc\ntest    rsi, rsi                                                       ; +0xc1, 0x1800219e1\njz      short loc_1800219F5                                            ; +0xc4, 0x1800219e4\nmov     r8, rdi; Size                                                  ; +0xc6, 0x1800219e6\nmov     rdx, rsi; Src                                                  ; +0xc9, 0x1800219e9\nmov     rcx, r14; void *                                               ; +0xcc, 0x1800219ec\ncall    sub_1800101E0                                                  ; +0xcf, 0x1800219ef\nnop                                                                    ; +0xd4, 0x1800219f4\nmov     rax, r14                                                       ; +0xd5, 0x1800219f5\nmov     rbx, [rsp+68h+arg_10]                                          ; +0xd8, 0x1800219f8\nadd     rsp, 50h                                                       ; +0xe0, 0x180021a00\npop     r14                                                            ; +0xe4, 0x180021a04\npop     rdi                                                            ; +0xe6, 0x180021a06\npop     rsi                                                            ; +0xe7, 0x180021a07\nretn                                                                   ; +0xe8, 0x180021a08", "xrefs": ["DS_Dictionary::setRectForKey @ 0x18001fe4c", "DS_Dictionary::setVec2ForKey @ 0x180020d21", "<???> @ 0x1801b8ee4"], "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"}