{"type": "func", "start": 6442587312, "end": 6442587557, "name": "sub_1800214B0", "pseudocode": "// \n// sub_1800214B0 from 0x1800214b0 to 0x1800215a5 (245 bytes)\n// \n// 3 xrefs:\n// > DS_Dictionary::setRectForKey @ 0x18001fc67\n// > DS_Dictionary::setVec2ForKey @ 0x180020af5\n// > <???> @ 0x1801aee00\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// Hidden C++ exception states: #wind=1\n__int64 __fastcall sub_1800214B0(__int64 a1, __int64 a2)\n{\n  __int64 v3; // rbx\n  __int128 v4; // rdi\n  unsigned __int64 *v5; // r8\n  unsigned __int64 v7; // [rsp+28h] [rbp-40h] BYREF\n  __int128 v8; // [rsp+30h] [rbp-38h]\n  __int64 v9; // [rsp+48h] [rbp-20h]\n\n  v9 = a2;\n  v3 = a1 + 24;\n  *(_OWORD *)a2 = 0;\n  *(_QWORD *)(a2 + 16) = 0;\n  *(_QWORD *)(a2 + 24) = 15;\n  *(_BYTE *)a2 = 0;\n  v8 = 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      v4 = v8;\n    }\n    else\n    {\n      *(_QWORD *)&v4 = std::streambuf::eback(v3);\n      *((_QWORD *)&v4 + 1) = std::streambuf::egptr(v3) - v4;\n    }\n  }\n  else\n  {\n    *(_QWORD *)&v4 = std::streambuf::pbase(v3);\n    v7 = std::streambuf::pptr(v3);\n    v5 = &v7;\n    if ( v7 < *(_QWORD *)(v3 + 104) )\n      v5 = (unsigned __int64 *)(v3 + 104);\n    *((_QWORD *)&v4 + 1) = *v5 - v4;\n    std::streambuf::epptr(v3);\n  }\n  if ( (_QWORD)v4 )\n    sub_180010050((void **)a2, (void *)v4, *((size_t *)&v4 + 1));\n  return a2;\n}", "assembly": "; \n; sub_1800214B0 from 0x1800214b0 to 0x1800215a5 (245 bytes)\n; \n; 3 xrefs:\n; > DS_Dictionary::setRectForKey @ 0x18001fc67\n; > DS_Dictionary::setVec2ForKey @ 0x180020af5\n; > <???> @ 0x1801aee00\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_10], rbx                                              ; +0x0, 0x1800214b0\npush    rsi                                                            ; +0x5, 0x1800214b5\npush    rdi                                                            ; +0x6, 0x1800214b6\npush    r14                                                            ; +0x7, 0x1800214b7\nsub     rsp, 50h                                                       ; +0x9, 0x1800214b9\nmov     r14, rdx                                                       ; +0xd, 0x1800214bd\nmov     [rsp+68h+var_20], rdx                                          ; +0x10, 0x1800214c0\nxor     eax, eax                                                       ; +0x15, 0x1800214c5\nmov     [rsp+68h+var_48], eax                                          ; +0x17, 0x1800214c7\nlea     rbx, [rcx+18h]                                                 ; +0x1b, 0x1800214cb\nxorps   xmm0, xmm0                                                     ; +0x1f, 0x1800214cf\nmovups  xmmword ptr [rdx], xmm0                                        ; +0x22, 0x1800214d2\nmov     [rdx+10h], rax                                                 ; +0x25, 0x1800214d5\nmov     qword ptr [rdx+18h], 0Fh                                       ; +0x29, 0x1800214d9\nmov     [rdx], al                                                      ; +0x31, 0x1800214e1\nmov     [rsp+68h+var_48], 2                                            ; +0x33, 0x1800214e3\nmovups  [rsp+68h+var_38], xmm0                                         ; +0x3b, 0x1800214eb\nmov     eax, [rbx+70h]                                                 ; +0x40, 0x1800214f0\nand     al, 22h                                                        ; +0x43, 0x1800214f3\ncmp     al, 2                                                          ; +0x45, 0x1800214f5\njz      short loc_180021542                                            ; +0x47, 0x1800214f7\nmov     rcx, rbx                                                       ; +0x49, 0x1800214f9\ncall    cs:?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pptr(void) ; +0x4c, 0x1800214fc\ntest    rax, rax                                                       ; +0x52, 0x180021502\njz      short loc_180021542                                            ; +0x55, 0x180021505\nmov     rcx, rbx                                                       ; +0x57, 0x180021507\ncall    cs:?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pbase(void) ; +0x5a, 0x18002150a\nmov     rdi, rax                                                       ; +0x60, 0x180021510\nmov     rcx, rbx                                                       ; +0x63, 0x180021513\ncall    cs:?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::pptr(void) ; +0x66, 0x180021516\nmov     [rsp+68h+var_40], rax                                          ; +0x6c, 0x18002151c\nlea     rdx, [rbx+68h]                                                 ; +0x71, 0x180021521\nlea     r8, [rsp+68h+var_40]                                           ; +0x75, 0x180021525\ncmp     rax, [rdx]                                                     ; +0x7a, 0x18002152a\ncmovb   r8, rdx                                                        ; +0x7d, 0x18002152d\nmov     rsi, [r8]                                                      ; +0x81, 0x180021531\nsub     rsi, rdi                                                       ; +0x84, 0x180021534\nmov     rcx, rbx                                                       ; +0x87, 0x180021537\ncall    cs:?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::epptr(void) ; +0x8a, 0x18002153a\njmp     short loc_18002157D                                            ; +0x90, 0x180021540\ntest    byte ptr [rbx+70h], 4                                          ; +0x92, 0x180021542\njnz     short loc_180021573                                            ; +0x96, 0x180021546\nmov     rcx, rbx                                                       ; +0x98, 0x180021548\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x9b, 0x18002154b\ntest    rax, rax                                                       ; +0xa1, 0x180021551\njz      short loc_180021573                                            ; +0xa4, 0x180021554\nmov     rcx, rbx                                                       ; +0xa6, 0x180021556\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0xa9, 0x180021559\nmov     rdi, rax                                                       ; +0xaf, 0x18002155f\nmov     rcx, rbx                                                       ; +0xb2, 0x180021562\ncall    cs:?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::egptr(void) ; +0xb5, 0x180021565\nmov     rsi, rax                                                       ; +0xbb, 0x18002156b\nsub     rsi, rdi                                                       ; +0xbe, 0x18002156e\njmp     short loc_18002157D                                            ; +0xc1, 0x180021571\nmov     rsi, qword ptr [rsp+68h+var_38+8]                              ; +0xc3, 0x180021573\nmov     rdi, qword ptr [rsp+68h+var_38]                                ; +0xc8, 0x180021578\ntest    rdi, rdi                                                       ; +0xcd, 0x18002157d\njz      short loc_180021591                                            ; +0xd0, 0x180021580\nmov     r8, rsi; Size                                                  ; +0xd2, 0x180021582\nmov     rdx, rdi; Src                                                  ; +0xd5, 0x180021585\nmov     rcx, r14; void *                                               ; +0xd8, 0x180021588\ncall    sub_180010050                                                  ; +0xdb, 0x18002158b\nnop                                                                    ; +0xe0, 0x180021590\nmov     rax, r14                                                       ; +0xe1, 0x180021591\nmov     rbx, [rsp+68h+arg_10]                                          ; +0xe4, 0x180021594\nadd     rsp, 50h                                                       ; +0xec, 0x18002159c\npop     r14                                                            ; +0xf0, 0x1800215a0\npop     rdi                                                            ; +0xf2, 0x1800215a2\npop     rsi                                                            ; +0xf3, 0x1800215a3\nretn                                                                   ; +0xf4, 0x1800215a4", "xrefs": ["DS_Dictionary::setRectForKey @ 0x18001fc67", "DS_Dictionary::setVec2ForKey @ 0x180020af5", "<???> @ 0x1801aee00"], "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"}