{"type": "func", "start": 5372035584, "end": 5372035752, "name": "GJBaseGameLayer::tryGetMainObject", "pseudocode": "// \n// GJBaseGameLayer::tryGetMainObject from 0x14032c200 to 0x14032c2a8 (168 bytes)\n// \n// 41 xrefs:\n// > EditorUI::findObject @ 0x1401c93b4\n// > GJBaseGameLayer::playKeyframeAnimation @ 0x14031f410\n// > GJBaseGameLayer::getSavedPosition @ 0x140320892\n// > GJBaseGameLayer::getSavedPosition @ 0x140320960\n// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321a59\n// > GJBaseGameLayer::triggerMoveCommand @ 0x140326740\n// > GJBaseGameLayer::triggerMoveCommand @ 0x140326772\n// > GJBaseGameLayer::triggerTransformCommand @ 0x1403272d6\n// > GJBaseGameLayer::updateGradientLayers @ 0x14032813f\n// > GJBaseGameLayer::updateGradientLayers @ 0x140328150\n// > GJBaseGameLayer::updateGradientLayers @ 0x140328161\n// > GJBaseGameLayer::updateGradientLayers @ 0x140328172\n// > GJBaseGameLayer::positionForShaderTarget @ 0x14032b232\n// > GJBaseGameLayer::speedForShaderTarget @ 0x14032b2f2\n// > GJBaseGameLayer::tryGetObject @ 0x14032c2d5\n// > GJBaseGameLayer::positionUIObjects @ 0x14032ef45\n// > GJBaseGameLayer::positionUIObjects @ 0x14032ef85\n// > GJBaseGameLayer::processAreaEffects @ 0x140331424\n// > GJBaseGameLayer::processRotationActions @ 0x1403345c9\n// > GJBaseGameLayer::processTransformActions @ 0x14033544a\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x140338273\n// > GJBaseGameLayer::processFollowActions @ 0x1403391b7\n// > GJBaseGameLayer::optimizeMoveGroups @ 0x140339d4b\n// > GJBaseGameLayer::updateCamera @ 0x140345d50\n// > GJBaseGameLayer::updateCamera @ 0x140345db7\n// > GJBaseGameLayer::updateCamera @ 0x140345e1a\n// > GJBaseGameLayer::updateCamera @ 0x140345e89\n// > GJBaseGameLayer::updateCamera @ 0x140345eed\n// > GJBaseGameLayer::updateCamera @ 0x140346f89\n// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x140348d7d\n// > GJBaseGameLayer::spawnParticleTrigger @ 0x140349b83\n// > GJBaseGameLayer::volumeForProximityEffect @ 0x14034c8bf\n// > GJBaseGameLayer::visit @ 0x140351b0c\n// > GJBaseGameLayer::visit @ 0x140351b1d\n// > GJBaseGameLayer::visit @ 0x140351b2e\n// > GJBaseGameLayer::visit @ 0x140351b3f\n// > PlayLayer::activatePlatformerEndTrigger @ 0x14050ac80\n// > PlayLayer::processCheckpoints @ 0x140513a36\n// > <???> @ 0x1408b6058\n// > <???> @ 0x1408b606c\n// > <???> @ 0x14091f280\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:30:30 +0000\n// \n\nstruct cocos2d::CCObject *__fastcall GJBaseGameLayer::tryGetMainObject(__int64 a1, int a2)\n{\n  struct cocos2d::CCObject *result; // rax\n  cocos2d::CCArray *v5; // rax\n  cocos2d::CCArray *v6; // rdi\n  struct cocos2d::CCObject *Group; // rax\n  cocos2d::CCArray *v8; // rbx\n\n  if ( a2 <= 0 )\n    return nullptr;\n  v5 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 3968), a2);\n  v6 = v5;\n  if ( !v5 || !cocos2d::CCArray::count(v5) || (result = cocos2d::CCArray::objectAtIndex(v6, 0)) == nullptr )\n  {\n    Group = GJBaseGameLayer::getGroup(a1, (unsigned int)a2);\n    v8 = Group;\n    if ( Group && cocos2d::CCArray::count(Group) == 1 )\n      return cocos2d::CCArray::objectAtIndex(v8, 0);\n    else\n      return nullptr;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::tryGetMainObject from 0x14032c200 to 0x14032c2a8 (168 bytes)\n; \n; 41 xrefs:\n; > EditorUI::findObject @ 0x1401c93b4\n; > GJBaseGameLayer::playKeyframeAnimation @ 0x14031f410\n; > GJBaseGameLayer::getSavedPosition @ 0x140320892\n; > GJBaseGameLayer::getSavedPosition @ 0x140320960\n; > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321a59\n; > GJBaseGameLayer::triggerMoveCommand @ 0x140326740\n; > GJBaseGameLayer::triggerMoveCommand @ 0x140326772\n; > GJBaseGameLayer::triggerTransformCommand @ 0x1403272d6\n; > GJBaseGameLayer::updateGradientLayers @ 0x14032813f\n; > GJBaseGameLayer::updateGradientLayers @ 0x140328150\n; > GJBaseGameLayer::updateGradientLayers @ 0x140328161\n; > GJBaseGameLayer::updateGradientLayers @ 0x140328172\n; > GJBaseGameLayer::positionForShaderTarget @ 0x14032b232\n; > GJBaseGameLayer::speedForShaderTarget @ 0x14032b2f2\n; > GJBaseGameLayer::tryGetObject @ 0x14032c2d5\n; > GJBaseGameLayer::positionUIObjects @ 0x14032ef45\n; > GJBaseGameLayer::positionUIObjects @ 0x14032ef85\n; > GJBaseGameLayer::processAreaEffects @ 0x140331424\n; > GJBaseGameLayer::processRotationActions @ 0x1403345c9\n; > GJBaseGameLayer::processTransformActions @ 0x14033544a\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x140338273\n; > GJBaseGameLayer::processFollowActions @ 0x1403391b7\n; > GJBaseGameLayer::optimizeMoveGroups @ 0x140339d4b\n; > GJBaseGameLayer::updateCamera @ 0x140345d50\n; > GJBaseGameLayer::updateCamera @ 0x140345db7\n; > GJBaseGameLayer::updateCamera @ 0x140345e1a\n; > GJBaseGameLayer::updateCamera @ 0x140345e89\n; > GJBaseGameLayer::updateCamera @ 0x140345eed\n; > GJBaseGameLayer::updateCamera @ 0x140346f89\n; > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x140348d7d\n; > GJBaseGameLayer::spawnParticleTrigger @ 0x140349b83\n; > GJBaseGameLayer::volumeForProximityEffect @ 0x14034c8bf\n; > GJBaseGameLayer::visit @ 0x140351b0c\n; > GJBaseGameLayer::visit @ 0x140351b1d\n; > GJBaseGameLayer::visit @ 0x140351b2e\n; > GJBaseGameLayer::visit @ 0x140351b3f\n; > PlayLayer::activatePlatformerEndTrigger @ 0x14050ac80\n; > PlayLayer::processCheckpoints @ 0x140513a36\n; > <???> @ 0x1408b6058\n; > <???> @ 0x1408b606c\n; > <???> @ 0x14091f280\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:30:30 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14032c200\npush    rsi                                                            ; +0x5, 0x14032c205\nsub     rsp, 20h                                                       ; +0x6, 0x14032c206\nmovsxd  rbx, edx                                                       ; +0xa, 0x14032c20a\nmov     rsi, rcx                                                       ; +0xd, 0x14032c20d\ntest    edx, edx                                                       ; +0x10, 0x14032c210\njg      short loc_14032C221                                            ; +0x12, 0x14032c212\nxor     eax, eax                                                       ; +0x14, 0x14032c214\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x16, 0x14032c216\nadd     rsp, 20h                                                       ; +0x1b, 0x14032c21b\npop     rsi                                                            ; +0x1f, 0x14032c21f\nretn                                                                   ; +0x20, 0x14032c220\nmov     rcx, [rcx+0F80h]                                               ; +0x21, 0x14032c221\nmov     rdx, rbx                                                       ; +0x28, 0x14032c228\nmov     [rsp+28h+arg_0], rdi                                           ; +0x2b, 0x14032c22b\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x30, 0x14032c230\nmov     rdi, rax                                                       ; +0x36, 0x14032c236\ntest    rax, rax                                                       ; +0x39, 0x14032c239\njz      short loc_14032C25B                                            ; +0x3c, 0x14032c23c\nmov     rcx, rax                                                       ; +0x3e, 0x14032c23e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x41, 0x14032c241\ntest    eax, eax                                                       ; +0x47, 0x14032c247\njz      short loc_14032C25B                                            ; +0x49, 0x14032c249\nxor     edx, edx                                                       ; +0x4b, 0x14032c24b\nmov     rcx, rdi                                                       ; +0x4d, 0x14032c24d\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x50, 0x14032c250\ntest    rax, rax                                                       ; +0x56, 0x14032c256\njnz     short loc_14032C298                                            ; +0x59, 0x14032c259\nmov     edx, ebx                                                       ; +0x5b, 0x14032c25b\nmov     rcx, rsi                                                       ; +0x5d, 0x14032c25d\ncall    GJBaseGameLayer__getGroup                                      ; +0x60, 0x14032c260\nmov     rbx, rax                                                       ; +0x65, 0x14032c265\ntest    rax, rax                                                       ; +0x68, 0x14032c268\njz      short loc_14032C296                                            ; +0x6b, 0x14032c26b\nmov     rcx, rax                                                       ; +0x6d, 0x14032c26d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x70, 0x14032c270\ncmp     eax, 1                                                         ; +0x76, 0x14032c276\njnz     short loc_14032C296                                            ; +0x79, 0x14032c279\nxor     edx, edx                                                       ; +0x7b, 0x14032c27b\nmov     rcx, rbx                                                       ; +0x7d, 0x14032c27d\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x80, 0x14032c280\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x85, 0x14032c285\nadd     rsp, 20h                                                       ; +0x8a, 0x14032c28a\npop     rsi                                                            ; +0x8e, 0x14032c28e\njmp     cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x8f, 0x14032c28f\nxor     eax, eax                                                       ; +0x96, 0x14032c296\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x98, 0x14032c298\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x9d, 0x14032c29d\nadd     rsp, 20h                                                       ; +0xa2, 0x14032c2a2\npop     rsi                                                            ; +0xa6, 0x14032c2a6\nretn                                                                   ; +0xa7, 0x14032c2a7", "xrefs": ["EditorUI::findObject @ 0x1401c93b4", "GJBaseGameLayer::playKeyframeAnimation @ 0x14031f410", "GJBaseGameLayer::getSavedPosition @ 0x140320892", "GJBaseGameLayer::getSavedPosition @ 0x140320960", "GJBaseGameLayer::prepareSavePositionObjects @ 0x140321a59", "GJBaseGameLayer::triggerMoveCommand @ 0x140326740", "GJBaseGameLayer::triggerMoveCommand @ 0x140326772", "GJBaseGameLayer::triggerTransformCommand @ 0x1403272d6", "GJBaseGameLayer::updateGradientLayers @ 0x14032813f", "GJBaseGameLayer::updateGradientLayers @ 0x140328150", "GJBaseGameLayer::updateGradientLayers @ 0x140328161", "GJBaseGameLayer::updateGradientLayers @ 0x140328172", "GJBaseGameLayer::positionForShaderTarget @ 0x14032b232", "GJBaseGameLayer::speedForShaderTarget @ 0x14032b2f2", "GJBaseGameLayer::tryGetObject @ 0x14032c2d5", "GJBaseGameLayer::positionUIObjects @ 0x14032ef45", "GJBaseGameLayer::positionUIObjects @ 0x14032ef85", "GJBaseGameLayer::processAreaEffects @ 0x140331424", "GJBaseGameLayer::processRotationActions @ 0x1403345c9", "GJBaseGameLayer::processTransformActions @ 0x14033544a", "GJBaseGameLayer::processAdvancedFollowAction @ 0x140338273", "GJBaseGameLayer::processFollowActions @ 0x1403391b7", "GJBaseGameLayer::optimizeMoveGroups @ 0x140339d4b", "GJBaseGameLayer::updateCamera @ 0x140345d50", "GJBaseGameLayer::updateCamera @ 0x140345db7", "GJBaseGameLayer::updateCamera @ 0x140345e1a", "GJBaseGameLayer::updateCamera @ 0x140345e89", "GJBaseGameLayer::updateCamera @ 0x140345eed", "GJBaseGameLayer::updateCamera @ 0x140346f89", "GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x140348d7d", "GJBaseGameLayer::spawnParticleTrigger @ 0x140349b83", "GJBaseGameLayer::volumeForProximityEffect @ 0x14034c8bf", "GJBaseGameLayer::visit @ 0x140351b0c", "GJBaseGameLayer::visit @ 0x140351b1d", "GJBaseGameLayer::visit @ 0x140351b2e", "GJBaseGameLayer::visit @ 0x140351b3f", "PlayLayer::activatePlatformerEndTrigger @ 0x14050ac80", "PlayLayer::processCheckpoints @ 0x140513a36", "<???> @ 0x1408b6058", "<???> @ 0x1408b606c", "<???> @ 0x14091f280"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}