//
// sub_1007FEAB0 from 0x1007feab0 to 0x1007febe7 (311 bytes)
//
// 7 xrefs:
// > sub_10006D8B0 @ 0x10006dcdf
// > sub_10006E5C0 @ 0x10007234f
// > LevelCell::loadCustomLevelCell @ 0x100237b67
// > GameManager::verifyCoinUnlocks @ 0x100364fc2
// > FMODAudioEngine::setup @ 0x1003c9f97
// > cocos2d::CCMenu::createWithItems @ 0x1008736a3
// > DemonInfoPopup::init @ 0x1008a80e3
//
// 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:36:36 +0000
//
unsigned int **sub_1007FEAB0(__int64 a1, ...)
{
unsigned int **v1; // rax
unsigned int **v2; // rbx
__int64 gp_offset; // rcx
__int64 v4; // rsi
__int64 *overflow_arg_area; // rax
va_list va; // [rsp+B0h] [rbp-30h] BYREF
va_start(va, a1);
v1 = (unsigned int **)sub_1007FE900();
v2 = v1;
if ( a1 )
{
sub_100746BF0(v1[7], a1);
gp_offset = va[0].gp_offset;
if ( va[0].gp_offset > 0x28uLL )
goto LABEL_5;
while ( 1 )
{
va[0].gp_offset = gp_offset + 8;
v4 = *(_QWORD *)((char *)va[0].reg_save_area + gp_offset);
if ( !v4 )
break;
while ( 1 )
{
sub_100746BF0(v2[7], v4);
gp_offset = va[0].gp_offset;
if ( va[0].gp_offset <= 0x28uLL )
break;
LABEL_5:
overflow_arg_area = (__int64 *)va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
v4 = *overflow_arg_area;
if ( !*overflow_arg_area )
return v2;
}
}
}
else
{
(*((void (__fastcall **)(unsigned int **))*v1 + 2))(v1);
return nullptr;
}
return v2;
}