//
// tzset_from_system_nolock from 0x18013cfc0 to 0x18013d147 (391 bytes)
//
// 2 xrefs:
// > tzset_nolock @ 0x18013d21e
// > ??> @ 0x180203a58
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall tzset_from_system_nolock()
{
void **v0; // rdi
__int64 v1; // rax
int v2; // ebx
void **v3; // rsi
int v4; // ecx
unsigned int v5; // ebx
int v6; // ebx
int v7; // ebx
int v8; // ebx
int v9; // [rsp+50h] [rbp+20h] BYREF
int v10; // [rsp+58h] [rbp+28h] BYREF
int v11; // [rsp+60h] [rbp+30h] BYREF
v0 = (void **)sub_18013C6BC();
v1 = sub_18013C6C4();
v2 = 0;
v9 = 0;
v3 = (void **)v1;
v10 = 0;
v11 = 0;
if ( (unsigned int)sub_18013C72C(&v9) || (unsigned int)sub_18013C6CC(&v10) || (unsigned int)sub_18013C6FC(&v11) )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
free_base(qword_1801F5650);
qword_1801F5650 = nullptr;
if ( GetTimeZoneInformation(&TimeZoneInformation) != -1 )
{
v4 = 1;
dword_1801F5660 = 1;
v9 = 60 * TimeZoneInformation.Bias;
if ( TimeZoneInformation.StandardDate.wMonth )
v9 = 60 * TimeZoneInformation.Bias + 60 * TimeZoneInformation.StandardBias;
if ( TimeZoneInformation.DaylightDate.wMonth && TimeZoneInformation.DaylightBias )
v2 = 60 * (TimeZoneInformation.DaylightBias - TimeZoneInformation.StandardBias);
else
v4 = 0;
v11 = v2;
v10 = v4;
memset(*v3, 0, 0x80u);
memset(v3[1], 0, 0x80u);
memset(*v0, 0, 0x40u);
memset(v0[1], 0, 0x40u);
v5 = __lc_codepage_func();
tzset_os_copy_to_tzname(TimeZoneInformation.StandardName, (wchar_t *const)*v3, (char *const)*v0, v5);
tzset_os_copy_to_tzname(TimeZoneInformation.DaylightName, (wchar_t *const)v3[1], (char *const)v0[1], v5);
}
v6 = v9;
*sub_18013C6B4() = v6;
v7 = v10;
*sub_18013C6A4() = v7;
v8 = v11;
*sub_18013C6AC() = v8;
}