//
// GameObject::createWithKey from 0x45b37c to 0x45bc5c (2272 bytes)
//
// 8 xrefs:
// > PlayLayer::setupHasCompleted @ 0x40a70e
// > GameObject::objectFromVector @ 0x45bd54
// > LevelEditorLayer::copyObjectState @ 0x46632c
// > LevelEditorLayer::createObject @ 0x46eade
// > GJBaseGameLayer::createLiveStartPosObject @ 0x58e9f8
// > GJBaseGameLayer::createPlayerCollisionBlock @ 0x59c3ba
// > GJMapObject::createMonster @ 0x63fdc8
// > EditorUI::getCreateBtn @ 0x6f80f8
//
// 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 11:48:49 +0000
//
GameObject *__fastcall GameObject::createWithKey(GameObject *this, int a2)
{
ObjectToolbox *v3; // r0
EndTriggerGameObject *v4; // r0
const char *v5; // r1
GameObject *result; // r0
char *v7; // r2
bool v8; // cc
bool v9; // zf
bool v10; // cc
bool v11; // zf
char *v12; // r2
char *v13; // r2
char *v14; // r2
GameObject *v15; // r2
bool v16; // cc
char *v17; // r2
GameObject *v18; // r2
GameObject *v19; // r2
bool v20; // cc
int v21; // r2
const char *v22; // r1
GameManager *v23; // r5
GameManager *v24; // r6
int v25; // r0
const char *FontTexture; // r0
TextGameObject *v27; // r0
cocos2d::CCTexture2D *v28; // r1
int v29; // r3
v3 = (ObjectToolbox *)ObjectToolbox::sharedState(this);
v4 = (EndTriggerGameObject *)ObjectToolbox::intKeyToFrame(v3, (int)this);
if ( !this || !*(_BYTE *)v4 )
return nullptr;
if ( (int)this > 1819 )
{
if ( (int)this > 2917 )
{
if ( this == (GameObject *)&stru_E0C.st_value )
{
result = (GameObject *)EndTriggerGameObject::create(v4);
goto LABEL_337;
}
if ( (int)this > 3600 )
{
if ( (int)this > 3620 )
{
if ( (int)this > 3661 )
{
if ( this == (GameObject *)((char *)&stru_106C.st_value + 3) )
goto LABEL_335;
if ( (int)this > 4211 )
{
if ( this == (GameObject *)&stru_10CC )
goto LABEL_335;
if ( (int)this < 4300 )
goto LABEL_336;
v8 = (unsigned int)this - 4401 > 0x8A;
LABEL_296:
if ( !v8 )
goto LABEL_311;
goto LABEL_336;
}
if ( this == (GameObject *)((char *)&stru_E4C.st_name + 2) )
goto LABEL_311;
if ( this == (GameObject *)((char *)&stru_E4C.st_name + 3) )
{
result = (GameObject *)ProgressGameObject::create(v4);
goto LABEL_337;
}
goto LABEL_336;
}
if ( (int)this >= 3660 )
{
result = (GameObject *)AdvancedFollowEditObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)&stru_E2C.st_shndx )
{
result = (GameObject *)AudioLineGuideGameObject::create(v4);
goto LABEL_337;
}
if ( (int)this > 3642 )
{
if ( this != (GameObject *)((char *)&stru_E3C.st_name + 1) )
{
if ( this == (GameObject *)((char *)&stru_E3C.st_size + 3) )
{
result = (GameObject *)ObjectControlGameObject::create(v4);
goto LABEL_337;
}
if ( this != (GameObject *)((char *)&stru_E2C.st_shndx + 1) )
goto LABEL_336;
goto LABEL_303;
}
goto LABEL_315;
}
if ( this == (GameObject *)&stru_E2C.st_info )
goto LABEL_311;
if ( this != (GameObject *)&stru_E2C.st_other )
goto LABEL_336;
}
else if ( (int)this < 3619 )
{
if ( this == (GameObject *)&stru_E0C.st_info )
{
result = (GameObject *)SpawnParticleGameObject::create(v4);
goto LABEL_337;
}
if ( (int)this > 3608 )
{
if ( (int)this >= 3616 )
{
if ( this != (GameObject *)((char *)&stru_E1C.st_value + 1) )
{
v18 = (GameObject *)(&stru_E1C + 6);
goto LABEL_85;
}
}
else if ( (int)this < 3614 )
{
if ( this == (GameObject *)&stru_E1C )
goto LABEL_311;
if ( (int)this > 3612 )
{
result = (GameObject *)UISettingsGameObject::create(v4);
goto LABEL_337;
}
v18 = (GameObject *)(&stru_E0C + 13);
goto LABEL_85;
}
result = (GameObject *)TimerTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)&stru_E0C.st_size )
{
result = (GameObject *)EventLinkTrigger::create(v4);
goto LABEL_337;
}
if ( (int)this <= 3604 )
{
if ( this != (GameObject *)((char *)&stru_E0C.st_value + 1) )
{
result = (GameObject *)SFXTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
goto LABEL_311;
}
if ( this == (GameObject *)((char *)&stru_E0C.st_size + 2) )
goto LABEL_311;
if ( (int)this > 3606 )
{
result = (GameObject *)SequenceTriggerGameObject::create(v4);
goto LABEL_337;
}
goto LABEL_324;
}
result = (GameObject *)ItemTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
if ( (int)this > 3024 )
{
if ( (int)this <= 3121 )
{
if ( (int)this >= 3119 )
goto LABEL_335;
if ( (int)this > 3031 )
{
if ( this == (GameObject *)&stru_BCC.st_info )
{
result = (GameObject *)KeyframeGameObject::create(v4);
goto LABEL_337;
}
if ( this == (GameObject *)&stru_BCC.st_other )
{
result = (GameObject *)KeyframeAnimTriggerObject::create(v4);
goto LABEL_337;
}
goto LABEL_336;
}
if ( (int)this >= 3029 )
{
result = (GameObject *)ArtTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
v15 = (GameObject *)(&stru_BCC + 7);
LABEL_246:
if ( this != v15 )
goto LABEL_336;
goto LABEL_333;
}
if ( (int)this > 3484 )
{
v17 = (char *)this - 3492;
}
else
{
if ( (int)this >= 3482 || this == (GameObject *)((char *)&stru_C8C.st_value + 3) )
goto LABEL_335;
if ( (int)this < 3219 )
goto LABEL_336;
v17 = (char *)this - 3303;
}
goto LABEL_197;
}
if ( (int)this >= 3023 )
goto LABEL_329;
if ( this == (GameObject *)&stru_BBC )
goto LABEL_301;
if ( (int)this > 3004 )
{
if ( this == (GameObject *)&stru_BBC.st_info )
{
result = (GameObject *)AdvancedFollowTriggerObject::create(v4, v5);
goto LABEL_337;
}
if ( (int)this <= 3016 )
{
if ( this != (GameObject *)((char *)&stru_BBC.st_name + 1) )
goto LABEL_329;
goto LABEL_311;
}
LOBYTE(v15) = -51;
if ( (int)this <= 3021 )
goto LABEL_329;
v22 = (_BYTE *)(&dword_0 + 1);
LABEL_334:
result = (GameObject *)TeleportPortalObject::create(v4, v22, (bool)v15);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&stru_B6C.st_name + 2) )
goto LABEL_311;
if ( (int)this > 2926 )
{
if ( this == (GameObject *)((char *)&stru_BAC.st_size + 3) )
goto LABEL_311;
if ( (int)this < 2999 )
goto LABEL_336;
v21 = 3002;
goto LABEL_232;
}
if ( (int)this < 2919 )
goto LABEL_336;
if ( (int)this > 2924 )
goto LABEL_318;
}
else if ( (int)this < 2909 )
{
if ( (int)this <= 2054 )
{
if ( (int)this >= 2048 )
goto LABEL_335;
if ( this == (GameObject *)((char *)&stru_77C.st_name + 1) )
goto LABEL_311;
if ( (int)this <= 1917 )
{
if ( (int)this <= 1858 )
{
if ( (int)this > 1848 )
goto LABEL_335;
if ( (int)this > 1834 )
{
v16 = (unsigned int)this - 1839 > 3;
goto LABEL_198;
}
if ( (int)this >= 1831 )
goto LABEL_335;
v18 = (GameObject *)(&stru_71C + 9);
goto LABEL_85;
}
if ( (int)this <= 1913 )
{
if ( (int)this >= 1912 || this == (GameObject *)((char *)&stru_73C.st_value + 3) )
goto LABEL_311;
v19 = (GameObject *)(&stru_73C + 8);
goto LABEL_158;
}
if ( this == (GameObject *)((char *)&stru_76C.st_shndx + 1) )
goto LABEL_329;
LABEL_318:
result = (GameObject *)CameraTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
if ( (int)this <= 1939 )
{
if ( (int)this >= 1936 )
goto LABEL_335;
if ( this == (GameObject *)((char *)&stru_78C.st_name + 1) )
goto LABEL_311;
if ( (int)this <= 1933 )
{
if ( this == (GameObject *)((char *)&stru_77C.st_shndx + 1) )
goto LABEL_311;
if ( this == (GameObject *)&stru_78C )
{
result = (GameObject *)PlayerControlGameObject::create(v4);
goto LABEL_337;
}
goto LABEL_336;
}
if ( this != (GameObject *)((char *)&stru_78C.st_name + 2) )
{
v18 = (GameObject *)(&stru_78C + 3);
goto LABEL_85;
}
LABEL_324:
result = (GameObject *)SongTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
if ( (int)this <= 2045 )
{
if ( (int)this >= 2020 )
goto LABEL_335;
if ( this == (GameObject *)&stru_7DC )
goto LABEL_308;
if ( (int)this < 2012 || (unsigned int)this - 2015 > 1 )
goto LABEL_336;
goto LABEL_318;
}
LABEL_307:
result = (GameObject *)SpecialAnimGameObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&stru_A7C.st_size + 2) )
goto LABEL_335;
if ( (int)this <= 2694 )
{
if ( this == (GameObject *)((char *)&stru_80C.st_value + 3) )
{
result = (GameObject *)TransformTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
if ( (int)this <= 2067 )
{
if ( this == (GameObject *)((char *)&stru_80C.st_name + 3) )
{
result = (GameObject *)CheckpointGameObject::create(v4);
goto LABEL_337;
}
if ( (int)this < 2064 )
{
if ( this != (GameObject *)((char *)&stru_7FC.st_size + 3) )
{
if ( this != (GameObject *)((char *)&stru_80C.st_name + 2) )
goto LABEL_336;
goto LABEL_318;
}
goto LABEL_307;
}
LOBYTE(v15) = 17;
if ( this == (GameObject *)((char *)&stru_80C.st_value + 1) )
{
result = (GameObject *)ParticleGameObject::create(v4);
goto LABEL_337;
}
if ( (int)this > 2065 )
goto LABEL_311;
LABEL_333:
v22 = nullptr;
goto LABEL_334;
}
if ( this == (GameObject *)((char *)&stru_8BC.st_size + 2) )
goto LABEL_335;
if ( (int)this > 2246 )
{
if ( this == (GameObject *)((char *)&stru_A2C.st_name + 1) )
goto LABEL_335;
if ( (int)this < 2605 )
goto LABEL_336;
v17 = (char *)this - 2629;
LABEL_197:
v16 = (unsigned int)v17 > 1;
LABEL_198:
if ( v16 )
goto LABEL_336;
goto LABEL_335;
}
if ( this != (GameObject *)((char *)&stru_80C.st_size + 1) )
{
if ( (int)this < 2069 )
{
result = (GameObject *)RandTriggerGameObject::create(v4);
goto LABEL_337;
}
v19 = (GameObject *)(&stru_8AC + 3);
LABEL_158:
if ( this != v19 )
goto LABEL_336;
goto LABEL_335;
}
LABEL_315:
result = (GameObject *)ForceBlockGameObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&stru_B4C.st_value + 3) )
{
result = (GameObject *)GameOptionsTrigger::create(v4, v5);
goto LABEL_337;
}
if ( (int)this <= 2899 )
{
if ( (int)this > 2894 )
{
if ( (int)this <= 2897 )
{
result = (GameObject *)SmartGameObject::create(v4, v5);
goto LABEL_337;
}
goto LABEL_336;
}
if ( (int)this < 2867 )
{
if ( (int)this < 2864 )
goto LABEL_336;
if ( (int)this > 2865 )
goto LABEL_311;
}
goto LABEL_335;
}
if ( this == (GameObject *)((char *)&stru_B4C.st_size + 3) )
{
result = (GameObject *)GradientTriggerObject::create(v4);
goto LABEL_337;
}
if ( (int)this <= 2903 )
{
LOBYTE(v15) = 85;
if ( this == (GameObject *)((char *)&stru_B4C.st_size + 1) )
goto LABEL_311;
if ( (int)this <= 2901 )
{
result = (GameObject *)RotateGameplayGameObject::create(v4);
goto LABEL_337;
}
goto LABEL_333;
}
if ( (int)this > 2905 && this != (GameObject *)((char *)&stru_B4C.st_shndx + 1) )
goto LABEL_336;
}
result = (GameObject *)ShaderGameObject::create(v4, v5);
goto LABEL_337;
}
if ( (int)this >= 1818 )
goto LABEL_311;
if ( (int)this <= 921 )
{
if ( (int)this >= 920 )
goto LABEL_335;
if ( this == (GameObject *)((char *)&dword_8C + 2) )
goto LABEL_311;
if ( (int)this <= 142 )
{
if ( (int)this <= 59 )
{
if ( (int)this >= 55 )
goto LABEL_329;
if ( this == (GameObject *)((char *)&dword_1C + 3) )
{
result = (GameObject *)StartPosObject::create(v4);
goto LABEL_337;
}
if ( (int)this <= 31 )
{
if ( (int)this <= 28 )
{
if ( (int)this < 22 )
{
v7 = (char *)this - 10;
LABEL_47:
v8 = (unsigned int)v7 > 3;
goto LABEL_296;
}
LABEL_329:
result = (GameObject *)EnterEffectObject::create(v4, v5);
goto LABEL_337;
}
LABEL_311:
result = (GameObject *)EffectGameObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&dword_20 + 3) )
goto LABEL_311;
if ( (int)this <= 35 )
{
if ( (int)this <= 33 )
goto LABEL_311;
goto LABEL_336;
}
if ( this != (GameObject *)&dword_24 )
{
v8 = (unsigned int)this - 45 > 2;
goto LABEL_296;
}
LABEL_301:
result = (GameObject *)RingObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&dword_60 + 3) )
goto LABEL_311;
if ( (int)this <= 99 )
{
if ( (int)this <= 89 )
{
if ( (int)this < 85 )
{
if ( this == (GameObject *)((char *)&dword_40 + 3) )
goto LABEL_311;
v9 = this == (GameObject *)&dword_54;
LABEL_37:
if ( !v9 )
goto LABEL_336;
goto LABEL_301;
}
goto LABEL_335;
}
v10 = (int)this < 97;
LABEL_116:
if ( v10 )
goto LABEL_336;
goto LABEL_335;
}
if ( (int)this > 139 )
{
if ( this == (GameObject *)&dword_8C )
goto LABEL_311;
v9 = this == (GameObject *)((char *)&dword_8C + 1);
goto LABEL_37;
}
if ( (int)this >= 137 )
{
LABEL_335:
result = EnhancedGameObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&dword_68 + 1) || this == (GameObject *)((char *)&dword_6C + 3) )
goto LABEL_311;
v11 = this == (GameObject *)((char *)&dword_64 + 1);
LABEL_86:
if ( v11 )
goto LABEL_311;
goto LABEL_336;
}
if ( this == (GameObject *)&stru_28C.st_size )
goto LABEL_311;
if ( (int)this <= 660 )
{
if ( (int)this <= 224 )
{
if ( (int)this >= 222 )
goto LABEL_335;
if ( (int)this > 188 )
{
v7 = (char *)this - 200;
goto LABEL_47;
}
if ( (int)this >= 180 )
goto LABEL_335;
v12 = (char *)this - 154;
goto LABEL_133;
}
if ( (int)this <= 378 )
{
if ( (int)this > 374 )
goto LABEL_335;
v13 = (char *)this - 286;
goto LABEL_80;
}
v14 = (char *)this - 394;
LABEL_57:
v16 = (unsigned int)v14 > 5;
goto LABEL_198;
}
LOBYTE(v15) = -19;
if ( this == (GameObject *)((char *)&stru_2EC.st_name + 1) )
goto LABEL_333;
if ( (int)this <= 749 )
{
if ( (int)this <= 742 )
{
if ( (int)this >= 740 )
goto LABEL_335;
v14 = (char *)this - 675;
goto LABEL_57;
}
if ( (int)this < 744 )
goto LABEL_336;
if ( (int)this <= 745 )
goto LABEL_311;
v15 = (GameObject *)(&stru_2DC + 15);
goto LABEL_246;
}
if ( this == (GameObject *)((char *)&stru_38C.st_value + 2) )
{
v23 = (GameManager *)cocos2d::CCTextureCache::sharedTextureCache(v4);
v24 = (GameManager *)GameManager::sharedState(v23);
v25 = GameManager::sharedState(v24);
FontTexture = GameManager::getFontTexture(v24, *(_DWORD *)(v25 + 780));
v27 = (TextGameObject *)cocos2d::CCTextureCache::addImage(v23, FontTexture, 0);
result = TextGameObject::create(v27, v28);
goto LABEL_337;
}
if ( (int)this <= 914 )
{
if ( (int)this < 899 )
goto LABEL_336;
if ( (int)this <= 900 )
goto LABEL_311;
if ( this != (GameObject *)((char *)&stru_37C.st_size + 1) )
goto LABEL_336;
LABEL_316:
result = (GameObject *)EnhancedTriggerObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&stru_38C.st_value + 3) )
goto LABEL_311;
if ( (int)this < 918 )
goto LABEL_336;
LABEL_308:
result = (GameObject *)AnimatedGameObject::create(this, (int)v5);
goto LABEL_337;
}
if ( (int)this < 1584 )
{
if ( (int)this >= 1582 )
goto LABEL_335;
if ( (int)this <= 1328 )
{
if ( (int)this >= 1327 )
goto LABEL_308;
if ( (int)this <= 1021 )
{
if ( (int)this >= 1019 )
goto LABEL_335;
if ( (int)this > 1000 )
{
v13 = (char *)this - 1006;
LABEL_80:
v8 = (unsigned int)v13 > 1;
goto LABEL_296;
}
if ( (int)this > 996 )
goto LABEL_335;
v17 = (char *)this - 923;
goto LABEL_197;
}
if ( (int)this > 1061 )
{
if ( this == (GameObject *)&stru_4EC.st_size )
{
result = (GameObject *)SpawnTriggerGameObject::create(v4);
goto LABEL_337;
}
v18 = (GameObject *)(&stru_4EC + 15);
}
else
{
if ( (int)this >= 1050 )
goto LABEL_335;
if ( this == (GameObject *)((char *)&stru_3FC.st_name + 2) )
goto LABEL_301;
v18 = (GameObject *)(&stru_40C + 13);
}
LABEL_85:
v11 = this == v18;
goto LABEL_86;
}
if ( this == (GameObject *)((char *)&stru_53C.st_value + 2) )
goto LABEL_316;
if ( (int)this <= 1346 )
{
if ( (int)this <= 1332 )
{
if ( (int)this >= 1331 || this == (GameObject *)((char *)&stru_52C.st_value + 1) )
goto LABEL_311;
v9 = this == (GameObject *)((char *)&stru_52C.st_value + 2);
goto LABEL_37;
}
if ( this == (GameObject *)((char *)&stru_52C.st_size + 1) )
goto LABEL_301;
v18 = (GameObject *)(&stru_52C + 10);
goto LABEL_85;
}
if ( (int)this < 1520 )
{
if ( (int)this >= 1518 )
goto LABEL_335;
if ( this == (GameObject *)((char *)&stru_53C.st_value + 3) )
goto LABEL_311;
v19 = (GameObject *)&stru_5EC;
goto LABEL_158;
}
if ( this == (GameObject *)&stru_5EC.st_value )
goto LABEL_311;
v20 = (int)this <= 1528;
LABEL_233:
if ( !v20 )
goto LABEL_336;
goto LABEL_335;
}
if ( (int)this > 1620 )
{
if ( (int)this > 1736 )
{
if ( this == (GameObject *)((char *)&stru_70C.st_value + 3) )
goto LABEL_321;
if ( (int)this > 1811 )
{
if ( (int)this <= 1816 )
goto LABEL_311;
goto LABEL_321;
}
if ( this == (GameObject *)&stru_6CC.st_info )
goto LABEL_335;
if ( this == (GameObject *)((char *)&stru_6CC.st_shndx + 1) )
goto LABEL_311;
if ( this != (GameObject *)((char *)&stru_6CC.st_size + 3) )
goto LABEL_336;
}
else
{
if ( (int)this >= 1734 )
goto LABEL_335;
if ( this != (GameObject *)&stru_69C.st_info )
{
if ( (int)this <= 1704 )
{
v12 = (char *)this - 1697;
LABEL_133:
v16 = (unsigned int)v12 > 2;
goto LABEL_198;
}
v21 = 1710;
LABEL_232:
v20 = (int)this <= v21;
goto LABEL_233;
}
}
result = (GameObject *)DashRingObject::create(v4, v5);
goto LABEL_337;
}
if ( (int)this >= 1618 )
goto LABEL_335;
if ( this == (GameObject *)&stru_62C.st_shndx )
{
LABEL_303:
result = (GameObject *)RingObject::create(v4, v5);
*((_DWORD *)result + 271) = 1;
goto LABEL_338;
}
if ( (int)this > 1594 )
{
if ( (int)this > 1614 )
{
if ( this == (GameObject *)((char *)&stru_64C.st_name + 3) )
{
result = (GameObject *)LabelGameObject::create(v4);
goto LABEL_337;
}
if ( this == (GameObject *)&stru_64C.st_value )
{
result = (GameObject *)TriggerControlGameObject::create(v4, v5);
goto LABEL_337;
}
goto LABEL_336;
}
if ( (int)this >= 1612 || this == (GameObject *)((char *)&stru_63C.st_name + 2) )
goto LABEL_311;
if ( this != (GameObject *)((char *)&stru_63C.st_shndx + 1) )
{
v18 = (GameObject *)(&stru_62C + 15);
goto LABEL_85;
}
LABEL_321:
result = (GameObject *)CountTriggerGameObject::create(v4, v5);
goto LABEL_337;
}
if ( this == (GameObject *)((char *)&stru_62C.st_value + 3) )
goto LABEL_311;
if ( (int)this <= 1587 )
{
if ( this == (GameObject *)&stru_62C.st_value )
goto LABEL_308;
v18 = (GameObject *)(&stru_62C + 5);
goto LABEL_85;
}
if ( this == (GameObject *)((char *)&stru_62C.st_size + 1) )
goto LABEL_311;
if ( (int)this >= 1589 )
{
v10 = (int)this < 1591;
goto LABEL_116;
}
LABEL_336:
result = GameObject::createWithFrame(v4, v5);
LABEL_337:
if ( !result )
return nullptr;
LABEL_338:
v29 = *((_DWORD *)result + 198);
*((_DWORD *)result + 223) = this;
if ( v29 == 7 )
*((_DWORD *)result + 198) = *((_DWORD *)result + 196);
return result;
}