//
// GameManager::getUGV from 0x1401834a0 to 0x14018360c (364 bytes)
//
// 66 xrefs:
// > CreatorLayer::init @ 0x14009cfcd
// > CreatorLayer::onTreasureRoom @ 0x14009ee61
// > FollowRewardPage::init @ 0x14013a595
// > FollowRewardPage::init @ 0x14013a8d5
// > FollowRewardPage::init @ 0x14013abfa
// > FollowRewardPage::init @ 0x14013af34
// > FollowRewardPage::init @ 0x14013b279
// > FollowRewardPage::init @ 0x14013b5b2
// > FollowRewardPage::updateRate @ 0x14013bef0
// > FollowRewardPage::onSpecialItem @ 0x14013c085
// > FollowRewardPage::onSpecialItem @ 0x14013c35c
// > FollowRewardPage::onSpecialItem @ 0x14013c5bd
// > FollowRewardPage::onSpecialItem @ 0x14013c7e2
// > FollowRewardPage::onSpecialItem @ 0x14013c969
// > FollowRewardPage::onSpecialItem @ 0x14013cb8d
// > GameManager::firstLoad @ 0x1401888db
// > GauntletSelectLayer::setupGauntlets @ 0x1401f9f1b
// > GJShopLayer::init @ 0x1402ab0bc
// > GJShopLayer::showReactMessage @ 0x1402ad067
// > GJShopLayer::ccTouchBegan @ 0x1402aea90
// > LevelAreaLayer::init @ 0x1402c51d6
// > LevelAreaInnerLayer::init @ 0x1402c73ba
// > LevelPage::onTheTower @ 0x14031bd3b
// > LevelPage::addSecretDoor @ 0x14031cb04
// > LevelPage::addSecretDoor @ 0x14031cb53
// > LevelPage::addSecretDoor @ 0x14031cbd2
// > LevelPage::onSecretDoor @ 0x14031cd33
// > LevelPage::onSecretDoor @ 0x14031cedf
// > MenuLayer::init @ 0x140334f86
// > PlayLayer::destroyPlayer @ 0x1403b42d0
// > SecretRewardsLayer::init @ 0x1403d27a4
// > SecretRewardsLayer::init @ 0x1403d27fa
// > SecretRewardsLayer::onShop @ 0x1403d6751
// > SecretRewardsLayer::onShop @ 0x1403d67b2
// > SecretRewardsLayer::onShop @ 0x1403d6813
// > SecretRewardsLayer::onShop @ 0x1403d6870
// > SecretRewardsLayer::showDialog01 @ 0x1403d7f09
// > SecretRewardsLayer::showDialog03 @ 0x1403d984b
// > SecretRewardsLayer::showDialogMechanic @ 0x1403dab1c
// > SecretRewardsLayer::showDialogDiamond @ 0x1403dbdab
// > SecretLayer::init @ 0x1403dd7af
// > SecretLayer2::init @ 0x1403e2b64
// > SecretLayer2::init @ 0x1403e31c4
// > SecretLayer2::init @ 0x1403e35fc
// > SecretLayer2::init @ 0x1403e36b6
// > SecretLayer2::onDoor @ 0x1403e498a
// > SecretLayer2::onSubmit @ 0x1403e5a11
// > SecretLayer2::onSubmit @ 0x1403e6a54
// > SecretLayer3::init @ 0x1403ea7ae
// > SecretLayer3::init @ 0x1403ea886
// > SecretLayer3::init @ 0x1403ea8d0
// > SecretLayer3::init @ 0x1403eaa3c
// > SecretLayer3::init @ 0x1403eab1b
// > SecretLayer3::init @ 0x1403eabf2
// > SecretLayer3::init @ 0x1403eacc9
// > SecretLayer3::init @ 0x1403eb390
// > SecretLayer3::onClick @ 0x1403ed519
// > SecretLayer3::onClick @ 0x1403ed52b
// > SecretLayer3::onClick @ 0x1403ed53f
// > SecretLayer3::showUnlockDialog @ 0x1403ed7dc
// > SecretLayer3::showUnlockDialog @ 0x1403ed7ee
// > SecretLayer3::showUnlockDialog @ 0x1403ed802
// > SecretLayer3::onBack @ 0x1403ef67c
// > SecretLayer4::init @ 0x1403f02c7
// > SecretLayer5::init @ 0x1403f511e
// > ??> @ 0x1406cb5a4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
bool GameManager::getUGV(GameManager *a1, const char *a2)
{
size_t v3; // rbx
size_t v4; // r8
void **v5; // rdx
cocos2d::CCString *v6; // rax
bool v7; // bl
void *v8; // rcx
void *v9; // rcx
void *Src[2]; // [rsp+20h] [rbp-58h] BYREF
__int64 v12; // [rsp+30h] [rbp-48h]
unsigned __int64 v13; // [rsp+38h] [rbp-40h]
void *Block[2]; // [rsp+40h] [rbp-38h] BYREF
__m128i si128; // [rsp+50h] [rbp-28h]
*(_OWORD *)Src = 0;
v12 = 4;
v13 = 15;
strcpy((char *)Src, "ugv_");
v3 = -1;
v4 = -1;
do
++v4;
while ( a2[v4] );
sub_140041270(Src, (void *)a2, v4);
v5 = Src;
if ( v13 > 0xF )
v5 = (void **)Src[0];
*(_OWORD *)Block = 0;
si128 = 0;
do
++v3;
while ( *((_BYTE *)v5 + v3) );
sub_14003A930(Block, v5, v3);
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(a1->m_unlockValueKeeper, Block);
v7 = cocos2d::CCString::boolValue(v6);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v8 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v8);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);
LOBYTE(Block[0]) = 0;
if ( v13 > 0xF )
{
v9 = Src[0];
if ( v13 + 1 >= 0x1000 )
{
v9 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v9);
}
return v7;
}