{"type": "func", "start": 5370295104, "end": 5370295448, "name": "GameManager::setUGV", "pseudocode": "// \n// GameManager::setUGV from 0x140183340 to 0x140183498 (344 bytes)\n// \n// 42 xrefs:\n// > CreatorLayer::dialogClosed @ 0x14009f7c0\n// > GameManager::dataLoaded @ 0x140188531\n// > GameManager::dataLoaded @ 0x140188543\n// > GameManager::firstLoad @ 0x140188f6b\n// > GameManager::applicationWillEnterForeground @ 0x140189ce4\n// > GameManager::applicationWillEnterForeground @ 0x140189d88\n// > GameManager::applicationWillEnterForeground @ 0x140189e2c\n// > GameManager::applicationWillEnterForeground @ 0x140189ecc\n// > GameManager::applicationWillEnterForeground @ 0x140189f1f\n// > GameManager::applicationWillEnterForeground @ 0x140189f72\n// > TOSPopup::onClose @ 0x14029e66e\n// > GJShopLayer::showReactMessage @ 0x1402ae574\n// > LevelAreaLayer::showDialog @ 0x1402c52dc\n// > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x1402c7624\n// > LevelSelectLayer::init @ 0x1403184c7\n// > LevelPage::onTheTower @ 0x14031c23d\n// > LevelPage::onSecretDoor @ 0x14031cd93\n// > LevelPage::dialogClosed @ 0x14031d807\n// > PlayLayer::destroyPlayer @ 0x1403b4408\n// > SecretRewardsLayer::dialogClosed @ 0x1403d6943\n// > SecretRewardsLayer::dialogClosed @ 0x1403d69a5\n// > SecretRewardsLayer::dialogClosed @ 0x1403d6a07\n// > SecretRewardsLayer::dialogClosed @ 0x1403d6a6a\n// > SecretRewardsLayer::showDialog01 @ 0x1403d93f6\n// > SecretRewardsLayer::showDialog03 @ 0x1403da105\n// > SecretRewardsLayer::showDialogMechanic @ 0x1403db636\n// > SecretRewardsLayer::showDialogDiamond @ 0x1403dc4c6\n// > SecretLayer::getThreadMessage @ 0x1403e0731\n// > SecretLayer2::showSecretLevel @ 0x1403e37fc\n// > SecretLayer2::dialogClosed @ 0x1403e4612\n// > SecretLayer2::getThreadMessage @ 0x1403e772c\n// > SecretLayer3::onClick @ 0x1403ec4b6\n// > SecretLayer3::onClick @ 0x1403ec843\n// > SecretLayer3::onClick @ 0x1403ecbb3\n// > SecretLayer3::onClick @ 0x1403ed140\n// > SecretLayer3::onClick @ 0x1403ed18b\n// > SecretLayer3::dialogClosed @ 0x1403ef388\n// > SecretLayer3::dialogClosed @ 0x1403ef5cd\n// > SecretLayer4::showFirstDialog @ 0x1403f28be\n// > SecretLayer5::showFirstDialog @ 0x1403f78be\n// > <???> @ 0x1406cb58c\n// > <???> @ 0x1406cb598\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Hidden C++ exception states: #wind=2\nvoid GameManager::setUGV(GameManager *a1, const char *a2, bool a3)\n{\n  BOOL v3; // esi\n  size_t v5; // rbx\n  size_t v6; // r8\n  void **v7; // rdx\n  struct cocos2d::CCString *v8; // rax\n  void *v9; // rcx\n  void *v10; // rcx\n  void *Src[2]; // [rsp+20h] [rbp-68h] BYREF\n  __int64 v12; // [rsp+30h] [rbp-58h]\n  unsigned __int64 v13; // [rsp+38h] [rbp-50h]\n  void *Block[2]; // [rsp+40h] [rbp-48h] BYREF\n  __int128 v15; // [rsp+50h] [rbp-38h]\n\n  v3 = a3;\n  *(_OWORD *)Src = 0;\n  v12 = 4;\n  v13 = 15;\n  strcpy((char *)Src, \"ugv_\");\n  v5 = -1;\n  v6 = -1;\n  do\n    ++v6;\n  while ( a2[v6] );\n  sub_140041270(Src, (void *)a2, v6);\n  v7 = Src;\n  if ( v13 > 0xF )\n    v7 = (void **)Src[0];\n  *(_OWORD *)Block = 0;\n  v15 = 0;\n  do\n    ++v5;\n  while ( *((_BYTE *)v7 + v5) );\n  sub_14003A930(Block, v7, v5);\n  v8 = cocos2d::CCString::createWithFormat(\"%i\", v3);\n  cocos2d::CCDictionary::setObject(a1->m_unlockValueKeeper, v8, Block);\n  if ( *((_QWORD *)&v15 + 1) > 0xFu )\n  {\n    v9 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v15 + 1) + 1LL) >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v9);\n  }\n  if ( v13 > 0xF )\n  {\n    v10 = Src[0];\n    if ( v13 + 1 >= 0x1000 )\n    {\n      v10 = *((void **)Src[0] - 1);\n      if ( (unsigned __int64)((char *)Src[0] - (char *)v10 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v10);\n  }\n}", "assembly": "; \n; GameManager::setUGV from 0x140183340 to 0x140183498 (344 bytes)\n; \n; 42 xrefs:\n; > CreatorLayer::dialogClosed @ 0x14009f7c0\n; > GameManager::dataLoaded @ 0x140188531\n; > GameManager::dataLoaded @ 0x140188543\n; > GameManager::firstLoad @ 0x140188f6b\n; > GameManager::applicationWillEnterForeground @ 0x140189ce4\n; > GameManager::applicationWillEnterForeground @ 0x140189d88\n; > GameManager::applicationWillEnterForeground @ 0x140189e2c\n; > GameManager::applicationWillEnterForeground @ 0x140189ecc\n; > GameManager::applicationWillEnterForeground @ 0x140189f1f\n; > GameManager::applicationWillEnterForeground @ 0x140189f72\n; > TOSPopup::onClose @ 0x14029e66e\n; > GJShopLayer::showReactMessage @ 0x1402ae574\n; > LevelAreaLayer::showDialog @ 0x1402c52dc\n; > LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x1402c7624\n; > LevelSelectLayer::init @ 0x1403184c7\n; > LevelPage::onTheTower @ 0x14031c23d\n; > LevelPage::onSecretDoor @ 0x14031cd93\n; > LevelPage::dialogClosed @ 0x14031d807\n; > PlayLayer::destroyPlayer @ 0x1403b4408\n; > SecretRewardsLayer::dialogClosed @ 0x1403d6943\n; > SecretRewardsLayer::dialogClosed @ 0x1403d69a5\n; > SecretRewardsLayer::dialogClosed @ 0x1403d6a07\n; > SecretRewardsLayer::dialogClosed @ 0x1403d6a6a\n; > SecretRewardsLayer::showDialog01 @ 0x1403d93f6\n; > SecretRewardsLayer::showDialog03 @ 0x1403da105\n; > SecretRewardsLayer::showDialogMechanic @ 0x1403db636\n; > SecretRewardsLayer::showDialogDiamond @ 0x1403dc4c6\n; > SecretLayer::getThreadMessage @ 0x1403e0731\n; > SecretLayer2::showSecretLevel @ 0x1403e37fc\n; > SecretLayer2::dialogClosed @ 0x1403e4612\n; > SecretLayer2::getThreadMessage @ 0x1403e772c\n; > SecretLayer3::onClick @ 0x1403ec4b6\n; > SecretLayer3::onClick @ 0x1403ec843\n; > SecretLayer3::onClick @ 0x1403ecbb3\n; > SecretLayer3::onClick @ 0x1403ed140\n; > SecretLayer3::onClick @ 0x1403ed18b\n; > SecretLayer3::dialogClosed @ 0x1403ef388\n; > SecretLayer3::dialogClosed @ 0x1403ef5cd\n; > SecretLayer4::showFirstDialog @ 0x1403f28be\n; > SecretLayer5::showFirstDialog @ 0x1403f78be\n; > <???> @ 0x1406cb58c\n; > <???> @ 0x1406cb598\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbx                                                            ; +0x0, 0x140183340\npush    rsi                                                            ; +0x2, 0x140183342\npush    rdi                                                            ; +0x3, 0x140183343\nsub     rsp, 70h                                                       ; +0x4, 0x140183344\nmov     rax, cs:__security_cookie                                      ; +0x8, 0x140183348\nxor     rax, rsp                                                       ; +0xf, 0x14018334f\nmov     [rsp+88h+var_28], rax                                          ; +0x12, 0x140183352\nmovzx   esi, r8b                                                       ; +0x17, 0x140183357\nmov     rdi, rcx                                                       ; +0x1b, 0x14018335b\nxorps   xmm0, xmm0                                                     ; +0x1e, 0x14018335e\nmovups  xmmword ptr [rsp+88h+Src], xmm0                                ; +0x21, 0x140183361\nmov     [rsp+88h+var_58], 4                                            ; +0x26, 0x140183366\nmov     [rsp+88h+var_50], 0Fh                                          ; +0x2f, 0x14018336f\nmov     dword ptr [rsp+88h+Src], 5F766775h                             ; +0x38, 0x140183378\nmov     byte ptr [rsp+88h+Src+4], 0                                    ; +0x40, 0x140183380\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x45, 0x140183385\nmov     r8, rbx                                                        ; +0x4c, 0x14018338c\nnop                                                                    ; +0x4f, 0x14018338f\ninc     r8; Size                                                       ; +0x50, 0x140183390\ncmp     byte ptr [rdx+r8], 0                                           ; +0x53, 0x140183393\njnz     short loc_140183390                                            ; +0x58, 0x140183398\nlea     rcx, [rsp+88h+Src]; Src                                        ; +0x5a, 0x14018339a\ncall    sub_140041270                                                  ; +0x5f, 0x14018339f\nlea     rdx, [rsp+88h+Src]                                             ; +0x64, 0x1401833a4\ncmp     [rsp+88h+var_50], 0Fh                                          ; +0x69, 0x1401833a9\ncmova   rdx, [rsp+88h+Src]                                             ; +0x6f, 0x1401833af\nxorps   xmm0, xmm0                                                     ; +0x75, 0x1401833b5\nmovups  xmmword ptr [rsp+88h+Block], xmm0                              ; +0x78, 0x1401833b8\nxorps   xmm1, xmm1                                                     ; +0x7d, 0x1401833bd\nmovdqu  [rsp+88h+var_38], xmm1                                         ; +0x80, 0x1401833c0\ninc     rbx                                                            ; +0x86, 0x1401833c6\ncmp     byte ptr [rdx+rbx], 0                                          ; +0x89, 0x1401833c9\njnz     short loc_1401833C6                                            ; +0x8d, 0x1401833cd\nmov     r8, rbx                                                        ; +0x8f, 0x1401833cf\nlea     rcx, [rsp+88h+Block]                                           ; +0x92, 0x1401833d2\ncall    sub_14003A930                                                  ; +0x97, 0x1401833d7\nnop                                                                    ; +0x9c, 0x1401833dc\nmov     edx, esi                                                       ; +0x9d, 0x1401833dd\nlea     rcx, aI_11; \"%i\"                                               ; +0x9f, 0x1401833df\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xa6, 0x1401833e6\nmov     rdx, rax                                                       ; +0xac, 0x1401833ec\nlea     r8, [rsp+88h+Block]                                            ; +0xaf, 0x1401833ef\nmov     rcx, [rdi+1A0h]                                                ; +0xb4, 0x1401833f4\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0xbb, 0x1401833fb\nnop                                                                    ; +0xc1, 0x140183401\nmov     rdx, qword ptr [rsp+88h+var_38+8]                              ; +0xc2, 0x140183402\ncmp     rdx, 0Fh                                                       ; +0xc7, 0x140183407\njbe     short loc_140183443                                            ; +0xcb, 0x14018340b\ninc     rdx                                                            ; +0xcd, 0x14018340d\nmov     rcx, [rsp+88h+Block]; Block                                    ; +0xd0, 0x140183410\nmov     rax, rcx                                                       ; +0xd5, 0x140183415\ncmp     rdx, 1000h                                                     ; +0xd8, 0x140183418\njb      short loc_14018343D                                            ; +0xdf, 0x14018341f\nadd     rdx, 27h ; '''                                                 ; +0xe1, 0x140183421\nmov     rcx, [rcx-8]                                                   ; +0xe5, 0x140183425\nsub     rax, rcx                                                       ; +0xe9, 0x140183429\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xec, 0x14018342c\ncmp     rax, 1Fh                                                       ; +0xf0, 0x140183430\njbe     short loc_14018343D                                            ; +0xf4, 0x140183434\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xf6, 0x140183436\ndb 0CCh                                                                ; +0xfc, 0x14018343c\ncall    j_j_free                                                       ; +0xfd, 0x14018343d\nnop                                                                    ; +0x102, 0x140183442\nmov     rdx, [rsp+88h+var_50]                                          ; +0x103, 0x140183443\ncmp     rdx, 0Fh                                                       ; +0x108, 0x140183448\njbe     short loc_140183483                                            ; +0x10c, 0x14018344c\ninc     rdx                                                            ; +0x10e, 0x14018344e\nmov     rcx, [rsp+88h+Src]; Block                                      ; +0x111, 0x140183451\nmov     rax, rcx                                                       ; +0x116, 0x140183456\ncmp     rdx, 1000h                                                     ; +0x119, 0x140183459\njb      short loc_14018347E                                            ; +0x120, 0x140183460\nadd     rdx, 27h ; '''                                                 ; +0x122, 0x140183462\nmov     rcx, [rcx-8]                                                   ; +0x126, 0x140183466\nsub     rax, rcx                                                       ; +0x12a, 0x14018346a\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x12d, 0x14018346d\ncmp     rax, 1Fh                                                       ; +0x131, 0x140183471\njbe     short loc_14018347E                                            ; +0x135, 0x140183475\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x137, 0x140183477\nalign 2                                                                ; +0x13d, 0x14018347d\ncall    j_j_free                                                       ; +0x13e, 0x14018347e\nmov     rcx, [rsp+88h+var_28]                                          ; +0x143, 0x140183483\nxor     rcx, rsp; StackCookie                                          ; +0x148, 0x140183488\ncall    __security_check_cookie                                        ; +0x14b, 0x14018348b\nadd     rsp, 70h                                                       ; +0x150, 0x140183490\npop     rdi                                                            ; +0x154, 0x140183494\npop     rsi                                                            ; +0x155, 0x140183495\npop     rbx                                                            ; +0x156, 0x140183496\nretn                                                                   ; +0x157, 0x140183497", "xrefs": ["CreatorLayer::dialogClosed @ 0x14009f7c0", "GameManager::dataLoaded @ 0x140188531", "GameManager::dataLoaded @ 0x140188543", "GameManager::firstLoad @ 0x140188f6b", "GameManager::applicationWillEnterForeground @ 0x140189ce4", "GameManager::applicationWillEnterForeground @ 0x140189d88", "GameManager::applicationWillEnterForeground @ 0x140189e2c", "GameManager::applicationWillEnterForeground @ 0x140189ecc", "GameManager::applicationWillEnterForeground @ 0x140189f1f", "GameManager::applicationWillEnterForeground @ 0x140189f72", "TOSPopup::onClose @ 0x14029e66e", "GJShopLayer::showReactMessage @ 0x1402ae574", "LevelAreaLayer::showDialog @ 0x1402c52dc", "LevelAreaInnerLayer::showFloor1CompleteDialog @ 0x1402c7624", "LevelSelectLayer::init @ 0x1403184c7", "LevelPage::onTheTower @ 0x14031c23d", "LevelPage::onSecretDoor @ 0x14031cd93", "LevelPage::dialogClosed @ 0x14031d807", "PlayLayer::destroyPlayer @ 0x1403b4408", "SecretRewardsLayer::dialogClosed @ 0x1403d6943", "SecretRewardsLayer::dialogClosed @ 0x1403d69a5", "SecretRewardsLayer::dialogClosed @ 0x1403d6a07", "SecretRewardsLayer::dialogClosed @ 0x1403d6a6a", "SecretRewardsLayer::showDialog01 @ 0x1403d93f6", "SecretRewardsLayer::showDialog03 @ 0x1403da105", "SecretRewardsLayer::showDialogMechanic @ 0x1403db636", "SecretRewardsLayer::showDialogDiamond @ 0x1403dc4c6", "SecretLayer::getThreadMessage @ 0x1403e0731", "SecretLayer2::showSecretLevel @ 0x1403e37fc", "SecretLayer2::dialogClosed @ 0x1403e4612", "SecretLayer2::getThreadMessage @ 0x1403e772c", "SecretLayer3::onClick @ 0x1403ec4b6", "SecretLayer3::onClick @ 0x1403ec843", "SecretLayer3::onClick @ 0x1403ecbb3", "SecretLayer3::onClick @ 0x1403ed140", "SecretLayer3::onClick @ 0x1403ed18b", "SecretLayer3::dialogClosed @ 0x1403ef388", "SecretLayer3::dialogClosed @ 0x1403ef5cd", "SecretLayer4::showFirstDialog @ 0x1403f28be", "SecretLayer5::showFirstDialog @ 0x1403f78be", "<???> @ 0x1406cb58c", "<???> @ 0x1406cb598"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}