//
// sub_F5C760 from 0xf5c760 to 0xf5caa4 (836 bytes)
//
// 21 xrefs:
// > std::__ndk1::time_get>>::do_get_year @ 0xf5b954
// > std::__ndk1::time_get>>::__get_year @ 0xf5b9f4
// > std::__ndk1::time_get>>::do_get @ 0xf5bbd8
// > std::__ndk1::time_get>>::do_get @ 0xf5bc64
// > std::__ndk1::time_get>>::do_get @ 0xf5bc94
// > std::__ndk1::time_get>>::do_get @ 0xf5bcc8
// > std::__ndk1::time_get>>::do_get @ 0xf5bd0c
// > std::__ndk1::time_get>>::do_get @ 0xf5bd60
// > std::__ndk1::time_get>>::do_get @ 0xf5bdc0
// > std::__ndk1::time_get>>::do_get @ 0xf5bdf0
// > std::__ndk1::time_get>>::do_get @ 0xf5be78
// > std::__ndk1::time_get>>::do_get @ 0xf5bed0
// > std::__ndk1::time_get>>::__get_day @ 0xf5c000
// > std::__ndk1::time_get>>::__get_hour @ 0xf5c05c
// > std::__ndk1::time_get>>::__get_12_hour @ 0xf5c0b4
// > std::__ndk1::time_get>>::__get_day_year_num @ 0xf5c110
// > std::__ndk1::time_get>>::__get_month @ 0xf5c168
// > std::__ndk1::time_get>>::__get_minute @ 0xf5c1c4
// > std::__ndk1::time_get>>::__get_second @ 0xf5c4ac
// > std::__ndk1::time_get>>::__get_weekday @ 0xf5c504
// > std::__ndk1::time_get>>::__get_year4 @ 0xf5c55c
//
// This function is hookable on this platform (idp: arm, 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 13:13:24 +0000
//
__int64 __fastcall sub_F5C760(_QWORD *a1, _QWORD *a2, int *a3, _QWORD *a4, int a5)
{
_QWORD *v6; // x0
_BOOL4 v11; // w24
unsigned __int8 *v12; // x8
unsigned int v13; // w8
unsigned int v14; // w24
int v15; // w8
unsigned __int8 v17; // w8
_QWORD *v18; // x0
int v19; // w24
__int64 v20; // x9
_QWORD *v21; // x25
_QWORD *v22; // x8
int v23; // w0
unsigned __int8 *v24; // x9
unsigned __int8 v25; // w1
unsigned __int8 v26; // w8
__int64 v27; // x9
v6 = (_QWORD *)*a1;
if ( v6 && v6[3] == v6[4] )
{
if ( (*(unsigned int (__fastcall **)(_QWORD *))(*v6 + 72LL))(v6) == -1 )
{
v6 = nullptr;
*a1 = 0;
}
else
{
v6 = (_QWORD *)*a1;
}
}
if ( !a2 )
{
if ( v6 )
{
a2 = nullptr;
goto LABEL_15;
}
goto LABEL_17;
}
if ( a2[3] != a2[4] )
{
if ( !v6 )
goto LABEL_15;
LABEL_17:
v14 = 0;
v15 = *a3 | 6;
goto LABEL_22;
}
v11 = v6 == nullptr;
if ( (*(unsigned int (__fastcall **)(_QWORD *))(*a2 + 72LL))(a2) == -1 )
a2 = nullptr;
if ( ((v11 ^ (a2 == nullptr)) & 1) == 0 )
goto LABEL_17;
LABEL_15:
v12 = *(unsigned __int8 **)(*a1 + 24LL);
if ( v12 == *(unsigned __int8 **)(*a1 + 32LL) )
v13 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*a1 + 72LL))(*a1);
else
v13 = *v12;
if ( ((char)v13 & 0x80000000) == 0 && (*(_BYTE *)(a4[2] + 8LL * (unsigned __int8)v13) & 0x40) != 0 )
{
v17 = (*(__int64 (__fastcall **)(_QWORD *, _QWORD, _QWORD))(*a4 + 72LL))(a4, v13, 0);
v18 = (_QWORD *)*a1;
v19 = v17;
v20 = *(_QWORD *)(*a1 + 24LL);
if ( v20 == *(_QWORD *)(*a1 + 32LL) )
goto LABEL_46;
v18[3] = v20 + 1;
while ( 1 )
{
v21 = (_QWORD *)*a1;
if ( *a1 && v21[3] == v21[4] )
{
if ( (*(unsigned int (__fastcall **)(_QWORD))(*v21 + 72LL))(*a1) == -1 )
{
v21 = nullptr;
*a1 = 0;
}
else
{
v21 = (_QWORD *)*a1;
}
}
v14 = v19 - 48;
if ( a2 && a2[3] == a2[4] )
{
v23 = (*(__int64 (__fastcall **)(_QWORD *))(*a2 + 72LL))(a2);
v22 = (_QWORD *)*a1;
if ( v23 == -1 )
a2 = nullptr;
}
else
{
v22 = v21;
}
if ( a5 < 2 || (v21 == nullptr) == (a2 == nullptr) )
break;
v24 = (unsigned __int8 *)v22[3];
if ( v24 == (unsigned __int8 *)v22[4] )
v25 = (unsigned __int8)(*(_QWORD *(__fastcall **)(_QWORD *__return_ptr, _QWORD *))(*v22 + 72LL))(v22, v22);
else
v25 = *v24;
if ( (char)v25 < 0 || (*(_BYTE *)(a4[2] + 8LL * v25) & 0x40) == 0 )
return v14;
--a5;
v26 = (*(__int64 (__fastcall **)(_QWORD *))(*a4 + 72LL))(a4);
v18 = (_QWORD *)*a1;
v19 = 10 * v14 + v26;
v27 = *(_QWORD *)(*a1 + 24LL);
if ( v27 == *(_QWORD *)(*a1 + 32LL) )
LABEL_46:
(*(void (__fastcall **)(_QWORD *))(*v18 + 80LL))(v18);
else
v18[3] = v27 + 1;
}
if ( v22 && v22[3] == v22[4] )
{
if ( (unsigned int)(*(_QWORD *(__fastcall **)(_QWORD *__return_ptr, _QWORD *))(*v22 + 72LL))(v22, v22) == -1 )
{
v22 = nullptr;
*a1 = 0;
}
else
{
v22 = (_QWORD *)*a1;
}
}
if ( a2 )
{
if ( a2[3] == a2[4] )
{
if ( (v22 == nullptr) != ((*(unsigned int (__fastcall **)(_QWORD *))(*a2 + 72LL))(a2) == -1 || a2 == nullptr) )
return v14;
}
else if ( !v22 )
{
return v14;
}
}
else if ( v22 )
{
return v14;
}
v15 = *a3 | 2;
}
else
{
v14 = 0;
v15 = *a3 | 4;
}
LABEL_22:
*a3 = v15;
return v14;
}