{"type": "func", "start": 6443717304, "end": 6443717516, "name": "__acrt_getptd", "pseudocode": "// \n// __acrt_getptd from 0x1801352b8 to 0x18013538c (212 bytes)\n// \n// 13 xrefs:\n// > _LocaleUpdate::_LocaleUpdate @ 0x18012948e\n// > unknown_libname_61 @ 0x1801309a1\n// > terminate @ 0x180132a88\n// > __pctype_func @ 0x180136af8\n// > raise @ 0x1801397ae\n// > raise @ 0x1801397be\n// > raise @ 0x180139834\n// > raise @ 0x180139877\n// > __acrt_update_thread_multibyte_data @ 0x18013a878\n// > __acrt_update_thread_locale_data @ 0x18013c4d6\n// > ___lc_codepage_func @ 0x18013d344\n// > _write_nolock @ 0x18014040d\n// > <???> @ 0x18020335c\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 _acrt_getptd()\n{\n  DWORD LastError; // eax\n  DWORD v1; // ecx\n  DWORD v2; // ebx\n  __int64 Value; // rax\n  struct __acrt_ptd *v4; // rdi\n  struct __acrt_ptd *v5; // rsi\n  struct __acrt_ptd *v6; // rax\n  struct __acrt_ptd *v7; // rcx\n  __int64 result; // rax\n\n  LastError = GetLastError();\n  v1 = dword_1801B1870;\n  v2 = LastError;\n  if ( dword_1801B1870 == -1 )\n  {\nLABEL_6:\n    if ( !(unsigned int)_acrt_FlsSetValue(v1, (LPVOID)0xFFFFFFFFFFFFFFFFLL) )\n      goto LABEL_4;\n    v6 = (struct __acrt_ptd *)calloc_base(1u, 0x3C8u);\n    v4 = v6;\n    if ( v6 )\n    {\n      if ( (unsigned int)_acrt_FlsSetValue(dword_1801B1870, v6) )\n      {\n        construct_ptd_array(v4);\n        free_base(nullptr);\n        goto LABEL_13;\n      }\n      _acrt_FlsSetValue(dword_1801B1870, nullptr);\n      v7 = v4;\n    }\n    else\n    {\n      _acrt_FlsSetValue(dword_1801B1870, nullptr);\n      v7 = nullptr;\n    }\n    free_base(v7);\n    goto LABEL_4;\n  }\n  Value = _acrt_FlsGetValue();\n  v4 = (struct __acrt_ptd *)Value;\n  if ( !Value )\n  {\n    v1 = dword_1801B1870;\n    goto LABEL_6;\n  }\n  if ( Value == -1 )\n  {\nLABEL_4:\n    v4 = nullptr;\n    v5 = nullptr;\n    goto LABEL_14;\n  }\nLABEL_13:\n  v5 = v4;\nLABEL_14:\n  SetLastError(v2);\n  result = (unsigned __int64)v5 & -(__int64)(v4 != nullptr);\n  if ( !result )\n    abort();\n  return result;\n}", "assembly": "; \n; __acrt_getptd from 0x1801352b8 to 0x18013538c (212 bytes)\n; \n; 13 xrefs:\n; > _LocaleUpdate::_LocaleUpdate @ 0x18012948e\n; > unknown_libname_61 @ 0x1801309a1\n; > terminate @ 0x180132a88\n; > __pctype_func @ 0x180136af8\n; > raise @ 0x1801397ae\n; > raise @ 0x1801397be\n; > raise @ 0x180139834\n; > raise @ 0x180139877\n; > __acrt_update_thread_multibyte_data @ 0x18013a878\n; > __acrt_update_thread_locale_data @ 0x18013c4d6\n; > ___lc_codepage_func @ 0x18013d344\n; > _write_nolock @ 0x18014040d\n; > <???> @ 0x18020335c\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, 0x1801352b8\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1801352bd\npush    rdi                                                            ; +0xa, 0x1801352c2\nsub     rsp, 20h                                                       ; +0xb, 0x1801352c3\ncall    cs:GetLastError                                                ; +0xf, 0x1801352c7\nmov     ecx, cs:dword_1801B1870                                        ; +0x15, 0x1801352cd\nmov     ebx, eax                                                       ; +0x1b, 0x1801352d3\ncmp     ecx, 0FFFFFFFFh                                                ; +0x1d, 0x1801352d5\njz      short loc_1801352F9                                            ; +0x20, 0x1801352d8\ncall    __acrt_FlsGetValue                                             ; +0x22, 0x1801352da\nmov     rdi, rax                                                       ; +0x27, 0x1801352df\ntest    rax, rax                                                       ; +0x2a, 0x1801352e2\njz      short loc_1801352F3                                            ; +0x2d, 0x1801352e5\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x2f, 0x1801352e7\njnz     short loc_180135360                                            ; +0x33, 0x1801352eb\nxor     edi, edi                                                       ; +0x35, 0x1801352ed\nxor     esi, esi                                                       ; +0x37, 0x1801352ef\njmp     short loc_180135363                                            ; +0x39, 0x1801352f1\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x3b, 0x1801352f3\nor      rdx, 0FFFFFFFFFFFFFFFFh; lpTlsValue                            ; +0x41, 0x1801352f9\ncall    __acrt_FlsSetValue                                             ; +0x45, 0x1801352fd\ntest    eax, eax                                                       ; +0x4a, 0x180135302\njz      short loc_1801352ED                                            ; +0x4c, 0x180135304\nmov     edx, 3C8h; Size                                                ; +0x4e, 0x180135306\nmov     ecx, 1; Count                                                  ; +0x53, 0x18013530b\ncall    _calloc_base                                                   ; +0x58, 0x180135310\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x5d, 0x180135315\nmov     rdi, rax                                                       ; +0x63, 0x18013531b\ntest    rax, rax                                                       ; +0x66, 0x18013531e\njnz     short loc_180135333                                            ; +0x69, 0x180135321\nxor     edx, edx; lpTlsValue                                           ; +0x6b, 0x180135323\ncall    __acrt_FlsSetValue                                             ; +0x6d, 0x180135325\nxor     ecx, ecx; Block                                                ; +0x72, 0x18013532a\ncall    _free_base                                                     ; +0x74, 0x18013532c\njmp     short loc_1801352ED                                            ; +0x79, 0x180135331\nmov     rdx, rdi; lpTlsValue                                           ; +0x7b, 0x180135333\ncall    __acrt_FlsSetValue                                             ; +0x7e, 0x180135336\ntest    eax, eax                                                       ; +0x83, 0x18013533b\njnz     short loc_180135351                                            ; +0x85, 0x18013533d\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x87, 0x18013533f\nxor     edx, edx; lpTlsValue                                           ; +0x8d, 0x180135345\ncall    __acrt_FlsSetValue                                             ; +0x8f, 0x180135347\nmov     rcx, rdi                                                       ; +0x94, 0x18013534c\njmp     short loc_18013532C                                            ; +0x97, 0x18013534f\nmov     rcx, rdi; struct __acrt_ptd *                                  ; +0x99, 0x180135351\ncall    ?construct_ptd_array@@YAXQEAU__acrt_ptd@@@Z                    ; +0x9c, 0x180135354\nxor     ecx, ecx; Block                                                ; +0xa1, 0x180135359\ncall    _free_base                                                     ; +0xa3, 0x18013535b\nmov     rsi, rdi                                                       ; +0xa8, 0x180135360\nmov     ecx, ebx; dwErrCode                                            ; +0xab, 0x180135363\ncall    cs:SetLastError                                                ; +0xad, 0x180135365\nneg     rdi                                                            ; +0xb3, 0x18013536b\nsbb     rax, rax                                                       ; +0xb6, 0x18013536e\nand     rax, rsi                                                       ; +0xb9, 0x180135371\njz      short loc_180135386                                            ; +0xbc, 0x180135374\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbe, 0x180135376\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc3, 0x18013537b\nadd     rsp, 20h                                                       ; +0xc8, 0x180135380\npop     rdi                                                            ; +0xcc, 0x180135384\nretn                                                                   ; +0xcd, 0x180135385\ncall    abort                                                          ; +0xce, 0x180135386\nalign 4                                                                ; +0xd3, 0x18013538b", "xrefs": ["_LocaleUpdate::_LocaleUpdate @ 0x18012948e", "unknown_libname_61 @ 0x1801309a1", "terminate @ 0x180132a88", "__pctype_func @ 0x180136af8", "raise @ 0x1801397ae", "raise @ 0x1801397be", "raise @ 0x180139834", "raise @ 0x180139877", "__acrt_update_thread_multibyte_data @ 0x18013a878", "__acrt_update_thread_locale_data @ 0x18013c4d6", "___lc_codepage_func @ 0x18013d344", "_write_nolock @ 0x18014040d", "<???> @ 0x18020335c"], "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"}