//
// std::__ndk1::__time_get_storage::init from 0x975464 to 0x9756c0 (604 bytes)
//
// 2 xrefs:
// > std::__ndk1::__time_get_storage::__time_get_storage @ 0x9662c8
// > std::__ndk1::__time_get_storage::__time_get_storage @ 0x9663f4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:05:57 +0000
//
int __fastcall std::__time_get_storage::init(int a1, int a2)
{
int *v3; // r5
int i; // r6
int *v5; // r6
int j; // r8
_WORD *v7; // r5
int v8; // r2
int v9; // r3
_WORD *v10; // r5
int v11; // r2
int v12; // r3
_WORD *v13; // r5
int v14; // r2
int v15; // r3
_WORD *v16; // r5
int v17; // r2
int v18; // r3
int v21; // [sp+8h] [bp-B0h] BYREF
int v22; // [sp+Ch] [bp-ACh]
int v23; // [sp+10h] [bp-A8h]
struct tm tp; // [sp+18h] [bp-A0h] BYREF
char s[100]; // [sp+44h] [bp-74h] BYREF
int v26; // [sp+A8h] [bp-10h]
memset(&tp, 0, sizeof(tp));
v3 = (int *)(a1 + 88);
for ( i = 0; i != 7; ++i )
{
tp.tm_wday = i;
strftime(s, 0x64u, "%A", &tp);
std::string::assign(v3 - 21, s);
strftime(s, 0x64u, "%a", &tp);
std::string::assign(v3, s);
v3 += 3;
}
v5 = (int *)(a1 + 316);
for ( j = 0; j != 12; ++j )
{
tp.tm_mon = j;
strftime(s, 0x64u, "%B", &tp);
std::string::assign(v5 - 36, s);
strftime(s, 0x64u, "%b", &tp);
std::string::assign(v5, s);
v5 += 3;
}
tp.tm_hour = 1;
strftime(s, 0x64u, "%p", &tp);
std::string::assign((int *)(a1 + 460), s);
tp.tm_hour = 13;
strftime(s, 0x64u, "%p", &tp);
std::string::assign((int *)(a1 + 472), s);
std::__time_get_storage::__analyze(&v21, a1, 99, a2);
v7 = (_WORD *)(a1 + 484);
if ( (*(_BYTE *)(a1 + 484) & 1) != 0 )
{
**(_BYTE **)(a1 + 492) = 0;
*(_DWORD *)(a1 + 488) = 0;
}
else
{
*v7 = 0;
}
std::string::reserve((int *)(a1 + 484), 0);
v8 = v22;
v9 = v23;
*(_DWORD *)v7 = v21;
*(_DWORD *)(a1 + 488) = v8;
*(_DWORD *)(a1 + 492) = v9;
v23 = 0;
v21 = 0;
v22 = 0;
std::string::~string((int)&v21);
std::__time_get_storage::__analyze(&v21, a1, 114, a2);
v10 = (_WORD *)(a1 + 496);
if ( (*(_BYTE *)(a1 + 496) & 1) != 0 )
{
**(_BYTE **)(a1 + 504) = 0;
*(_DWORD *)(a1 + 500) = 0;
}
else
{
*v10 = 0;
}
std::string::reserve((int *)(a1 + 496), 0);
v11 = v22;
v12 = v23;
*(_DWORD *)v10 = v21;
*(_DWORD *)(a1 + 500) = v11;
*(_DWORD *)(a1 + 504) = v12;
v23 = 0;
v21 = 0;
v22 = 0;
std::string::~string((int)&v21);
std::__time_get_storage::__analyze(&v21, a1, 120, a2);
v13 = (_WORD *)(a1 + 508);
if ( (*(_BYTE *)(a1 + 508) & 1) != 0 )
{
**(_BYTE **)(a1 + 516) = 0;
*(_DWORD *)(a1 + 512) = 0;
}
else
{
*v13 = 0;
}
std::string::reserve((int *)(a1 + 508), 0);
v14 = v22;
v15 = v23;
*(_DWORD *)v13 = v21;
*(_DWORD *)(a1 + 512) = v14;
*(_DWORD *)(a1 + 516) = v15;
v23 = 0;
v21 = 0;
v22 = 0;
std::string::~string((int)&v21);
std::__time_get_storage::__analyze(&v21, a1, 88, a2);
v16 = (_WORD *)(a1 + 520);
if ( (*(_BYTE *)(a1 + 520) & 1) != 0 )
{
**(_BYTE **)(a1 + 528) = 0;
*(_DWORD *)(a1 + 524) = 0;
}
else
{
*v16 = 0;
}
std::string::reserve((int *)(a1 + 520), 0);
v17 = v22;
v18 = v23;
*(_DWORD *)v16 = v21;
*(_DWORD *)(a1 + 524) = v17;
*(_DWORD *)(a1 + 528) = v18;
v23 = 0;
v21 = 0;
v22 = 0;
std::string::~string((int)&v21);
return _stack_chk_guard - v26;
}