{"type": "func", "start": 4296100800, "end": 4296100940, "name": "GJBaseGameLayer::asyncMGLoaded", "pseudocode": "// \n// GJBaseGameLayer::asyncMGLoaded from 0x100114bc0 to 0x100114c4c (140 bytes)\n// \n// 1 xrefs:\n// > GameManager::finishedLoadingMGAsync @ 0x100383755\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\nvoid __fastcall GJBaseGameLayer::asyncMGLoaded(GJBaseGameLayer *a1, int a2)\n{\n  GJMGLayer *m_middleground; // rdi\n  unsigned int v4; // r15d\n  GJMGLayer *v5; // rax\n\n  m_middleground = a1->m_middleground;\n  if ( m_middleground )\n  {\n    ((void (__fastcall *)(GJMGLayer *))m_middleground->removeFromParent)(m_middleground);\n    a1->m_middleground = nullptr;\n  }\n  if ( a2 > 0 )\n  {\n    v4 = 3;\n    if ( (unsigned int)a2 < 3 )\n      v4 = a2;\n    v5 = GJMGLayer::create(v4);\n    a1->m_middleground = v5;\n    ((void (__fastcall *)(GJMGLayer *, _QWORD))v5->setTag)(v5, v4);\n    ((void (__fastcall *)(cocos2d::CCNode *, GJMGLayer *, __int64))a1->m_objectParent->addChild_0)(\n      a1->m_objectParent,\n      a1->m_middleground,\n      4294967257LL);\n  }\n  GJBaseGameLayer::updateLevelColors(a1);\n}", "assembly": "; \n; GJBaseGameLayer::asyncMGLoaded from 0x100114bc0 to 0x100114c4c (140 bytes)\n; \n; 1 xrefs:\n; > GameManager::finishedLoadingMGAsync @ 0x100383755\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, 0x100114bc0\nmov     rbp, rsp                                                       ; +0x1, 0x100114bc1\npush    r15                                                            ; +0x4, 0x100114bc4\npush    r14                                                            ; +0x6, 0x100114bc6\npush    rbx                                                            ; +0x8, 0x100114bc8\npush    rax                                                            ; +0x9, 0x100114bc9\nmov     r14d, esi                                                      ; +0xa, 0x100114bca\nmov     rbx, rdi                                                       ; +0xd, 0x100114bcd\nmov     rdi, [rdi+0EF0h]                                               ; +0x10, 0x100114bd0\ntest    rdi, rdi                                                       ; +0x17, 0x100114bd7\njz      short loc_100114BF0                                            ; +0x1a, 0x100114bda\nmov     rax, [rdi]                                                     ; +0x1c, 0x100114bdc\ncall    qword ptr [rax+1F8h]                                           ; +0x1f, 0x100114bdf\nmov     qword ptr [rbx+0EF0h], 0                                       ; +0x25, 0x100114be5\ntest    r14d, r14d                                                     ; +0x30, 0x100114bf0\njle     short loc_100114C3A                                            ; +0x33, 0x100114bf3\ncmp     r14d, 3                                                        ; +0x35, 0x100114bf5\nmov     r15d, 3                                                        ; +0x39, 0x100114bf9\ncmovb   r15d, r14d                                                     ; +0x3f, 0x100114bff\nmov     edi, r15d                                                      ; +0x43, 0x100114c03\ncall    GJMGLayer__create                                              ; +0x46, 0x100114c06\nmov     [rbx+0EF0h], rax                                               ; +0x4b, 0x100114c0b\nmov     rcx, [rax]                                                     ; +0x52, 0x100114c12\nmov     rdi, rax                                                       ; +0x55, 0x100114c15\nmov     esi, r15d                                                      ; +0x58, 0x100114c18\ncall    qword ptr [rcx+48h]                                            ; +0x5b, 0x100114c1b\nmov     rdi, [rbx+0EA0h]                                               ; +0x5e, 0x100114c1e\nmov     rsi, [rbx+0EF0h]                                               ; +0x65, 0x100114c25\nmov     rax, [rdi]                                                     ; +0x6c, 0x100114c2c\nmov     edx, 0FFFFFFD9h                                                ; +0x6f, 0x100114c2f\ncall    qword ptr [rax+1C0h]                                           ; +0x74, 0x100114c34\nmov     rdi, rbx                                                       ; +0x7a, 0x100114c3a\nadd     rsp, 8                                                         ; +0x7d, 0x100114c3d\npop     rbx                                                            ; +0x81, 0x100114c41\npop     r14                                                            ; +0x82, 0x100114c42\npop     r15                                                            ; +0x84, 0x100114c44\npop     rbp                                                            ; +0x86, 0x100114c46\njmp     GJBaseGameLayer__updateLevelColors                             ; +0x87, 0x100114c47", "xrefs": ["GameManager::finishedLoadingMGAsync @ 0x100383755"], "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"}