{"type": "func", "start": 4664028, "end": 4664144, "name": "GJBaseGameLayer::tryGetObject", "pseudocode": "// \n// GJBaseGameLayer::tryGetObject from 0x472adc to 0x472b50 (116 bytes)\n// \n// 20 xrefs:\n// > EditorUI::findAndSelectObject @ 0x3a2e9e\n// > GJBaseGameLayer::resetPlayer @ 0x472b9e\n// > GJBaseGameLayer::getMoveTargetDelta @ 0x472c82\n// > GJBaseGameLayer::getMoveTargetDelta @ 0x472cb8\n// > GJBaseGameLayer::getRotateCommandTargets @ 0x472d36\n// > GJBaseGameLayer::getRotateCommandTargets @ 0x472d44\n// > GJBaseGameLayer::getRotateCommandTargets @ 0x472d72\n// > GJBaseGameLayer::getFollowSpeedVal @ 0x475256\n// > GJBaseGameLayer::getFollowSpeedVal @ 0x47527c\n// > GJBaseGameLayer::spawnParticleTrigger @ 0x477bd0\n// > GJBaseGameLayer::triggerDynamicMoveCommand @ 0x4818a4\n// > GJBaseGameLayer::triggerDynamicMoveCommand @ 0x4818ce\n// > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c64\n// > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c70\n// > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c7c\n// > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c88\n// > GJBaseGameLayer::triggerRotateCommand @ 0x481f00\n// > GJBaseGameLayer::triggerRotateCommand @ 0x481f0c\n// > GJBaseGameLayer::triggerRotateCommand @ 0x481f18\n// > GJBaseGameLayer::triggerRotateCommand @ 0x481f24\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\nGameObject *GJBaseGameLayer::tryGetObject(GJBaseGameLayer *a1, int a2)\n{\n  GameObject *result; // r0\n  cocos2d::CCArray *Group; // r4\n  float v6; // s16\n  unsigned int v7; // s15\n\n  if ( a2 <= 0 )\n    return nullptr;\n  result = GJBaseGameLayer::tryGetMainObject(a1, a2);\n  if ( !result )\n  {\n    Group = GJBaseGameLayer::getGroup(a1, a2);\n    if ( !cocos2d::CCArray::count(Group) )\n      return nullptr;\n    v6 = GameToolbox::fast_rand_0_1();\n    if ( v6 == 1.0 )\n      v6 = 0.0;\n    v7 = cocos2d::CCArray::count(Group);\n    return (GameObject *)cocos2d::CCArray::objectAtIndex(Group, (int)(float)((float)v7 * v6));\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::tryGetObject from 0x472adc to 0x472b50 (116 bytes)\n; \n; 20 xrefs:\n; > EditorUI::findAndSelectObject @ 0x3a2e9e\n; > GJBaseGameLayer::resetPlayer @ 0x472b9e\n; > GJBaseGameLayer::getMoveTargetDelta @ 0x472c82\n; > GJBaseGameLayer::getMoveTargetDelta @ 0x472cb8\n; > GJBaseGameLayer::getRotateCommandTargets @ 0x472d36\n; > GJBaseGameLayer::getRotateCommandTargets @ 0x472d44\n; > GJBaseGameLayer::getRotateCommandTargets @ 0x472d72\n; > GJBaseGameLayer::getFollowSpeedVal @ 0x475256\n; > GJBaseGameLayer::getFollowSpeedVal @ 0x47527c\n; > GJBaseGameLayer::spawnParticleTrigger @ 0x477bd0\n; > GJBaseGameLayer::triggerDynamicMoveCommand @ 0x4818a4\n; > GJBaseGameLayer::triggerDynamicMoveCommand @ 0x4818ce\n; > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c64\n; > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c70\n; > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c7c\n; > GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c88\n; > GJBaseGameLayer::triggerRotateCommand @ 0x481f00\n; > GJBaseGameLayer::triggerRotateCommand @ 0x481f0c\n; > GJBaseGameLayer::triggerRotateCommand @ 0x481f18\n; > GJBaseGameLayer::triggerRotateCommand @ 0x481f24\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            {R3-R5,LR}                                             ; +0x0, 0x472adc\nSUBS            R4, R1, #0                                             ; +0x2, 0x472ade\nVPUSH           {D8}                                                   ; +0x4, 0x472ae0\nMOV             R5, R0                                                 ; +0x8, 0x472ae4\nBGT             loc_472AEC                                             ; +0xa, 0x472ae6\nMOVS            R0, #0; this                                           ; +0xc, 0x472ae8\nB               loc_472B4A                                             ; +0xe, 0x472aea\nBL              _ZN15GJBaseGameLayer16tryGetMainObjectEi; GJBaseGameLayer::tryGetMainObject(int) ; +0x10, 0x472aec\nCBNZ            R0, loc_472B4A                                         ; +0x14, 0x472af0\nMOV             R1, R4; int                                            ; +0x16, 0x472af2\nMOV             R0, R5; this                                           ; +0x18, 0x472af4\nBL              _ZN15GJBaseGameLayer8getGroupEi; GJBaseGameLayer::getGroup(int) ; +0x1a, 0x472af6\nMOV             R4, R0                                                 ; +0x1e, 0x472afa\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x20, 0x472afc\nCMP             R0, #0                                                 ; +0x24, 0x472b00\nBEQ             loc_472AE8                                             ; +0x26, 0x472b02\nBL              _ZN11GameToolbox13fast_rand_0_1Ev; GameToolbox::fast_rand_0_1(void) ; +0x28, 0x472b04\nVMOV.F32        S15, #1.0                                              ; +0x2c, 0x472b08\nVMOV            S16, R0                                                ; +0x30, 0x472b0c\nMOV             R0, R4; this                                           ; +0x34, 0x472b10\nVCMP.F32        S16, S15                                               ; +0x36, 0x472b12\nVLDR            S15, =0.0                                              ; +0x3a, 0x472b16\nVMRS            APSR_nzcv, FPSCR                                       ; +0x3e, 0x472b1a\nIT EQ                                                                  ; +0x42, 0x472b1e\nVMOVEQ.F32      S16, S15                                               ; +0x44, 0x472b20\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x48, 0x472b24\nVMOV            S15, R0                                                ; +0x4c, 0x472b28\nMOV             R0, R4; this                                           ; +0x50, 0x472b2c\nVCVT.F32.U32    S15, S15                                               ; +0x52, 0x472b2e\nVMUL.F32        S16, S15, S16                                          ; +0x56, 0x472b32\nVCVT.S32.F32    S15, S16                                               ; +0x5a, 0x472b36\nVPOP            {D8}                                                   ; +0x5e, 0x472b3a\nPOP.W           {R3-R5,LR}                                             ; +0x62, 0x472b3e\nVMOV            R1, S15; unsigned int                                  ; +0x66, 0x472b42\nB.W             _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x6a, 0x472b46\nVPOP            {D8}                                                   ; +0x6e, 0x472b4a\nPOP             {R3-R5,PC}                                             ; +0x72, 0x472b4e", "xrefs": ["EditorUI::findAndSelectObject @ 0x3a2e9e", "GJBaseGameLayer::resetPlayer @ 0x472b9e", "GJBaseGameLayer::getMoveTargetDelta @ 0x472c82", "GJBaseGameLayer::getMoveTargetDelta @ 0x472cb8", "GJBaseGameLayer::getRotateCommandTargets @ 0x472d36", "GJBaseGameLayer::getRotateCommandTargets @ 0x472d44", "GJBaseGameLayer::getRotateCommandTargets @ 0x472d72", "GJBaseGameLayer::getFollowSpeedVal @ 0x475256", "GJBaseGameLayer::getFollowSpeedVal @ 0x47527c", "GJBaseGameLayer::spawnParticleTrigger @ 0x477bd0", "GJBaseGameLayer::triggerDynamicMoveCommand @ 0x4818a4", "GJBaseGameLayer::triggerDynamicMoveCommand @ 0x4818ce", "GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c64", "GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c70", "GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c7c", "GJBaseGameLayer::triggerDynamicRotateCommand @ 0x481c88", "GJBaseGameLayer::triggerRotateCommand @ 0x481f00", "GJBaseGameLayer::triggerRotateCommand @ 0x481f0c", "GJBaseGameLayer::triggerRotateCommand @ 0x481f18", "GJBaseGameLayer::triggerRotateCommand @ 0x481f24"], "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"}