//
// GameManager::getUGV from 0x14027e9c0 to 0x14027eb58 (408 bytes)
//
// 68 xrefs:
// > CreatorLayer::init @ 0x14013674d
// > CreatorLayer::onTreasureRoom @ 0x140138d90
// > FollowRewardPage::init @ 0x14020b80e
// > FollowRewardPage::init @ 0x14020bb5b
// > FollowRewardPage::init @ 0x14020be8c
// > FollowRewardPage::init @ 0x14020c1d7
// > FollowRewardPage::init @ 0x14020c525
// > FollowRewardPage::init @ 0x14020c868
// > FollowRewardPage::init @ 0x14020cbae
// > FollowRewardPage::updateRate @ 0x14020d68b
// > FollowRewardPage::onSpecialItem @ 0x14020d82f
// > FollowRewardPage::onSpecialItem @ 0x14020da76
// > FollowRewardPage::onSpecialItem @ 0x14020dd0f
// > FollowRewardPage::onSpecialItem @ 0x14020deb6
// > FollowRewardPage::onSpecialItem @ 0x14020e109
// > FollowRewardPage::onSpecialItem @ 0x14020e359
// > FollowRewardPage::onSpecialItem @ 0x14020e4f3
// > GameManager::firstLoad @ 0x140284ff6
// > GauntletSelectLayer::setupGauntlets @ 0x1402fede3
// > GJShopLayer::init @ 0x1403b13f5
// > GJShopLayer::showReactMessage @ 0x1403b33cd
// > GJShopLayer::ccTouchBegan @ 0x1403b4e43
// > LevelAreaLayer::init @ 0x1403de4cf
// > LevelAreaInnerLayer::init @ 0x1403e06f1
// > LevelPage::onTheTower @ 0x1404452a2
// > LevelPage::addSecretDoor @ 0x140446087
// > LevelPage::addSecretDoor @ 0x1404460d9
// > LevelPage::addSecretDoor @ 0x14044615b
// > LevelPage::onSecretDoor @ 0x1404462c6
// > LevelPage::onSecretDoor @ 0x140446484
// > MenuLayer::init @ 0x140473904
// > PlayLayer::destroyPlayer @ 0x1405131e1
// > SecretRewardsLayer::init @ 0x140568177
// > SecretRewardsLayer::init @ 0x1405681d0
// > SecretRewardsLayer::onShop @ 0x14056c1b4
// > SecretRewardsLayer::onShop @ 0x14056c218
// > SecretRewardsLayer::onShop @ 0x14056c27c
// > SecretRewardsLayer::onShop @ 0x14056c2dc
// > SecretRewardsLayer::showDialog01 @ 0x14056d9ef
// > SecretRewardsLayer::showDialog03 @ 0x14056f2f1
// > SecretRewardsLayer::showDialogMechanic @ 0x140570592
// > SecretRewardsLayer::showDialogDiamond @ 0x140571801
// > SecretLayer::init @ 0x1405732b4
// > SecretLayer2::init @ 0x140578728
// > SecretLayer2::init @ 0x140578d67
// > SecretLayer2::init @ 0x1405791b0
// > SecretLayer2::init @ 0x14057926c
// > SecretLayer2::onDoor @ 0x14057a459
// > SecretLayer2::onSubmit @ 0x14057b6ff
// > SecretLayer2::onSubmit @ 0x14057c388
// > SecretLayer3::init @ 0x1405803c3
// > SecretLayer3::init @ 0x1405804a1
// > SecretLayer3::init @ 0x1405804ee
// > SecretLayer3::init @ 0x140580666
// > SecretLayer3::init @ 0x14058074b
// > SecretLayer3::init @ 0x140580828
// > SecretLayer3::init @ 0x140580905
// > SecretLayer3::init @ 0x140580fe2
// > SecretLayer3::onClick @ 0x14058301b
// > SecretLayer3::onClick @ 0x14058302d
// > SecretLayer3::onClick @ 0x140583041
// > SecretLayer3::showUnlockDialog @ 0x14058323f
// > SecretLayer3::showUnlockDialog @ 0x140583251
// > SecretLayer3::showUnlockDialog @ 0x140583265
// > SecretLayer3::onBack @ 0x140584eaf
// > SecretLayer4::init @ 0x140585b82
// > SecretLayer5::init @ 0x14058a7d4
// > ??> @ 0x14091cfdc
//
// 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 11:28:59 +0000
//
// Hidden C++ exception states: #wind=2
_BOOL8 __fastcall GameManager::getUGV(__int64 a1, _BYTE *a2)
{
size_t v3; // rbx
size_t v4; // r8
void **v5; // rdx
cocos2d::CCString *v6; // rax
bool v7; // bl
void *v8; // r8
void *v9; // rcx
void *Src[2]; // [rsp+30h] [rbp-58h] BYREF
__m128i si128; // [rsp+40h] [rbp-48h]
void *Block[2]; // [rsp+50h] [rbp-38h] BYREF
__m128i v14; // [rsp+60h] [rbp-28h]
*(_OWORD *)Src = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836550);
strcpy((char *)Src, "ugv_");
v3 = -1;
v4 = -1;
do
++v4;
while ( a2[v4] );
sub_140044D80(Src, a2, v4);
v5 = Src;
if ( si128.m128i_i64[1] > 0xFuLL )
v5 = (void **)Src[0];
*(_OWORD *)Block = 0;
v14 = 0;
do
++v3;
while ( *((_BYTE *)v5 + v3) );
sub_14003D230(Block, v5, v3);
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(a1 + 456), Block);
v7 = cocos2d::CCString::boolValue(v6);
if ( v14.m128i_i64[1] > 0xFuLL )
{
v8 = Block[0];
if ( (unsigned __int64)(v14.m128i_i64[1] + 1) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
v14 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
if ( si128.m128i_i64[1] > 0xFuLL )
{
v9 = Src[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
return v7;
}