{"type": "func", "start": 4296189632, "end": 4296189796, "name": "GJBaseGameLayer::tryGetMainObject", "pseudocode": "// \n// GJBaseGameLayer::tryGetMainObject from 0x10012a6c0 to 0x10012a764 (164 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::activatePlatformerEndTrigger @ 0x1000b64c8\n// > PlayLayer::processCheckpoints @ 0x1000bacac\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 *__fastcall GJBaseGameLayer::tryGetMainObject(GJBaseGameLayer *a1, int a2)\n{\n  cocos2d::CCDictionary *m_parentGroupsDict; // rdi\n  GameObject *result; // rax\n  intptr_t v5; // r15\n  cocos2d::CCArray *v6; // r14\n\n  if ( a2 <= 0 )\n    return nullptr;\n  m_parentGroupsDict = a1->m_parentGroupsDict;\n  result = (GameObject *)cocos2d::CCDictionary::objectForKey(m_parentGroupsDict, (unsigned int)a2);\n  if ( result )\n    return result;\n  v5 = 9999;\n  if ( (unsigned int)a2 < 0x270F )\n    v5 = (unsigned int)a2;\n  if ( ((v6 = a1->m_groups.__begin_[v5]) != nullptr\n     || (v6 = (cocos2d::CCArray *)sub_10071F9E0(m_parentGroupsDict, (unsigned int)a2),\n         cocos2d::CCDictionary::setObject(a1->m_groupDict, v6, v5),\n         (a1->m_groups.__begin_[v5] = v6) != nullptr))\n    && (unsigned int)sub_100720070(v6) == 1 )\n  {\n    return (GameObject *)sub_1007200C0(v6, 0);\n  }\n  else\n  {\n    return nullptr;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::tryGetMainObject from 0x10012a6c0 to 0x10012a764 (164 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::activatePlatformerEndTrigger @ 0x1000b64c8\n; > PlayLayer::processCheckpoints @ 0x1000bacac\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    rbp                                                            ; +0x0, 0x10012a6c0\nmov     rbp, rsp                                                       ; +0x1, 0x10012a6c1\npush    r15                                                            ; +0x4, 0x10012a6c4\npush    r14                                                            ; +0x6, 0x10012a6c6\npush    rbx                                                            ; +0x8, 0x10012a6c8\npush    rax                                                            ; +0x9, 0x10012a6c9\ntest    esi, esi                                                       ; +0xa, 0x10012a6ca\njle     loc_10012A757                                                  ; +0xc, 0x10012a6cc\nmov     r14d, esi                                                      ; +0x12, 0x10012a6d2\nmov     rbx, rdi                                                       ; +0x15, 0x10012a6d5\nmov     rdi, [rdi+0E48h]                                               ; +0x18, 0x10012a6d8\nmov     esi, esi                                                       ; +0x1f, 0x10012a6df\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x21, 0x10012a6e1\ntest    rax, rax                                                       ; +0x26, 0x10012a6e6\njnz     short loc_10012A759                                            ; +0x29, 0x10012a6e9\ncmp     r14d, 270Fh                                                    ; +0x2b, 0x10012a6eb\nmov     r15d, 270Fh                                                    ; +0x32, 0x10012a6f2\ncmovb   r15d, r14d                                                     ; +0x38, 0x10012a6f8\nmov     rax, [rbx+0E00h]                                               ; +0x3c, 0x10012a6fc\nmov     r14, [rax+r15*8]                                               ; +0x43, 0x10012a703\ntest    r14, r14                                                       ; +0x47, 0x10012a707\njnz     short loc_10012A736                                            ; +0x4a, 0x10012a70a\ncall    sub_10071F9E0                                                  ; +0x4c, 0x10012a70c\nmov     r14, rax                                                       ; +0x51, 0x10012a711\nmov     rdi, [rbx+0DE8h]                                               ; +0x54, 0x10012a714\nmov     rsi, rax                                                       ; +0x5b, 0x10012a71b\nmov     rdx, r15                                                       ; +0x5e, 0x10012a71e\ncall    cocos2d__CCDictionary__setObject                               ; +0x61, 0x10012a721\nmov     rax, [rbx+0E00h]                                               ; +0x66, 0x10012a726\nmov     [rax+r15*8], r14                                               ; +0x6d, 0x10012a72d\ntest    r14, r14                                                       ; +0x71, 0x10012a731\njz      short loc_10012A757                                            ; +0x74, 0x10012a734\nmov     rdi, r14                                                       ; +0x76, 0x10012a736\ncall    sub_100720070                                                  ; +0x79, 0x10012a739\ncmp     eax, 1                                                         ; +0x7e, 0x10012a73e\njnz     short loc_10012A757                                            ; +0x81, 0x10012a741\nmov     rdi, r14                                                       ; +0x83, 0x10012a743\nxor     esi, esi                                                       ; +0x86, 0x10012a746\nadd     rsp, 8                                                         ; +0x88, 0x10012a748\npop     rbx                                                            ; +0x8c, 0x10012a74c\npop     r14                                                            ; +0x8d, 0x10012a74d\npop     r15                                                            ; +0x8f, 0x10012a74f\npop     rbp                                                            ; +0x91, 0x10012a751\njmp     sub_1007200C0                                                  ; +0x92, 0x10012a752\nxor     eax, eax                                                       ; +0x97, 0x10012a757\nadd     rsp, 8                                                         ; +0x99, 0x10012a759\npop     rbx                                                            ; +0x9d, 0x10012a75d\npop     r14                                                            ; +0x9e, 0x10012a75e\npop     r15                                                            ; +0xa0, 0x10012a760\npop     rbp                                                            ; +0xa2, 0x10012a762\nretn                                                                   ; +0xa3, 0x10012a763", "xrefs": ["PlayLayer::activatePlatformerEndTrigger @ 0x1000b64c8", "PlayLayer::processCheckpoints @ 0x1000bacac"], "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"}