//
// GameManager::getUGV from 0x1003840b0 to 0x1003841b1 (257 bytes)
//
// 66 xrefs:
// > PlayLayer::destroyPlayer @ 0x1000ba51d
// > LevelAreaLayer::init @ 0x100278619
// > LevelAreaInnerLayer::init @ 0x10027a9f4
// > CreatorLayer::init @ 0x1002981c2
// > CreatorLayer::onTreasureRoom @ 0x1002991ab
// > GJShopLayer::init @ 0x100323e72
// > GJShopLayer::showReactMessage @ 0x100325cf9
// > GJShopLayer::ccTouchBegan @ 0x100327354
// > GameManager::firstLoad @ 0x10038a914
// > MenuLayer::init @ 0x100391408
// > SecretLayer4::init @ 0x1003b0f4f
// > WorldSelectLayer::init @ 0x1003c252e
// > FollowRewardPage::init @ 0x10041feba
// > FollowRewardPage::init @ 0x10041ffa9
// > FollowRewardPage::init @ 0x100420093
// > FollowRewardPage::init @ 0x100420182
// > FollowRewardPage::init @ 0x100420271
// > FollowRewardPage::init @ 0x10042035b
// > FollowRewardPage::onSpecialItem @ 0x100420a66
// > FollowRewardPage::onSpecialItem @ 0x100420ac5
// > FollowRewardPage::onSpecialItem @ 0x100420b24
// > FollowRewardPage::onSpecialItem @ 0x100420b83
// > FollowRewardPage::onSpecialItem @ 0x100420be2
// > FollowRewardPage::onSpecialItem @ 0x100420c3e
// > FollowRewardPage::updateRate @ 0x1004211c3
// > LevelPage::onTheTower @ 0x100435ff2
// > LevelPage::addSecretDoor @ 0x10043658c
// > LevelPage::addSecretDoor @ 0x1004365a8
// > LevelPage::addSecretDoor @ 0x1004365f1
// > LevelPage::onSecretDoor @ 0x100436bc3
// > LevelPage::onSecretDoor @ 0x100436bdb
// > SecretLayer5::init @ 0x10047afbb
// > SecretLayer2::init @ 0x10049d487
// > SecretLayer2::init @ 0x10049db17
// > SecretLayer2::init @ 0x10049ded6
// > SecretLayer2::init @ 0x10049df60
// > SecretLayer2::onSubmit @ 0x10049ea08
// > SecretLayer2::onSubmit @ 0x10049f3ec
// > SecretLayer2::onDoor @ 0x10049fb2d
// > SecretLayer3::init @ 0x1004a4158
// > SecretLayer3::init @ 0x1004a41f5
// > SecretLayer3::init @ 0x1004a420d
// > SecretLayer3::init @ 0x1004a4341
// > SecretLayer3::init @ 0x1004a43e5
// > SecretLayer3::init @ 0x1004a4484
// > SecretLayer3::init @ 0x1004a4528
// > SecretLayer3::init @ 0x1004a4a58
// > SecretLayer3::onClick @ 0x1004a50d5
// > SecretLayer3::onClick @ 0x1004a50ec
// > SecretLayer3::onClick @ 0x1004a5107
// > SecretLayer3::onBack @ 0x1004a5ee7
// > SecretLayer3::showUnlockDialog @ 0x1004a6aac
// > SecretLayer3::showUnlockDialog @ 0x1004a6ac4
// > SecretLayer3::showUnlockDialog @ 0x1004a6adf
// > GauntletSelectLayer::setupGauntlets @ 0x100572313
// > SecretLayer::init @ 0x1005faebb
// > SecretRewardsLayer::init @ 0x100630141
// > SecretRewardsLayer::init @ 0x100630167
// > SecretRewardsLayer::onShop @ 0x100632875
// > SecretRewardsLayer::onShop @ 0x10063289f
// > SecretRewardsLayer::onShop @ 0x1006328c9
// > SecretRewardsLayer::onShop @ 0x1006328f3
// > SecretRewardsLayer::showDialog01 @ 0x100634bcd
// > SecretRewardsLayer::showDialog03 @ 0x1006368dd
// > SecretRewardsLayer::showDialogMechanic @ 0x100637e80
// > SecretRewardsLayer::showDialogDiamond @ 0x10063941d
//
// 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
//
bool __fastcall GameManager::getUGV(GameManager *a1, const char *a2)
{
double v2; // xmm0_8
const char *data; // r14
cocos2d::CCDictionary *m_unlockValueKeeper; // rbx
size_t v5; // rax
size_t v6; // r15
char *v7; // r12
size_t v8; // r13
cocos2d::CCString *v9; // rax
bool v10; // bl
_QWORD __dst[2]; // [rsp+8h] [rbp-58h] BYREF
void *__p; // [rsp+18h] [rbp-48h]
std::string v14; // [rsp+20h] [rbp-40h] BYREF
v14.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)8;
strcpy(v14.__r_.__value_.__s.__data_, "ugv_");
std::string::append(&v14, a2);
if ( (*(_BYTE *)&v14.__r_.__value_.__s.0 & 1) != 0 )
data = v14.__r_.__value_.__l.__data_;
else
data = v14.__r_.__value_.__s.__data_;
m_unlockValueKeeper = a1->m_unlockValueKeeper;
v5 = strlen(data);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 | 1;
__dst[1] = v6;
goto LABEL_11;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
LABEL_11:
memmove(v7, data, v6);
v7[v6] = 0;
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1((__int64)m_unlockValueKeeper, (__int64)__dst);
v10 = cocos2d::CCString::boolValue(v9);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( (*(_BYTE *)&v14.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v14.__r_.__value_.__l.__data_);
return v10;
}