//
// GameManager::applicationWillEnterForeground from 0x100376580 to 0x10037693e (958 bytes)
//
// 2 xrefs:
// > AppDelegate::applicationWillBecomeActive @ 0x10073b92d
// > AppDelegate::applicationWillEnterForeground @ 0x10073bbc0
//
// 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 12:29:04 +0000
//
void __fastcall GameManager::applicationWillEnterForeground(__int64 a1)
{
double v2; // xmm0_8
double v3; // xmm1_8
__int64 v4; // rdi
void *v5; // r14
__int64 v6; // rdi
void *v7; // r14
__int64 v8; // rdi
void *v9; // r14
__int64 v10; // rdi
void *v11; // r14
__int64 v12; // rdi
void *v13; // r14
__int64 v14; // rdi
void *v15; // r14
__int64 v16; // rdi
void *v17; // r14
__int64 v18; // rdi
void *v19; // r14
__int64 v20; // rdi
void *v21; // r14
__int64 v22; // rdi
void *v23; // r14
void (__fastcall ***v24)(_QWORD); // rdi
void (__fastcall ***v25)(_QWORD); // rdi
timeb v26; // [rsp+0h] [rbp-20h] BYREF
ftime(&v26);
v2 = *(double *)(a1 + 696);
if ( v2 == 0.0 || (v3 = (double)v26.millitm / 1000.0 + (double)SLODWORD(v26.time) - v2, v3 >= 4.0) || v3 <= 0.0 )
{
if ( *(_BYTE *)(a1 + 685) == 1 )
{
v4 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v5 = operator new(0x6B8u);
sub_100377960(v5);
qword_100BE3098 = (__int64)v5;
(*(void (__fastcall **)(void *))(*(_QWORD *)v5 + 80LL))(v5);
v4 = qword_100BE3098;
}
GameManager::setUGV(v4, "23");
v6 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v7 = operator new(0x6B8u);
sub_100377960(v7);
qword_100BE3098 = (__int64)v7;
(*(void (__fastcall **)(void *))(*(_QWORD *)v7 + 80LL))(v7);
v6 = qword_100BE3098;
}
GameManager::reportAchievementWithID(v6, "geometry.ach.facebook", 100, 0);
}
if ( *(_BYTE *)(a1 + 687) == 1 )
{
v8 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v9 = operator new(0x6B8u);
sub_100377960(v9);
qword_100BE3098 = (__int64)v9;
(*(void (__fastcall **)(void *))(*(_QWORD *)v9 + 80LL))(v9);
v8 = qword_100BE3098;
}
GameManager::setUGV(v8, "22");
v10 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v11 = operator new(0x6B8u);
sub_100377960(v11);
qword_100BE3098 = (__int64)v11;
(*(void (__fastcall **)(void *))(*(_QWORD *)v11 + 80LL))(v11);
v10 = qword_100BE3098;
}
GameManager::reportAchievementWithID(v10, "geometry.ach.youtube", 100, 0);
}
if ( *(_BYTE *)(a1 + 686) == 1 )
{
v12 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v13 = operator new(0x6B8u);
sub_100377960(v13);
qword_100BE3098 = (__int64)v13;
(*(void (__fastcall **)(void *))(*(_QWORD *)v13 + 80LL))(v13);
v12 = qword_100BE3098;
}
GameManager::setUGV(v12, "24");
v14 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v15 = operator new(0x6B8u);
sub_100377960(v15);
qword_100BE3098 = (__int64)v15;
(*(void (__fastcall **)(void *))(*(_QWORD *)v15 + 80LL))(v15);
v14 = qword_100BE3098;
}
GameManager::reportAchievementWithID(v14, "geometry.ach.twitter", 100, 0);
}
if ( *(_BYTE *)(a1 + 688) == 1 )
{
v16 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v17 = operator new(0x6B8u);
sub_100377960(v17);
qword_100BE3098 = (__int64)v17;
(*(void (__fastcall **)(void *))(*(_QWORD *)v17 + 80LL))(v17);
v16 = qword_100BE3098;
}
GameManager::setUGV(v16, "26");
}
if ( *(_BYTE *)(a1 + 689) == 1 )
{
v18 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v19 = operator new(0x6B8u);
sub_100377960(v19);
qword_100BE3098 = (__int64)v19;
(*(void (__fastcall **)(void *))(*(_QWORD *)v19 + 80LL))(v19);
v18 = qword_100BE3098;
}
GameManager::setUGV(v18, "27");
}
if ( *(_BYTE *)(a1 + 690) == 1 )
{
v20 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v21 = operator new(0x6B8u);
sub_100377960(v21);
qword_100BE3098 = (__int64)v21;
(*(void (__fastcall **)(void *))(*(_QWORD *)v21 + 80LL))(v21);
v20 = qword_100BE3098;
}
GameManager::setUGV(v20, "32");
}
if ( *(_BYTE *)(a1 + 691) == 1 )
{
v22 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v23 = operator new(0x6B8u);
sub_100377960(v23);
qword_100BE3098 = (__int64)v23;
(*(void (__fastcall **)(void *))(*(_QWORD *)v23 + 80LL))(v23);
v22 = qword_100BE3098;
}
GameManager::setUGV(v22, "39");
}
v24 = *(void (__fastcall ****)(_QWORD))(a1 + 936);
if ( v24 )
(**v24)(v24);
v25 = *(void (__fastcall ****)(_QWORD))(a1 + 944);
if ( v25 )
(**v25)(v25);
}
}