{"type": "func", "start": 5371432480, "end": 5371432784, "name": "GameObject::addMainSpriteToParent", "pseudocode": "// \n// GameObject::addMainSpriteToParent from 0x140298e20 to 0x140298f50 (304 bytes)\n// \n// 48 xrefs:\n// > ParticleGameObject::addMainSpriteToParent @ 0x140641cc0\n// > LabelGameObject::addMainSpriteToParent @ 0x140655149\n// > <???> @ 0x140754ad0\n// > <???> @ 0x140755250\n// > <???> @ 0x14075e618\n// > <???> @ 0x14075ed20\n// > <???> @ 0x1407d4c30\n// > <???> @ 0x14081f858\n// > <???> @ 0x1408200a0\n// > <???> @ 0x1408207f8\n// > <???> @ 0x140820eb0\n// > <???> @ 0x140821618\n// > <???> @ 0x140821cd0\n// > <???> @ 0x1408223b0\n// > <???> @ 0x140822a68\n// > <???> @ 0x140823378\n// > <???> @ 0x140823ac0\n// > <???> @ 0x140824178\n// > <???> @ 0x140824970\n// > <???> @ 0x140825028\n// > <???> @ 0x1408256e0\n// > <???> @ 0x140825f50\n// > <???> @ 0x140826748\n// > <???> @ 0x140826ef0\n// > <???> @ 0x140827620\n// > <???> @ 0x140827cd8\n// > <???> @ 0x140828430\n// > <???> @ 0x140828c78\n// > <???> @ 0x140829330\n// > <???> @ 0x140829ab0\n// > <???> @ 0x14082a230\n// > <???> @ 0x14082a8e8\n// > <???> @ 0x14082afa0\n// > <???> @ 0x14082b9b0\n// > <???> @ 0x14082c0e0\n// > <???> @ 0x14082c798\n// > <???> @ 0x14082ce50\n// > <???> @ 0x14082d508\n// > <???> @ 0x14082dcd8\n// > <???> @ 0x14082eb38\n// > <???> @ 0x14082f1f0\n// > <???> @ 0x14082f8a8\n// > <???> @ 0x14082ff60\n// > <???> @ 0x140830618\n// > <???> @ 0x140830cd0\n// > <???> @ 0x1408314f0\n// > <???> @ 0x140831c70\n// > <???> @ 0x14091d678\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\nchar __fastcall GameObject::addMainSpriteToParent(_BYTE *a1, char a2)\n{\n  unsigned int ParentMode; // eax\n  unsigned __int8 v5; // r10\n  unsigned int v6; // r11d\n  __int64 v7; // rdi\n  char v8; // cl\n  char result; // al\n\n  GameObject::updateBlendMode((__int64)a1);\n  ParentMode = GameObject::getParentMode((__int64)a1);\n  v7 = GameObject::parentForZLayer(a1, v6, v5, ParentMode);\n  if ( (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 504LL))(a1) == v7 )\n  {\n    if ( a2 )\n      (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 584LL))(v7, a1);\n  }\n  else\n  {\n    (*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 520LL))(a1, 0);\n    (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v7 + 456LL))(v7, a1);\n  }\n  v8 = a1[1120];\n  result = a1[892] || a1[893];\n  a1[1120] = result;\n  if ( result != v8 )\n    return (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1488LL))(a1);\n  return result;\n}", "assembly": "; \n; GameObject::addMainSpriteToParent from 0x140298e20 to 0x140298f50 (304 bytes)\n; \n; 48 xrefs:\n; > ParticleGameObject::addMainSpriteToParent @ 0x140641cc0\n; > LabelGameObject::addMainSpriteToParent @ 0x140655149\n; > <???> @ 0x140754ad0\n; > <???> @ 0x140755250\n; > <???> @ 0x14075e618\n; > <???> @ 0x14075ed20\n; > <???> @ 0x1407d4c30\n; > <???> @ 0x14081f858\n; > <???> @ 0x1408200a0\n; > <???> @ 0x1408207f8\n; > <???> @ 0x140820eb0\n; > <???> @ 0x140821618\n; > <???> @ 0x140821cd0\n; > <???> @ 0x1408223b0\n; > <???> @ 0x140822a68\n; > <???> @ 0x140823378\n; > <???> @ 0x140823ac0\n; > <???> @ 0x140824178\n; > <???> @ 0x140824970\n; > <???> @ 0x140825028\n; > <???> @ 0x1408256e0\n; > <???> @ 0x140825f50\n; > <???> @ 0x140826748\n; > <???> @ 0x140826ef0\n; > <???> @ 0x140827620\n; > <???> @ 0x140827cd8\n; > <???> @ 0x140828430\n; > <???> @ 0x140828c78\n; > <???> @ 0x140829330\n; > <???> @ 0x140829ab0\n; > <???> @ 0x14082a230\n; > <???> @ 0x14082a8e8\n; > <???> @ 0x14082afa0\n; > <???> @ 0x14082b9b0\n; > <???> @ 0x14082c0e0\n; > <???> @ 0x14082c798\n; > <???> @ 0x14082ce50\n; > <???> @ 0x14082d508\n; > <???> @ 0x14082dcd8\n; > <???> @ 0x14082eb38\n; > <???> @ 0x14082f1f0\n; > <???> @ 0x14082f8a8\n; > <???> @ 0x14082ff60\n; > <???> @ 0x140830618\n; > <???> @ 0x140830cd0\n; > <???> @ 0x1408314f0\n; > <???> @ 0x140831c70\n; > <???> @ 0x14091d678\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_0], rbx                                               ; +0x0, 0x140298e20\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x140298e25\npush    rdi                                                            ; +0xa, 0x140298e2a\nsub     rsp, 20h                                                       ; +0xb, 0x140298e2b\nmovzx   esi, dl                                                        ; +0xf, 0x140298e2f\nmov     rbx, rcx                                                       ; +0x12, 0x140298e32\ncall    GameObject__updateBlendMode                                    ; +0x15, 0x140298e35\nmov     r11d, [rbx+46Ch]                                               ; +0x1a, 0x140298e3a\ntest    r11d, r11d                                                     ; +0x21, 0x140298e41\njnz     short loc_140298E4D                                            ; +0x24, 0x140298e44\nmov     r11d, [rbx+464h]                                               ; +0x26, 0x140298e46\ncmp     byte ptr [rbx+37Ch], 0                                         ; +0x2d, 0x140298e4d\njz      short loc_140298E75                                            ; +0x34, 0x140298e54\ncmp     qword ptr [rbx+380h], 0                                        ; +0x36, 0x140298e56\njz      short loc_140298E75                                            ; +0x3e, 0x140298e5e\ncmp     byte ptr [rbx+37Dh], 0                                         ; +0x40, 0x140298e60\njnz     short loc_140298E75                                            ; +0x47, 0x140298e67\ncmp     byte ptr [rbx+425h], 0                                         ; +0x49, 0x140298e69\njnz     short loc_140298E75                                            ; +0x50, 0x140298e70\ninc     r11d                                                           ; +0x52, 0x140298e72\nmovzx   r10d, byte ptr [rbx+37Ch]                                      ; +0x55, 0x140298e75\nmov     rcx, rbx                                                       ; +0x5d, 0x140298e7d\ncall    GameObject__getParentMode                                      ; +0x60, 0x140298e80\nmov     r9d, eax                                                       ; +0x65, 0x140298e85\nmovzx   r8d, r10b                                                      ; +0x68, 0x140298e88\nmov     edx, r11d                                                      ; +0x6c, 0x140298e8c\nmov     rcx, rbx                                                       ; +0x6f, 0x140298e8f\ncall    GameObject__parentForZLayer                                    ; +0x72, 0x140298e92\nmov     rcx, [rbx]                                                     ; +0x77, 0x140298e97\nmov     rdi, rax                                                       ; +0x7a, 0x140298e9a\nmov     rdx, [rcx+1F8h]                                                ; +0x7d, 0x140298e9d\nmov     rcx, rbx                                                       ; +0x84, 0x140298ea4\ncall    rdx                                                            ; +0x87, 0x140298ea7\ncmp     rax, rdi                                                       ; +0x89, 0x140298ea9\njz      short loc_140298EE4                                            ; +0x8c, 0x140298eac\nmov     rcx, [rbx]                                                     ; +0x8e, 0x140298eae\nxor     edx, edx                                                       ; +0x91, 0x140298eb1\nmov     r8, [rcx+208h]                                                 ; +0x93, 0x140298eb3\nmov     rcx, rbx                                                       ; +0x9a, 0x140298eba\ncall    r8                                                             ; +0x9d, 0x140298ebd\nmov     r8d, [rbx+470h]                                                ; +0xa0, 0x140298ec0\ntest    r8d, r8d                                                       ; +0xa7, 0x140298ec7\njnz     short loc_140298ED3                                            ; +0xaa, 0x140298eca\nmov     r8d, [rbx+420h]                                                ; +0xac, 0x140298ecc\nmov     rax, [rdi]                                                     ; +0xb3, 0x140298ed3\nmov     rdx, rbx                                                       ; +0xb6, 0x140298ed6\nmov     rcx, rdi                                                       ; +0xb9, 0x140298ed9\ncall    qword ptr [rax+1C8h]                                           ; +0xbc, 0x140298edc\njmp     short loc_140298F0B                                            ; +0xc2, 0x140298ee2\ntest    sil, sil                                                       ; +0xc4, 0x140298ee4\njz      short loc_140298F0B                                            ; +0xc7, 0x140298ee7\nmov     r8d, [rbx+470h]                                                ; +0xc9, 0x140298ee9\ntest    r8d, r8d                                                       ; +0xd0, 0x140298ef0\njnz     short loc_140298EFC                                            ; +0xd3, 0x140298ef3\nmov     r8d, [rbx+420h]                                                ; +0xd5, 0x140298ef5\nmov     rax, [rdi]                                                     ; +0xdc, 0x140298efc\nmov     rdx, rbx                                                       ; +0xdf, 0x140298eff\nmov     rcx, rdi                                                       ; +0xe2, 0x140298f02\ncall    qword ptr [rax+248h]                                           ; +0xe5, 0x140298f05\ncmp     byte ptr [rbx+37Ch], 0                                         ; +0xeb, 0x140298f0b\nmovzx   ecx, byte ptr [rbx+460h]                                       ; +0xf2, 0x140298f12\njnz     short loc_140298F28                                            ; +0xf9, 0x140298f19\ncmp     byte ptr [rbx+37Dh], 0                                         ; +0xfb, 0x140298f1b\njnz     short loc_140298F28                                            ; +0x102, 0x140298f22\nxor     al, al                                                         ; +0x104, 0x140298f24\njmp     short loc_140298F2A                                            ; +0x106, 0x140298f26\nmov     al, 1                                                          ; +0x108, 0x140298f28\nmov     [rbx+460h], al                                                 ; +0x10a, 0x140298f2a\ncmp     al, cl                                                         ; +0x110, 0x140298f30\njz      short loc_140298F40                                            ; +0x112, 0x140298f32\nmov     rax, [rbx]                                                     ; +0x114, 0x140298f34\nmov     rcx, rbx                                                       ; +0x117, 0x140298f37\ncall    qword ptr [rax+5D0h]                                           ; +0x11a, 0x140298f3a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x120, 0x140298f40\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x125, 0x140298f45\nadd     rsp, 20h                                                       ; +0x12a, 0x140298f4a\npop     rdi                                                            ; +0x12e, 0x140298f4e\nretn                                                                   ; +0x12f, 0x140298f4f", "xrefs": ["ParticleGameObject::addMainSpriteToParent @ 0x140641cc0", "LabelGameObject::addMainSpriteToParent @ 0x140655149", "<???> @ 0x140754ad0", "<???> @ 0x140755250", "<???> @ 0x14075e618", "<???> @ 0x14075ed20", "<???> @ 0x1407d4c30", "<???> @ 0x14081f858", "<???> @ 0x1408200a0", "<???> @ 0x1408207f8", "<???> @ 0x140820eb0", "<???> @ 0x140821618", "<???> @ 0x140821cd0", "<???> @ 0x1408223b0", "<???> @ 0x140822a68", "<???> @ 0x140823378", "<???> @ 0x140823ac0", "<???> @ 0x140824178", "<???> @ 0x140824970", "<???> @ 0x140825028", "<???> @ 0x1408256e0", "<???> @ 0x140825f50", "<???> @ 0x140826748", "<???> @ 0x140826ef0", "<???> @ 0x140827620", "<???> @ 0x140827cd8", "<???> @ 0x140828430", "<???> @ 0x140828c78", "<???> @ 0x140829330", "<???> @ 0x140829ab0", "<???> @ 0x14082a230", "<???> @ 0x14082a8e8", "<???> @ 0x14082afa0", "<???> @ 0x14082b9b0", "<???> @ 0x14082c0e0", "<???> @ 0x14082c798", "<???> @ 0x14082ce50", "<???> @ 0x14082d508", "<???> @ 0x14082dcd8", "<???> @ 0x14082eb38", "<???> @ 0x14082f1f0", "<???> @ 0x14082f8a8", "<???> @ 0x14082ff60", "<???> @ 0x140830618", "<???> @ 0x140830cd0", "<???> @ 0x1408314f0", "<???> @ 0x140831c70", "<???> @ 0x14091d678"], "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"}