{"type": "func", "start": 5371432784, "end": 5371433004, "name": "GameObject::parentForZLayer", "pseudocode": "// \n// GameObject::parentForZLayer from 0x140298f50 to 0x14029902c (220 bytes)\n// \n// 9 xrefs:\n// > GameObject::activateObject @ 0x14028dd49\n// > GameObject::claimParticle @ 0x140295e8c\n// > GameObject::addMainSpriteToParent @ 0x140298e92\n// > GameObject::addColorSpriteToParent @ 0x14029914d\n// > GameObject::playDestroyObjectAnim @ 0x1402a826f\n// > ParticleGameObject::addMainSpriteToParent @ 0x140641cf4\n// > AnimatedGameObject::activateObject @ 0x1406458bc\n// > <???> @ 0x14091d678\n// > <???> @ 0x14091d684\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:29:11 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall GameObject::parentForZLayer(__int64 a1, int a2, unsigned __int8 a3, int a4)\n{\n  bool v8; // zf\n  __int64 v9; // rcx\n  __int64 v10; // rcx\n  void *v12; // [rsp+40h] [rbp+8h]\n  void *v13; // [rsp+40h] [rbp+8h]\n\n  v8 = *(_BYTE *)(a1 + 653) == 0;\n  v9 = qword_14090BFD0;\n  if ( v8 )\n  {\n    if ( !qword_14090BFD0 )\n    {\n      v13 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v13);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v9 = qword_14090BFD0;\n    }\n    v10 = *(_QWORD *)(v9 + 560);\n  }\n  else\n  {\n    if ( !qword_14090BFD0 )\n    {\n      v12 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v9 = qword_14090BFD0;\n    }\n    v10 = *(_QWORD *)(v9 + 568);\n  }\n  return GJBaseGameLayer::parentForZLayer(v10, a2, a3, a4, *(unsigned __int8 *)(a1 + 1353));\n}", "assembly": "; \n; GameObject::parentForZLayer from 0x140298f50 to 0x14029902c (220 bytes)\n; \n; 9 xrefs:\n; > GameObject::activateObject @ 0x14028dd49\n; > GameObject::claimParticle @ 0x140295e8c\n; > GameObject::addMainSpriteToParent @ 0x140298e92\n; > GameObject::addColorSpriteToParent @ 0x14029914d\n; > GameObject::playDestroyObjectAnim @ 0x1402a826f\n; > ParticleGameObject::addMainSpriteToParent @ 0x140641cf4\n; > AnimatedGameObject::activateObject @ 0x1406458bc\n; > <???> @ 0x14091d678\n; > <???> @ 0x14091d684\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:29:11 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140298f50\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140298f55\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140298f5a\npush    rdi                                                            ; +0xf, 0x140298f5f\nsub     rsp, 30h                                                       ; +0x10, 0x140298f60\nmov     edi, r9d                                                       ; +0x14, 0x140298f64\nmovzx   esi, r8b                                                       ; +0x17, 0x140298f67\nmov     ebp, edx                                                       ; +0x1b, 0x140298f6b\nmov     rbx, rcx                                                       ; +0x1d, 0x140298f6d\ncmp     byte ptr [rcx+28Dh], 0                                         ; +0x20, 0x140298f70\nmov     rcx, cs:qword_14090BFD0                                        ; +0x27, 0x140298f77\njz      short loc_140298FC0                                            ; +0x2e, 0x140298f7e\ntest    rcx, rcx                                                       ; +0x30, 0x140298f80\njnz     short loc_140298FB7                                            ; +0x33, 0x140298f83\nmov     ecx, 6E8h; Size                                                ; +0x35, 0x140298f85\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3a, 0x140298f8a\nmov     [rsp+38h+arg_0], rax                                           ; +0x3f, 0x140298f8f\nmov     rcx, rax                                                       ; +0x44, 0x140298f94\ncall    GameManager__GameManager                                       ; +0x47, 0x140298f97\nnop                                                                    ; +0x4c, 0x140298f9c\nmov     cs:qword_14090BFD0, rax                                        ; +0x4d, 0x140298f9d\nmov     rcx, [rax]                                                     ; +0x54, 0x140298fa4\nmov     rdx, [rcx+48h]                                                 ; +0x57, 0x140298fa7\nmov     rcx, rax                                                       ; +0x5b, 0x140298fab\ncall    rdx                                                            ; +0x5e, 0x140298fae\nmov     rcx, cs:qword_14090BFD0                                        ; +0x60, 0x140298fb0\nmov     rcx, [rcx+238h]                                                ; +0x67, 0x140298fb7\njmp     short loc_140298FFE                                            ; +0x6e, 0x140298fbe\ntest    rcx, rcx                                                       ; +0x70, 0x140298fc0\njnz     short loc_140298FF7                                            ; +0x73, 0x140298fc3\nmov     ecx, 6E8h; Size                                                ; +0x75, 0x140298fc5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x7a, 0x140298fca\nmov     [rsp+38h+arg_0], rax                                           ; +0x7f, 0x140298fcf\nmov     rcx, rax                                                       ; +0x84, 0x140298fd4\ncall    GameManager__GameManager                                       ; +0x87, 0x140298fd7\nnop                                                                    ; +0x8c, 0x140298fdc\nmov     cs:qword_14090BFD0, rax                                        ; +0x8d, 0x140298fdd\nmov     rcx, [rax]                                                     ; +0x94, 0x140298fe4\nmov     rdx, [rcx+48h]                                                 ; +0x97, 0x140298fe7\nmov     rcx, rax                                                       ; +0x9b, 0x140298feb\ncall    rdx                                                            ; +0x9e, 0x140298fee\nmov     rcx, cs:qword_14090BFD0                                        ; +0xa0, 0x140298ff0\nmov     rcx, [rcx+230h]                                                ; +0xa7, 0x140298ff7\nmovzx   eax, byte ptr [rbx+549h]                                       ; +0xae, 0x140298ffe\nmov     [rsp+38h+var_18], eax                                          ; +0xb5, 0x140299005\nmov     r9d, edi                                                       ; +0xb9, 0x140299009\nmovzx   r8d, sil                                                       ; +0xbc, 0x14029900c\nmov     edx, ebp                                                       ; +0xc0, 0x140299010\ncall    GJBaseGameLayer__parentForZLayer                               ; +0xc2, 0x140299012\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xc7, 0x140299017\nmov     rbp, [rsp+38h+arg_10]                                          ; +0xcc, 0x14029901c\nmov     rsi, [rsp+38h+arg_18]                                          ; +0xd1, 0x140299021\nadd     rsp, 30h                                                       ; +0xd6, 0x140299026\npop     rdi                                                            ; +0xda, 0x14029902a\nretn                                                                   ; +0xdb, 0x14029902b", "xrefs": ["GameObject::activateObject @ 0x14028dd49", "GameObject::claimParticle @ 0x140295e8c", "GameObject::addMainSpriteToParent @ 0x140298e92", "GameObject::addColorSpriteToParent @ 0x14029914d", "GameObject::playDestroyObjectAnim @ 0x1402a826f", "ParticleGameObject::addMainSpriteToParent @ 0x140641cf4", "AnimatedGameObject::activateObject @ 0x1406458bc", "<???> @ 0x14091d678", "<???> @ 0x14091d684"], "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"}