//
// std::__ndk1::__time_get_storage::__analyze from 0xf766d4 to 0xf76d78 (1700 bytes)
//
// 5 xrefs:
// > std::__ndk1::__time_get_storage::init @ 0xf77744
// > std::__ndk1::__time_get_storage::init @ 0xf777a8
// > std::__ndk1::__time_get_storage::init @ 0xf7780c
// > std::__ndk1::__time_get_storage::init @ 0xf77870
// > ??> @ 0xa5058
//
// 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:43 +0000
//
__int64 __usercall std::__time_get_storage::__analyze@(
__int64 a1@,
unsigned __int8 a2@,
__int64 a3@,
_QWORD *a4@)
{
__int64 v8; // x22
__int64 result; // x0
__int64 v10; // x27
wchar_t *v11; // x28
int v12; // w9
wchar_t *v13; // x26
__int64 v14; // x24
__int64 v15; // x25
unsigned __int64 v16; // x8
unsigned __int64 v17; // x8
unsigned __int64 v18; // x9
unsigned __int64 v19; // x9
char v20; // w0
unsigned int v21; // w27
int v22; // w25
int v23; // w24
unsigned int v24; // w27
unsigned __int64 v25; // x8
unsigned __int64 v26; // x2
unsigned __int64 v27; // x8
char *v28; // x9
unsigned __int64 v29; // x8
wchar_t *i; // x8
int v31; // [xsp+1Ch] [xbp-2C4h]
unsigned __int8 *v32; // [xsp+20h] [xbp-2C0h]
int v33; // [xsp+34h] [xbp-2ACh] BYREF
wchar_t *v34; // [xsp+38h] [xbp-2A8h] BYREF
char *src; // [xsp+40h] [xbp-2A0h] BYREF
mbstate_t ps; // [xsp+48h] [xbp-298h] BYREF
__int128 v37; // [xsp+50h] [xbp-290h]
__int128 v38; // [xsp+60h] [xbp-280h]
int v39; // [xsp+70h] [xbp-270h]
int v40; // [xsp+74h] [xbp-26Ch]
__int64 v41; // [xsp+78h] [xbp-268h]
__int64 v42; // [xsp+80h] [xbp-260h]
char v43; // [xsp+90h] [xbp-250h]
unsigned __int8 v44; // [xsp+91h] [xbp-24Fh]
char v45; // [xsp+92h] [xbp-24Eh]
wchar_t dst[100]; // [xsp+94h] [xbp-24Ch] BYREF
char v47; // [xsp+224h] [xbp-BCh] BYREF
_ReadStatusReg(TPIDR_EL0);
v40 = 0;
v39 = -1;
v41 = 0;
v42 = 0;
v37 = xmmword_11ED610;
v38 = xmmword_11ED620;
v45 = 0;
v43 = 37;
v44 = a2;
strftime_l();
src = &v47;
ps = 0;
v8 = uselocale();
result = mbsrtowcs(dst, (const char **)&src, 0x64u, &ps);
v10 = result;
if ( v8 )
result = uselocale();
if ( v10 == -1 )
std::__throw_runtime_error("locale not supported");
a4[1] = 0;
a4[2] = 0;
*a4 = 0;
if ( v10 )
{
v32 = (unsigned __int8 *)(a1 + 920);
v11 = dst;
v12 = a2;
v13 = &dst[v10];
v31 = v12;
do
{
if ( ((*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a3 + 24LL))(a3, 1, (unsigned int)*v11) & 1) != 0 )
{
result = std::wstring::push_back(a4, 32);
do
{
if ( ++v11 == v13 )
break;
result = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a3 + 24LL))(
a3,
1,
(unsigned int)*v11);
}
while ( (result & 1) != 0 );
}
else
{
v34 = v11;
v33 = 0;
v14 = sub_F76D78(&v34, v13, a1 + 8, a1 + 344, a3, &v33, 0) - (a1 + 8);
if ( v14 > 335 )
{
v34 = v11;
v15 = sub_F76D78(&v34, v13, a1 + 344, v32, a3, &v33, 0) - (a1 + 344);
if ( v15 > 575 )
{
v16 = *v32;
if ( (v16 & 1) != 0 )
v17 = *(_QWORD *)(a1 + 928);
else
v17 = v16 >> 1;
v18 = *(unsigned __int8 *)(a1 + 944);
if ( (v18 & 1) != 0 )
v19 = *(_QWORD *)(a1 + 952);
else
v19 = v18 >> 1;
if ( !(v17 + v19) || (v34 = v11, sub_F76D78(&v34, v13, v32, a1 + 968, a3, &v33, 0) - (__int64)v32 > 47) )
{
v34 = v11;
v20 = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a3 + 24LL))(
a3,
64,
(unsigned int)*v11);
v21 = *v11;
if ( (v20 & 1) != 0 )
{
result = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a3 + 24LL))(a3, 64, v21);
if ( (result & 1) != 0 )
{
result = (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)a3 + 104LL))(a3, v21, 0);
++v11;
v22 = (unsigned __int8)result - 48;
if ( v11 == v13 )
{
LABEL_35:
v33 |= 2u;
}
else
{
v23 = 3;
while ( 1 )
{
v24 = *v11;
result = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a3 + 24LL))(
a3,
64,
(unsigned int)*v11);
if ( (result & 1) == 0 )
break;
result = (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)a3 + 104LL))(a3, v24, 0);
++v11;
v22 = 10 * v22 + (unsigned __int8)result - 48;
if ( v23 >= 2 )
{
--v23;
if ( v11 != v13 )
continue;
}
if ( v11 != v13 )
break;
goto LABEL_35;
}
}
switch ( v22 )
{
case 6:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 119);
continue;
case 7:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 117);
continue;
case 8:
case 9:
case 10:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
case 47:
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 56:
case 57:
case 58:
case 60:
goto LABEL_49;
case 11:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 73);
continue;
case 12:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 109);
continue;
case 23:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 72);
continue;
case 31:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 100);
continue;
case 55:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 77);
continue;
case 59:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 83);
continue;
case 61:
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 121);
continue;
default:
if ( v22 == 364 )
{
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 106);
}
else
{
if ( v22 != 2061 )
goto LABEL_49;
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 89);
}
break;
}
}
else
{
v33 |= 4u;
LABEL_49:
for ( i = v34; i != v11; i = ++v34 )
result = std::wstring::push_back(a4, (unsigned int)*i);
}
}
else
{
if ( (*(unsigned __int8 (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)a3 + 104LL))(a3, v21, 0) == 37 )
{
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 37);
}
else
{
result = std::wstring::push_back(a4, (unsigned int)*v11);
}
++v11;
}
continue;
}
std::wstring::push_back(a4, 37);
result = std::wstring::push_back(a4, 112);
}
else
{
std::wstring::push_back(a4, 37);
if ( v15 > 287 )
result = std::wstring::push_back(a4, 98);
else
result = std::wstring::push_back(a4, 66);
if ( v31 == 120 )
{
v25 = *(_QWORD *)(a1 + 8 * (v15 >> 3) + 344);
v26 = (v25 & 1) != 0 ? **(unsigned int **)(a1 + 8 * (v15 >> 3) + 360) : HIDWORD(v25);
result = (*(__int64 (__fastcall **)(__int64, __int64, unsigned __int64))(*(_QWORD *)a3 + 24LL))(
a3,
64,
v26);
if ( (result & 1) != 0 )
{
v27 = *(unsigned __int8 *)a4;
if ( (v27 & 1) != 0 )
{
v29 = a4[1];
v28 = (char *)a4[2];
}
else
{
v28 = (char *)a4 + 4;
v29 = v27 >> 1;
}
*(_DWORD *)&v28[4 * v29 - 4] = 109;
}
}
}
}
else
{
std::wstring::push_back(a4, 37);
if ( v14 > 167 )
result = std::wstring::push_back(a4, 97);
else
result = std::wstring::push_back(a4, 65);
}
v11 = v34;
}
}
while ( v11 != v13 );
}
_ReadStatusReg(TPIDR_EL0);
return result;
}