{"type": "func", "start": 5370396384, "end": 5370396598, "name": "GameObject::parentForZLayer", "pseudocode": "// \n// GameObject::parentForZLayer from 0x14019bee0 to 0x14019bfb6 (214 bytes)\n// \n// 8 xrefs:\n// > GameObject::activateObject @ 0x140190b55\n// > GameObject::claimParticle @ 0x140198dd5\n// > GameObject::addMainSpriteToParent @ 0x14019be1a\n// > GameObject::addColorSpriteToParent @ 0x14019c0f0\n// > GameObject::playDestroyObjectAnim @ 0x1401aaff4\n// > ParticleGameObject::addMainSpriteToParent @ 0x14049ff84\n// > AnimatedGameObject::activateObject @ 0x1404a3b8c\n// > <???> @ 0x1406cbd0c\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\ncocos2d::CCNode *GameObject::parentForZLayer(GameObject *a1, int a2, bool a3, int a4)\n{\n  bool v8; // zf\n  __int64 v9; // rcx\n  GJBaseGameLayer *v10; // rcx\n  void *v12; // [rsp+40h] [rbp+8h]\n  void *v13; // [rsp+40h] [rbp+8h]\n\n  v8 = !a1->m_editorEnabled;\n  v9 = qword_1406C2ED8;\n  if ( v8 )\n  {\n    if ( !qword_1406C2ED8 )\n    {\n      v13 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v13);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v9 = qword_1406C2ED8;\n    }\n    v10 = *(GJBaseGameLayer **)(v9 + 520);\n  }\n  else\n  {\n    if ( !qword_1406C2ED8 )\n    {\n      v12 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v9 = qword_1406C2ED8;\n    }\n    v10 = *(GJBaseGameLayer **)(v9 + 528);\n  }\n  return GJBaseGameLayer::parentForZLayer(v10, a2, a3, a4, a1->m_isUIObject);\n}", "assembly": "; \n; GameObject::parentForZLayer from 0x14019bee0 to 0x14019bfb6 (214 bytes)\n; \n; 8 xrefs:\n; > GameObject::activateObject @ 0x140190b55\n; > GameObject::claimParticle @ 0x140198dd5\n; > GameObject::addMainSpriteToParent @ 0x14019be1a\n; > GameObject::addColorSpriteToParent @ 0x14019c0f0\n; > GameObject::playDestroyObjectAnim @ 0x1401aaff4\n; > ParticleGameObject::addMainSpriteToParent @ 0x14049ff84\n; > AnimatedGameObject::activateObject @ 0x1404a3b8c\n; > <???> @ 0x1406cbd0c\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14019bee0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14019bee5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14019beea\npush    rdi                                                            ; +0xf, 0x14019beef\nsub     rsp, 30h                                                       ; +0x10, 0x14019bef0\nmov     edi, r9d                                                       ; +0x14, 0x14019bef4\nmovzx   esi, r8b                                                       ; +0x17, 0x14019bef7\nmov     ebp, edx                                                       ; +0x1b, 0x14019befb\nmov     rbx, rcx                                                       ; +0x1d, 0x14019befd\ncmp     byte ptr [rcx+28Dh], 0                                         ; +0x20, 0x14019bf00\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x27, 0x14019bf07\njz      short loc_14019BF4D                                            ; +0x2e, 0x14019bf0e\ntest    rcx, rcx                                                       ; +0x30, 0x14019bf10\njnz     short loc_14019BF44                                            ; +0x33, 0x14019bf13\nmov     ecx, 668h; Size                                                ; +0x35, 0x14019bf15\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3a, 0x14019bf1a\nmov     [rsp+38h+arg_0], rax                                           ; +0x3f, 0x14019bf1f\nmov     rcx, rax                                                       ; +0x44, 0x14019bf24\ncall    sub_14017AB00                                                  ; +0x47, 0x14019bf27\nnop                                                                    ; +0x4c, 0x14019bf2c\nmov     cs:qword_1406C2ED8, rax                                        ; +0x4d, 0x14019bf2d\nmov     rdx, [rax]                                                     ; +0x54, 0x14019bf34\nmov     rcx, rax                                                       ; +0x57, 0x14019bf37\ncall    qword ptr [rdx+48h]                                            ; +0x5a, 0x14019bf3a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x5d, 0x14019bf3d\nmov     rcx, [rcx+210h]                                                ; +0x64, 0x14019bf44\njmp     short loc_14019BF88                                            ; +0x6b, 0x14019bf4b\ntest    rcx, rcx                                                       ; +0x6d, 0x14019bf4d\njnz     short loc_14019BF81                                            ; +0x70, 0x14019bf50\nmov     ecx, 668h; Size                                                ; +0x72, 0x14019bf52\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x77, 0x14019bf57\nmov     [rsp+38h+arg_0], rax                                           ; +0x7c, 0x14019bf5c\nmov     rcx, rax                                                       ; +0x81, 0x14019bf61\ncall    sub_14017AB00                                                  ; +0x84, 0x14019bf64\nnop                                                                    ; +0x89, 0x14019bf69\nmov     cs:qword_1406C2ED8, rax                                        ; +0x8a, 0x14019bf6a\nmov     rdx, [rax]                                                     ; +0x91, 0x14019bf71\nmov     rcx, rax                                                       ; +0x94, 0x14019bf74\ncall    qword ptr [rdx+48h]                                            ; +0x97, 0x14019bf77\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x9a, 0x14019bf7a\nmov     rcx, [rcx+208h]                                                ; +0xa1, 0x14019bf81\nmovzx   eax, byte ptr [rbx+549h]                                       ; +0xa8, 0x14019bf88\nmov     [rsp+38h+var_18], eax                                          ; +0xaf, 0x14019bf8f\nmov     r9d, edi                                                       ; +0xb3, 0x14019bf93\nmovzx   r8d, sil                                                       ; +0xb6, 0x14019bf96\nmov     edx, ebp                                                       ; +0xba, 0x14019bf9a\ncall    GJBaseGameLayer__parentForZLayer                               ; +0xbc, 0x14019bf9c\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xc1, 0x14019bfa1\nmov     rbp, [rsp+38h+arg_10]                                          ; +0xc6, 0x14019bfa6\nmov     rsi, [rsp+38h+arg_18]                                          ; +0xcb, 0x14019bfab\nadd     rsp, 30h                                                       ; +0xd0, 0x14019bfb0\npop     rdi                                                            ; +0xd4, 0x14019bfb4\nretn                                                                   ; +0xd5, 0x14019bfb5", "xrefs": ["GameObject::activateObject @ 0x140190b55", "GameObject::claimParticle @ 0x140198dd5", "GameObject::addMainSpriteToParent @ 0x14019be1a", "GameObject::addColorSpriteToParent @ 0x14019c0f0", "GameObject::playDestroyObjectAnim @ 0x1401aaff4", "ParticleGameObject::addMainSpriteToParent @ 0x14049ff84", "AnimatedGameObject::activateObject @ 0x1404a3b8c", "<???> @ 0x1406cbd0c"], "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"}