//
// sub_10012CFB0 from 0x10012cfb0 to 0x10012d070 (192 bytes)
//
// 0 xrefs:
//
// 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:24:44 +0000
//
double __fastcall sub_10012CFB0(__int64 a1, int a2)
{
int v2; // r15d
__int64 MainObject; // rax
double result; // xmm0_8
_BYTE v5[8]; // [rsp+0h] [rbp-30h] BYREF
_DWORD v6[10]; // [rsp+8h] [rbp-28h] BYREF
switch ( a2 )
{
case 1:
v2 = *(_DWORD *)(a1 + 1056);
break;
case 2:
v2 = *(_DWORD *)(a1 + 1060);
break;
case 3:
v2 = *(_DWORD *)(a1 + 1064);
break;
case 4:
v2 = *(_DWORD *)(a1 + 1068);
break;
default:
v2 = 0;
break;
}
sub_1002782D0(v6, &qword_100BE1268);
MainObject = GJBaseGameLayer::tryGetMainObject((_QWORD *)a1, v2);
if ( MainObject )
{
(*(void (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)MainObject + 1360LL))(v5, MainObject);
sub_100278300(v6, v5);
}
if ( (unsigned int)(a2 - 3) < 2 )
{
*(_QWORD *)&result = v6[1];
}
else if ( (unsigned int)(a2 - 1) > 1 )
{
return 0.0;
}
else
{
*(_QWORD *)&result = v6[0];
}
return result;
}