//
// sub_10091FBD0 from 0x10091fbd0 to 0x10091fd7e (430 bytes)
//
// 2 xrefs:
// > sub_10095E4C0 @ 0x10095e4f0
// > sub_10095E570 @ 0x10095e5a3
//
// 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:38:16 +0000
//
char *__fastcall sub_10091FBD0(__int64 a1, unsigned __int8 a2)
{
__int64 v2; // r14
char *v3; // rbx
v2 = a1;
v3 = (char *)operator new(0x4B8u);
__bzero(v3, 1208);
SetupTriggerPopup::SetupTriggerPopup((__int64)v3);
*(_OWORD *)(v3 + 1048) = 0;
*(_OWORD *)(v3 + 1032) = 0;
*(_OWORD *)(v3 + 1016) = 0;
*((_QWORD *)v3 + 133) = 0xFFFFFFFF00000000LL;
*(_OWORD *)(v3 + 1160) = 0;
*((_QWORD *)v3 + 147) = 0;
*(_OWORD *)(v3 + 1112) = 0;
*(_OWORD *)(v3 + 1128) = 0;
*(_OWORD *)(v3 + 1137) = 0;
*((_OWORD *)v3 + 67) = 0;
*((_QWORD *)v3 + 136) = 0;
*((_DWORD *)v3 + 296) = -1;
*(_QWORD *)v3 = off_100BC0D60;
*((_QWORD *)v3 + 40) = off_100BC1390;
*((_QWORD *)v3 + 41) = &off_100BC1400;
*((_QWORD *)v3 + 42) = off_100BC1418;
*((_QWORD *)v3 + 43) = off_100BC1438;
*((_QWORD *)v3 + 44) = off_100BC1460;
*((_QWORD *)v3 + 51) = off_100BC1490;
*((_QWORD *)v3 + 54) = off_100BC1510;
*((_QWORD *)v3 + 68) = off_100BC1530;
*((_QWORD *)v3 + 83) = &off_100BC1578;
*((_QWORD *)v3 + 84) = off_100BC1590;
v3[1201] = 0;
*((_QWORD *)v3 + 149) = a1;
v3[1200] = a2;
*((_QWORD *)v3 + 137) = a1;
v3[1104] = 0;
if ( !*(_QWORD *)(a1 + 24) )
{
sub_1009241C0(a1, a2);
v3[1201] = 1;
v2 = *((_QWORD *)v3 + 149);
}
*(_BYTE *)(v2 + 32) = 0;
if ( (unsigned __int8)KeybindingsLayer::init((__int64)v3, 0) )
{
cocos2d::CCObject::autorelease((__int64)v3);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v3 + 16LL))(v3);
return nullptr;
}
return v3;
}