{"type": "func", "start": 6443717516, "end": 6443717683, "name": "__acrt_getptd_head", "pseudocode": "// \n// __acrt_getptd_head from 0x18013538c to 0x180135433 (167 bytes)\n// \n// 3 xrefs:\n// > __acrt_initialize_multibyte @ 0x18013a84b\n// > <???> @ 0x18020335c\n// > <???> @ 0x180203368\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\nstruct __acrt_ptd *_acrt_getptd_head()\n{\n  DWORD v0; // ecx\n  __int64 Value; // rax\n  struct __acrt_ptd *v2; // rbx\n  struct __acrt_ptd *v3; // rax\n  struct __acrt_ptd *v4; // rcx\n\n  v0 = dword_1801B1870;\n  if ( dword_1801B1870 == -1 )\n  {\nLABEL_6:\n    if ( !(unsigned int)_acrt_FlsSetValue(v0, (LPVOID)0xFFFFFFFFFFFFFFFFLL) )\n      goto LABEL_15;\n    v3 = (struct __acrt_ptd *)calloc_base(1u, 0x3C8u);\n    v2 = v3;\n    if ( v3 )\n    {\n      if ( (unsigned int)_acrt_FlsSetValue(dword_1801B1870, v3) )\n      {\n        construct_ptd_array(v2);\n        free_base(nullptr);\n        goto LABEL_13;\n      }\n      _acrt_FlsSetValue(dword_1801B1870, nullptr);\n      v4 = v2;\n    }\n    else\n    {\n      _acrt_FlsSetValue(dword_1801B1870, nullptr);\n      v4 = nullptr;\n    }\n    free_base(v4);\n    goto LABEL_15;\n  }\n  Value = _acrt_FlsGetValue();\n  v2 = (struct __acrt_ptd *)Value;\n  if ( !Value )\n  {\n    v0 = dword_1801B1870;\n    goto LABEL_6;\n  }\n  if ( Value == -1 )\n    goto LABEL_15;\nLABEL_13:\n  if ( !v2 )\nLABEL_15:\n    abort();\n  return v2;\n}", "assembly": "; \n; __acrt_getptd_head from 0x18013538c to 0x180135433 (167 bytes)\n; \n; 3 xrefs:\n; > __acrt_initialize_multibyte @ 0x18013a84b\n; > <???> @ 0x18020335c\n; > <???> @ 0x180203368\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\npush    rbx                                                            ; +0x0, 0x18013538c\nsub     rsp, 20h                                                       ; +0x2, 0x18013538e\nmov     ecx, cs:dword_1801B1870                                        ; +0x6, 0x180135392\ncmp     ecx, 0FFFFFFFFh                                                ; +0xc, 0x180135398\njz      short loc_1801353B8                                            ; +0xf, 0x18013539b\ncall    __acrt_FlsGetValue                                             ; +0x11, 0x18013539d\nmov     rbx, rax                                                       ; +0x16, 0x1801353a2\ntest    rax, rax                                                       ; +0x19, 0x1801353a5\njz      short loc_1801353B2                                            ; +0x1c, 0x1801353a8\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x1e, 0x1801353aa\njz      short loc_18013542D                                            ; +0x22, 0x1801353ae\njmp     short loc_18013541F                                            ; +0x24, 0x1801353b0\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x26, 0x1801353b2\nor      rdx, 0FFFFFFFFFFFFFFFFh; lpTlsValue                            ; +0x2c, 0x1801353b8\ncall    __acrt_FlsSetValue                                             ; +0x30, 0x1801353bc\ntest    eax, eax                                                       ; +0x35, 0x1801353c1\njz      short loc_18013542D                                            ; +0x37, 0x1801353c3\nmov     edx, 3C8h; Size                                                ; +0x39, 0x1801353c5\nmov     ecx, 1; Count                                                  ; +0x3e, 0x1801353ca\ncall    _calloc_base                                                   ; +0x43, 0x1801353cf\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x48, 0x1801353d4\nmov     rbx, rax                                                       ; +0x4e, 0x1801353da\ntest    rax, rax                                                       ; +0x51, 0x1801353dd\njnz     short loc_1801353F2                                            ; +0x54, 0x1801353e0\nxor     edx, edx; lpTlsValue                                           ; +0x56, 0x1801353e2\ncall    __acrt_FlsSetValue                                             ; +0x58, 0x1801353e4\nxor     ecx, ecx; Block                                                ; +0x5d, 0x1801353e9\ncall    _free_base                                                     ; +0x5f, 0x1801353eb\njmp     short loc_18013542D                                            ; +0x64, 0x1801353f0\nmov     rdx, rbx; lpTlsValue                                           ; +0x66, 0x1801353f2\ncall    __acrt_FlsSetValue                                             ; +0x69, 0x1801353f5\ntest    eax, eax                                                       ; +0x6e, 0x1801353fa\njnz     short loc_180135410                                            ; +0x70, 0x1801353fc\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x72, 0x1801353fe\nxor     edx, edx; lpTlsValue                                           ; +0x78, 0x180135404\ncall    __acrt_FlsSetValue                                             ; +0x7a, 0x180135406\nmov     rcx, rbx                                                       ; +0x7f, 0x18013540b\njmp     short loc_1801353EB                                            ; +0x82, 0x18013540e\nmov     rcx, rbx; struct __acrt_ptd *                                  ; +0x84, 0x180135410\ncall    ?construct_ptd_array@@YAXQEAU__acrt_ptd@@@Z                    ; +0x87, 0x180135413\nxor     ecx, ecx; Block                                                ; +0x8c, 0x180135418\ncall    _free_base                                                     ; +0x8e, 0x18013541a\ntest    rbx, rbx                                                       ; +0x93, 0x18013541f\njz      short loc_18013542D                                            ; +0x96, 0x180135422\nmov     rax, rbx                                                       ; +0x98, 0x180135424\nadd     rsp, 20h                                                       ; +0x9b, 0x180135427\npop     rbx                                                            ; +0x9f, 0x18013542b\nretn                                                                   ; +0xa0, 0x18013542c\ncall    abort                                                          ; +0xa1, 0x18013542d\ndb 0CCh                                                                ; +0xa6, 0x180135432", "xrefs": ["__acrt_initialize_multibyte @ 0x18013a84b", "<???> @ 0x18020335c", "<???> @ 0x180203368"], "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"}