//
// convert_filetime_to_time_t<__int64> from 0x1801293bc to 0x180129454 (152 bytes)
//
// 5 xrefs:
// > common_stat_handle_file_opened<_stat64i32> @ 0x1801292cc
// > common_stat_handle_file_opened<_stat64i32> @ 0x1801292dc
// > common_stat_handle_file_opened<_stat64i32> @ 0x1801292ed
// > ??> @ 0x180202a74
// > ??> @ 0x180202a80
//
// 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
//
__int64 __fastcall convert_filetime_to_time_t<__int64>(FILETIME a1, __int64 a2)
{
FILETIME FileTime; // [rsp+40h] [rbp-30h] BYREF
struct _SYSTEMTIME LocalTime; // [rsp+48h] [rbp-28h] BYREF
struct _SYSTEMTIME SystemTime; // [rsp+58h] [rbp-18h] BYREF
FileTime = a1;
if ( a1 )
{
if ( FileTimeToSystemTime(&FileTime, &SystemTime)
&& SystemTimeToTzSpecificLocalTime(nullptr, &SystemTime, &LocalTime) )
{
return common_loctotime_t<__int64>(
LocalTime.wYear,
LocalTime.wMonth,
LocalTime.wDay,
LocalTime.wHour,
LocalTime.wMinute,
LocalTime.wSecond,
-1);
}
else
{
return -1;
}
}
else
{
return a2;
}
}