//
// sub_100539D24 from 0x100539d24 to 0x100539d94 (112 bytes)
//
// 13 xrefs:
// > sub_100537D24 @ 0x10053812c
// > sub_100537D24 @ 0x100538360
// > sub_100537D24 @ 0x1005383f4
// > sub_100537D24 @ 0x100538534
// > sub_100537D24 @ 0x100538580
// > sub_100537D24 @ 0x10053863c
// > sub_100538A48 @ 0x100538d1c
// > sub_100538A48 @ 0x100538e00
// > sub_100538A48 @ 0x100538e40
// > sub_100538A48 @ 0x100538ef4
// > sub_100538A48 @ 0x100539048
// > sub_100538A48 @ 0x1005391f4
// > sub_10053D350 @ 0x10053d4a4
//
// 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 sub_100539D24(__int64 a1)
{
__int64 v2; // x8
__int64 v3; // x0
v2 = *(_QWORD *)(a1 + 136);
if ( !*(_QWORD *)(v2 + 848) && !*(_DWORD *)(v2 + 856) )
*(_WORD *)(v2 + 864) = 1;
gettimeofday((timeval *)(v2 + 848), nullptr);
*(_QWORD *)(*(_QWORD *)(a1 + 136) + 848LL) += *(unsigned __int16 *)(*(_QWORD *)(a1 + 136) + 864LL);
v3 = sub_10053E838(a1);
return sub_1005DAB78(v3, 45, 0, *(_QWORD *)(a1 + 136) + 848LL);
}