//
// GameManager::getUGV from 0x10036d4c0 to 0x10036d5c1 (257 bytes)
//
// 68 xrefs:
// > PlayLayer::destroyPlayer @ 0x100088052
// > LevelAreaLayer::init @ 0x100264c19
// > LevelAreaInnerLayer::init @ 0x100266ff4
// > CreatorLayer::init @ 0x100282da3
// > CreatorLayer::onTreasureRoom @ 0x1002840fb
// > GJShopLayer::init @ 0x10030f4c4
// > GJShopLayer::showReactMessage @ 0x100311409
// > GJShopLayer::ccTouchBegan @ 0x100312a64
// > GameManager::firstLoad @ 0x100374b69
// > MenuLayer::init @ 0x10037c0df
// > SecretLayer4::init @ 0x10039a34f
// > WorldSelectLayer::init @ 0x1003ab92e
// > FollowRewardPage::init @ 0x10040c90a
// > FollowRewardPage::init @ 0x10040c9f9
// > FollowRewardPage::init @ 0x10040cae8
// > FollowRewardPage::init @ 0x10040cbd7
// > FollowRewardPage::init @ 0x10040ccc6
// > FollowRewardPage::init @ 0x10040cdb0
// > FollowRewardPage::init @ 0x10040ce9f
// > FollowRewardPage::onSpecialItem @ 0x10040d606
// > FollowRewardPage::onSpecialItem @ 0x10040d665
// > FollowRewardPage::onSpecialItem @ 0x10040d6c4
// > FollowRewardPage::onSpecialItem @ 0x10040d723
// > FollowRewardPage::onSpecialItem @ 0x10040d782
// > FollowRewardPage::onSpecialItem @ 0x10040d7e1
// > FollowRewardPage::onSpecialItem @ 0x10040d83d
// > FollowRewardPage::updateRate @ 0x10040ddc3
// > LevelPage::onTheTower @ 0x100423a92
// > LevelPage::addSecretDoor @ 0x10042402c
// > LevelPage::addSecretDoor @ 0x100424048
// > LevelPage::addSecretDoor @ 0x100424091
// > LevelPage::onSecretDoor @ 0x100424663
// > LevelPage::onSecretDoor @ 0x10042467b
// > SecretLayer5::init @ 0x10046f91e
// > SecretLayer2::init @ 0x100496457
// > SecretLayer2::init @ 0x100496ae7
// > SecretLayer2::init @ 0x100496ea6
// > SecretLayer2::init @ 0x100496f30
// > SecretLayer2::onSubmit @ 0x1004979d8
// > SecretLayer2::onSubmit @ 0x1004983bc
// > SecretLayer2::onDoor @ 0x100498afd
// > SecretLayer3::init @ 0x10049d128
// > SecretLayer3::init @ 0x10049d1c5
// > SecretLayer3::init @ 0x10049d1dd
// > SecretLayer3::init @ 0x10049d311
// > SecretLayer3::init @ 0x10049d3b5
// > SecretLayer3::init @ 0x10049d454
// > SecretLayer3::init @ 0x10049d4f8
// > SecretLayer3::init @ 0x10049da28
// > SecretLayer3::onClick @ 0x10049e0a5
// > SecretLayer3::onClick @ 0x10049e0bc
// > SecretLayer3::onClick @ 0x10049e0d7
// > SecretLayer3::onBack @ 0x10049eeb7
// > SecretLayer3::showUnlockDialog @ 0x10049fa7c
// > SecretLayer3::showUnlockDialog @ 0x10049fa94
// > SecretLayer3::showUnlockDialog @ 0x10049faaf
// > GauntletSelectLayer::setupGauntlets @ 0x10059f5fc
// > SecretLayer::init @ 0x1006d1cbb
// > SecretRewardsLayer::init @ 0x10070cd71
// > SecretRewardsLayer::init @ 0x10070cd97
// > SecretRewardsLayer::onShop @ 0x10070f4a5
// > SecretRewardsLayer::onShop @ 0x10070f4cf
// > SecretRewardsLayer::onShop @ 0x10070f4f9
// > SecretRewardsLayer::onShop @ 0x10070f523
// > SecretRewardsLayer::showDialog01 @ 0x1007117fd
// > SecretRewardsLayer::showDialog03 @ 0x10071350d
// > SecretRewardsLayer::showDialogMechanic @ 0x100714ab0
// > SecretRewardsLayer::showDialogDiamond @ 0x10071604d
//
// 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:29:01 +0000
//
__int64 __fastcall GameManager::getUGV(__int64 a1, const std::string::value_type *a2)
{
const char *data; // r14
__int64 v3; // rbx
size_t v4; // rax
size_t v5; // r15
char *v6; // r12
size_t v7; // r13
void *v8; // rax
unsigned int v9; // ebx
_QWORD __dst[2]; // [rsp+8h] [rbp-58h] BYREF
void *__p; // [rsp+18h] [rbp-48h]
std::string v13; // [rsp+20h] [rbp-40h] BYREF
v13.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)8;
strcpy(v13.__r_.__value_.__s.__data_, "ugv_");
std::string::append(&v13, a2);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
data = v13.__r_.__value_.__l.__data_;
else
data = v13.__r_.__value_.__s.__data_;
v3 = *(_QWORD *)(a1 + 448);
v4 = strlen(data);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v5 = v4;
if ( v4 >= 0x17 )
{
v7 = 26;
if ( (v4 | 7) != 0x17 )
v7 = (v4 | 7) + 1;
v6 = (char *)operator new(v7);
__p = v6;
__dst[0] = v7 | 1;
__dst[1] = v5;
goto LABEL_11;
}
LOBYTE(__dst[0]) = 2 * v4;
v6 = (char *)__dst + 1;
if ( v4 )
LABEL_11:
memmove(v6, data, v5);
v6[v5] = 0;
v8 = cocos2d::CCDictionary::valueForKey(v3, (__int64)__dst);
v9 = cocos2d::CCString::boolValue(v8);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v13.__r_.__value_.__l.__data_);
return v9;
}