//
// sub_140104080 from 0x140104080 to 0x140104151 (209 bytes)
//
// 3 xrefs:
// > DeathTrackerPopup::refreshView @ 0x14010761f
// > DeathTrackerPopup::buildHistory @ 0x14010c54b
// > ??> @ 0x1409159c8
//
// 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 11:26:43 +0000
//
_QWORD *__fastcall sub_140104080(_QWORD *a1, int a2)
{
struct tm *v3; // rax
size_t v4; // r8
__time64_t Time[2]; // [rsp+20h] [rbp-38h] BYREF
char Buffer[16]; // [rsp+30h] [rbp-28h] BYREF
__int64 v8; // [rsp+40h] [rbp-18h]
Time[0] = (__time64_t)a1;
if ( a2 > 0 )
{
Time[0] = a2;
v3 = localtime64(Time);
v8 = 0;
*(_OWORD *)Buffer = 0;
if ( v3 )
strftime(Buffer, 0x18u, "%m/%d/%y", v3);
*(_OWORD *)a1 = 0;
a1[2] = 0;
v4 = -1;
a1[3] = 0;
do
++v4;
while ( Buffer[v4] );
sub_14003D230(a1, Buffer, v4);
}
else
{
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 15;
*(_BYTE *)a1 = 0;
}
return a1;
}