{"type": "func", "start": 6443717684, "end": 6443717888, "name": "__acrt_getptd_noexit", "pseudocode": "// \n// __acrt_getptd_noexit from 0x180135434 to 0x180135500 (204 bytes)\n// \n// 11 xrefs:\n// > __acrt_errno_map_os_error @ 0x18012fdec\n// > __acrt_errno_map_os_error @ 0x18012fe05\n// > __doserrno @ 0x18012fe34\n// > _errno @ 0x18012fe54\n// > common_end_thread @ 0x1801309f8\n// > _seh_filter_exe @ 0x180131689\n// > Concurrency::details::ScheduleGroupSegmentBase::HasUnrealizedChores @ 0x180132978\n// > _invalid_parameter @ 0x180132d0c\n// > __acrt_initialize_ptd @ 0x18013551f\n// > raise @ 0x1801396ad\n// > <???> @ 0x180203374\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_noexit()\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\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_13:\n    v5 = v4;\n    goto LABEL_14;\n  }\nLABEL_4:\n  v4 = nullptr;\n  v5 = nullptr;\nLABEL_14:\n  SetLastError(v2);\n  return (unsigned __int64)v5 & -(__int64)(v4 != nullptr);\n}", "assembly": "; \n; __acrt_getptd_noexit from 0x180135434 to 0x180135500 (204 bytes)\n; \n; 11 xrefs:\n; > __acrt_errno_map_os_error @ 0x18012fdec\n; > __acrt_errno_map_os_error @ 0x18012fe05\n; > __doserrno @ 0x18012fe34\n; > _errno @ 0x18012fe54\n; > common_end_thread @ 0x1801309f8\n; > _seh_filter_exe @ 0x180131689\n; > Concurrency::details::ScheduleGroupSegmentBase::HasUnrealizedChores @ 0x180132978\n; > _invalid_parameter @ 0x180132d0c\n; > __acrt_initialize_ptd @ 0x18013551f\n; > raise @ 0x1801396ad\n; > <???> @ 0x180203374\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, 0x180135434\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180135439\npush    rdi                                                            ; +0xa, 0x18013543e\nsub     rsp, 20h                                                       ; +0xb, 0x18013543f\ncall    cs:GetLastError                                                ; +0xf, 0x180135443\nmov     ecx, cs:dword_1801B1870                                        ; +0x15, 0x180135449\nmov     ebx, eax                                                       ; +0x1b, 0x18013544f\ncmp     ecx, 0FFFFFFFFh                                                ; +0x1d, 0x180135451\njz      short loc_180135475                                            ; +0x20, 0x180135454\ncall    __acrt_FlsGetValue                                             ; +0x22, 0x180135456\nmov     rdi, rax                                                       ; +0x27, 0x18013545b\ntest    rax, rax                                                       ; +0x2a, 0x18013545e\njz      short loc_18013546F                                            ; +0x2d, 0x180135461\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x2f, 0x180135463\njnz     short loc_1801354DC                                            ; +0x33, 0x180135467\nxor     edi, edi                                                       ; +0x35, 0x180135469\nxor     esi, esi                                                       ; +0x37, 0x18013546b\njmp     short loc_1801354DF                                            ; +0x39, 0x18013546d\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x3b, 0x18013546f\nor      rdx, 0FFFFFFFFFFFFFFFFh; lpTlsValue                            ; +0x41, 0x180135475\ncall    __acrt_FlsSetValue                                             ; +0x45, 0x180135479\ntest    eax, eax                                                       ; +0x4a, 0x18013547e\njz      short loc_180135469                                            ; +0x4c, 0x180135480\nmov     edx, 3C8h; Size                                                ; +0x4e, 0x180135482\nmov     ecx, 1; Count                                                  ; +0x53, 0x180135487\ncall    _calloc_base                                                   ; +0x58, 0x18013548c\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x5d, 0x180135491\nmov     rdi, rax                                                       ; +0x63, 0x180135497\ntest    rax, rax                                                       ; +0x66, 0x18013549a\njnz     short loc_1801354AF                                            ; +0x69, 0x18013549d\nxor     edx, edx; lpTlsValue                                           ; +0x6b, 0x18013549f\ncall    __acrt_FlsSetValue                                             ; +0x6d, 0x1801354a1\nxor     ecx, ecx; Block                                                ; +0x72, 0x1801354a6\ncall    _free_base                                                     ; +0x74, 0x1801354a8\njmp     short loc_180135469                                            ; +0x79, 0x1801354ad\nmov     rdx, rdi; lpTlsValue                                           ; +0x7b, 0x1801354af\ncall    __acrt_FlsSetValue                                             ; +0x7e, 0x1801354b2\ntest    eax, eax                                                       ; +0x83, 0x1801354b7\njnz     short loc_1801354CD                                            ; +0x85, 0x1801354b9\nmov     ecx, cs:dword_1801B1870; dwTlsIndex                            ; +0x87, 0x1801354bb\nxor     edx, edx; lpTlsValue                                           ; +0x8d, 0x1801354c1\ncall    __acrt_FlsSetValue                                             ; +0x8f, 0x1801354c3\nmov     rcx, rdi                                                       ; +0x94, 0x1801354c8\njmp     short loc_1801354A8                                            ; +0x97, 0x1801354cb\nmov     rcx, rdi; struct __acrt_ptd *                                  ; +0x99, 0x1801354cd\ncall    ?construct_ptd_array@@YAXQEAU__acrt_ptd@@@Z                    ; +0x9c, 0x1801354d0\nxor     ecx, ecx; Block                                                ; +0xa1, 0x1801354d5\ncall    _free_base                                                     ; +0xa3, 0x1801354d7\nmov     rsi, rdi                                                       ; +0xa8, 0x1801354dc\nmov     ecx, ebx; dwErrCode                                            ; +0xab, 0x1801354df\ncall    cs:SetLastError                                                ; +0xad, 0x1801354e1\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xb3, 0x1801354e7\nneg     rdi                                                            ; +0xb8, 0x1801354ec\nsbb     rax, rax                                                       ; +0xbb, 0x1801354ef\nand     rax, rsi                                                       ; +0xbe, 0x1801354f2\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc1, 0x1801354f5\nadd     rsp, 20h                                                       ; +0xc6, 0x1801354fa\npop     rdi                                                            ; +0xca, 0x1801354fe\nretn                                                                   ; +0xcb, 0x1801354ff", "xrefs": ["__acrt_errno_map_os_error @ 0x18012fdec", "__acrt_errno_map_os_error @ 0x18012fe05", "__doserrno @ 0x18012fe34", "_errno @ 0x18012fe54", "common_end_thread @ 0x1801309f8", "_seh_filter_exe @ 0x180131689", "Concurrency::details::ScheduleGroupSegmentBase::HasUnrealizedChores @ 0x180132978", "_invalid_parameter @ 0x180132d0c", "__acrt_initialize_ptd @ 0x18013551f", "raise @ 0x1801396ad", "<???> @ 0x180203374"], "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"}