//
// _isindst_nolock from 0x18013c75c to 0x18013ca4e (754 bytes)
//
// 2 xrefs:
// > _isindst @ 0x18013d327
// > ??> @ 0x180203a28
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:55:03 +0000
//
__int64 __fastcall _isindst_nolock(struct tm *const a1)
{
unsigned int v2; // edi
int tm_year; // esi
int wMilliseconds; // r14d
int wSecond; // r15d
int wMinute; // r12d
int wHour; // r13d
__int64 wMonth; // rbx
int v9; // ecx
int v10; // eax
__int64 v11; // rdx
int wDayOfWeek; // ecx
int wDay; // r8d
int v14; // eax
int tm_yday; // eax
int v17; // ecx
int v18; // [rsp+98h] [rbp+10h] BYREF
v2 = 0;
v18 = 0;
if ( (unsigned int)sub_18013C6CC(&v18) )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
if ( !v18 )
return 0;
tm_year = a1->tm_year;
if ( tm_year != dword_1801B2140 || tm_year != dword_1801B2150 )
{
if ( dword_1801F5660 )
{
if ( TimeZoneInformation.DaylightDate.wYear )
{
wMilliseconds = TimeZoneInformation.DaylightDate.wMilliseconds;
wSecond = TimeZoneInformation.DaylightDate.wSecond;
wMinute = TimeZoneInformation.DaylightDate.wMinute;
wHour = TimeZoneInformation.DaylightDate.wHour;
wMonth = TimeZoneInformation.DaylightDate.wMonth;
if ( unknown_libname_67(tm_year) )
v9 = dword_18017A634[wMonth];
else
v9 = dword_18017A5FC[wMonth];
dword_1801B2140 = tm_year;
dword_1801B2144 = v9 + TimeZoneInformation.DaylightDate.wDay;
dword_1801B2148 = wMilliseconds + 1000 * (wSecond + 60 * (wMinute + 60 * wHour));
}
else
{
cvtdate(
0,
1,
(unsigned int)tm_year,
TimeZoneInformation.DaylightDate.wMonth,
TimeZoneInformation.DaylightDate.wDay,
TimeZoneInformation.DaylightDate.wDayOfWeek,
0,
TimeZoneInformation.DaylightDate.wHour,
TimeZoneInformation.DaylightDate.wMinute,
TimeZoneInformation.DaylightDate.wSecond,
TimeZoneInformation.DaylightDate.wMilliseconds);
}
if ( TimeZoneInformation.StandardDate.wYear )
{
wDay = TimeZoneInformation.StandardDate.wDay;
v11 = 0;
v10 = 0;
wDayOfWeek = 0;
}
else
{
v10 = TimeZoneInformation.StandardDate.wDay;
v11 = 1;
wDayOfWeek = TimeZoneInformation.StandardDate.wDayOfWeek;
wDay = 0;
}
cvtdate(
1,
v11,
(unsigned int)a1->tm_year,
TimeZoneInformation.StandardDate.wMonth,
v10,
wDayOfWeek,
wDay,
TimeZoneInformation.StandardDate.wHour,
TimeZoneInformation.StandardDate.wMinute,
TimeZoneInformation.StandardDate.wSecond,
TimeZoneInformation.StandardDate.wMilliseconds);
}
else
{
cvtdate(0, 1, (unsigned int)tm_year, (unsigned int)(tm_year < 107) + 3, (tm_year >= 107) + 1, 0, 0, 2, 0, 0, 0);
v14 = 5;
if ( tm_year >= 107 )
v14 = 1;
cvtdate(1, 1, (unsigned int)a1->tm_year, (unsigned int)(tm_year >= 107) + 10, v14, 0, 0, 2, 0, 0, 0);
}
}
tm_yday = a1->tm_yday;
if ( dword_1801B2144 >= dword_1801B2154 )
{
if ( tm_yday < dword_1801B2154 || tm_yday > dword_1801B2144 )
return 1;
if ( tm_yday <= dword_1801B2154 || tm_yday >= dword_1801B2144 )
goto LABEL_29;
return 0;
}
if ( tm_yday < dword_1801B2144 || tm_yday > dword_1801B2154 )
return 0;
if ( tm_yday > dword_1801B2144 && tm_yday < dword_1801B2154 )
return 1;
LABEL_29:
v17 = 1000 * (a1->tm_sec + 60 * (a1->tm_min + 60 * a1->tm_hour));
if ( tm_yday == dword_1801B2144 )
LOBYTE(v2) = v17 >= dword_1801B2148;
else
LOBYTE(v2) = v17 < dword_1801B2158;
return v2;
}