//
// sub_1400AD780 from 0x1400ad780 to 0x1400ad8e2 (354 bytes)
//
// 3 xrefs:
// > sub_1400AD8F0 @ 0x1400adaab
// > AccountReviewPopup::updateCard @ 0x1400b2392
// > ??> @ 0x140913484
//
// 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:10 +0000
//
_QWORD *__fastcall sub_1400AD780(_QWORD *a1, unsigned int a2)
{
unsigned int v5; // r9d
const char *v6; // r8
cocos2d::CCString *v7; // rax
const char *CString; // rax
size_t v9; // r8
unsigned int v10; // edx
const char *v11; // r8
cocos2d::CCString *v12; // rax
cocos2d::CCString *v13; // rax
if ( (int)a2 > 0 )
{
v5 = a2 / 0x5A0;
if ( a2 == 1440 * (a2 / 0x5A0) )
{
v6 = (const char *)&unk_14070D03C;
if ( v5 == 1 )
v6 = &byte_1406ED6E0;
v7 = cocos2d::CCString::createWithFormat("%i Day%s", v5, v6);
CString = cocos2d::CCString::getCString(v7);
v9 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v9;
while ( CString[v9] );
}
else
{
v10 = a2 / 0x3C;
if ( a2 == 60 * (a2 / 0x3C) )
{
v11 = (const char *)&unk_14070D03C;
if ( v10 == 1 )
v11 = &byte_1406ED6E0;
v12 = cocos2d::CCString::createWithFormat("%i Hour%s", v10, v11);
CString = cocos2d::CCString::getCString(v12);
v9 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v9;
while ( CString[v9] );
}
else
{
v13 = cocos2d::CCString::createWithFormat("%i Min", a2);
CString = cocos2d::CCString::getCString(v13);
v9 = -1;
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 0;
do
++v9;
while ( CString[v9] );
}
}
sub_14003D230(a1, CString, v9);
return a1;
}
else
{
*(_OWORD *)a1 = 0;
a1[2] = 0;
a1[3] = 15;
*(_BYTE *)a1 = 0;
return a1;
}
}