{"type": "func", "start": 5371433008, "end": 5371433490, "name": "GameObject::addColorSpriteToParent", "pseudocode": "// \n// GameObject::addColorSpriteToParent from 0x140299030 to 0x140299212 (482 bytes)\n// \n// 7 xrefs:\n// > GameObject::activateObject @ 0x14028dd75\n// > LevelEditorLayer::updateVisibility @ 0x1403f67c8\n// > PlayLayer::updateVisibility @ 0x14050e7fc\n// > AnimatedGameObject::activateObject @ 0x1406458e3\n// > <???> @ 0x1408af530\n// > <???> @ 0x1408af56c\n// > <???> @ 0x14091d690\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\nvoid __fastcall GameObject::addColorSpriteToParent(__int64 a1, char a2)\n{\n  __int64 *v2; // rdi\n  char v5; // al\n  int v6; // ebp\n  char v7; // r15\n  __int64 v8; // rbx\n  __int64 *v9; // rdi\n  __int64 v10; // rbx\n  __int64 *v11; // rdi\n  __int64 v12; // rbx\n  __int64 *v13; // rdi\n  __int64 v14; // rbx\n  int ParentMode; // eax\n  unsigned __int8 v16; // r10\n  __int64 v17; // rbx\n  __int64 *v18; // rdi\n  __int64 v19; // rbx\n  __int64 v20; // rax\n\n  v2 = *(__int64 **)(a1 + 896);\n  if ( v2 && !*(_BYTE *)(a1 + 656) )\n  {\n    v5 = *(_BYTE *)(a1 + 893);\n    if ( *(_BYTE *)(a1 + 892) == v5 )\n    {\n      GameObject::addColorSpriteToSelf(a1);\n    }\n    else\n    {\n      v6 = *(_DWORD *)(a1 + 1132);\n      v7 = *(_BYTE *)(a1 + 874);\n      *(_BYTE *)(a1 + 874) = 0;\n      if ( !v6 )\n        v6 = *(_DWORD *)(a1 + 1124);\n      if ( v5 && *(_BYTE *)(a1 + 1061) )\n        ++v6;\n      v8 = *v2;\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 128LL))(a1);\n      (*(void (__fastcall **)(__int64 *))(v8 + 120))(v2);\n      v9 = *(__int64 **)(a1 + 896);\n      v10 = *v9;\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 144LL))(a1);\n      (*(void (__fastcall **)(__int64 *))(v10 + 136))(v9);\n      v11 = *(__int64 **)(a1 + 896);\n      v12 = *v11;\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 376LL))(a1);\n      (*(void (__fastcall **)(__int64 *))(v12 + 368))(v11);\n      v13 = *(__int64 **)(a1 + 896);\n      v14 = *v13;\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 392LL))(a1);\n      (*(void (__fastcall **)(__int64 *))(v14 + 384))(v13);\n      ParentMode = GameObject::getParentMode(a1);\n      v17 = GameObject::parentForZLayer(a1, v6, v16, ParentMode);\n      if ( (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 896) + 504LL))(*(_QWORD *)(a1 + 896)) == v17 )\n      {\n        if ( a2 )\n          (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v17 + 584LL))(v17, *(_QWORD *)(a1 + 896));\n      }\n      else\n      {\n        (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 896) + 520LL))(*(_QWORD *)(a1 + 896), 0);\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v17 + 456LL))(v17, *(_QWORD *)(a1 + 896));\n        if ( v7 )\n        {\n          v18 = *(__int64 **)(a1 + 896);\n          v19 = *v18;\n          v20 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1);\n          (*(void (__fastcall **)(__int64 *, __int64))(v19 + 184))(v18, v20);\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GameObject::addColorSpriteToParent from 0x140299030 to 0x140299212 (482 bytes)\n; \n; 7 xrefs:\n; > GameObject::activateObject @ 0x14028dd75\n; > LevelEditorLayer::updateVisibility @ 0x1403f67c8\n; > PlayLayer::updateVisibility @ 0x14050e7fc\n; > AnimatedGameObject::activateObject @ 0x1406458e3\n; > <???> @ 0x1408af530\n; > <???> @ 0x1408af56c\n; > <???> @ 0x14091d690\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; \npush    rsi                                                            ; +0x0, 0x140299030\npush    rdi                                                            ; +0x2, 0x140299032\npush    r14                                                            ; +0x3, 0x140299033\nsub     rsp, 20h                                                       ; +0x5, 0x140299035\nmov     rdi, [rcx+380h]                                                ; +0x9, 0x140299039\nmovzx   r14d, dl                                                       ; +0x10, 0x140299040\nmov     rsi, rcx                                                       ; +0x14, 0x140299044\ntest    rdi, rdi                                                       ; +0x17, 0x140299047\njz      loc_140299209                                                  ; +0x1a, 0x14029904a\ncmp     byte ptr [rcx+290h], 0                                         ; +0x20, 0x140299050\njnz     loc_140299209                                                  ; +0x27, 0x140299057\nmovzx   eax, byte ptr [rcx+37Dh]                                       ; +0x2d, 0x14029905d\ncmp     [rcx+37Ch], al                                                 ; +0x34, 0x140299064\njnz     short loc_140299079                                            ; +0x3a, 0x14029906a\nadd     rsp, 20h                                                       ; +0x3c, 0x14029906c\npop     r14                                                            ; +0x40, 0x140299070\npop     rdi                                                            ; +0x42, 0x140299072\npop     rsi                                                            ; +0x43, 0x140299073\njmp     GameObject__addColorSpriteToSelf                               ; +0x44, 0x140299074\nmov     [rsp+38h+arg_0], rbx                                           ; +0x49, 0x140299079\nmov     [rsp+38h+arg_8], rbp                                           ; +0x4e, 0x14029907e\nmov     ebp, [rcx+46Ch]                                                ; +0x53, 0x140299083\nmov     [rsp+38h+arg_10], r15                                          ; +0x59, 0x140299089\nmovzx   r15d, byte ptr [rcx+36Ah]                                      ; +0x5e, 0x14029908e\nmov     byte ptr [rcx+36Ah], 0                                         ; +0x66, 0x140299096\ntest    ebp, ebp                                                       ; +0x6d, 0x14029909d\njnz     short loc_1402990A7                                            ; +0x6f, 0x14029909f\nmov     ebp, [rcx+464h]                                                ; +0x71, 0x1402990a1\ntest    al, al                                                         ; +0x77, 0x1402990a7\njz      short loc_1402990B6                                            ; +0x79, 0x1402990a9\ncmp     byte ptr [rcx+425h], 0                                         ; +0x7b, 0x1402990ab\njz      short loc_1402990B6                                            ; +0x82, 0x1402990b2\ninc     ebp                                                            ; +0x84, 0x1402990b4\nmov     rax, [rcx]                                                     ; +0x86, 0x1402990b6\nmov     rbx, [rdi]                                                     ; +0x89, 0x1402990b9\ncall    qword ptr [rax+80h]                                            ; +0x8c, 0x1402990bc\nmovaps  xmm1, xmm0                                                     ; +0x92, 0x1402990c2\nmov     rcx, rdi                                                       ; +0x95, 0x1402990c5\ncall    qword ptr [rbx+78h]                                            ; +0x98, 0x1402990c8\nmov     rdi, [rsi+380h]                                                ; +0x9b, 0x1402990cb\nmov     rcx, rsi                                                       ; +0xa2, 0x1402990d2\nmov     rax, [rsi]                                                     ; +0xa5, 0x1402990d5\nmov     rbx, [rdi]                                                     ; +0xa8, 0x1402990d8\ncall    qword ptr [rax+90h]                                            ; +0xab, 0x1402990db\nmovaps  xmm1, xmm0                                                     ; +0xb1, 0x1402990e1\nmov     rcx, rdi                                                       ; +0xb4, 0x1402990e4\ncall    qword ptr [rbx+88h]                                            ; +0xb7, 0x1402990e7\nmov     rdi, [rsi+380h]                                                ; +0xbd, 0x1402990ed\nmov     rcx, rsi                                                       ; +0xc4, 0x1402990f4\nmov     rax, [rsi]                                                     ; +0xc7, 0x1402990f7\nmov     rbx, [rdi]                                                     ; +0xca, 0x1402990fa\ncall    qword ptr [rax+178h]                                           ; +0xcd, 0x1402990fd\nmovaps  xmm1, xmm0                                                     ; +0xd3, 0x140299103\nmov     rcx, rdi                                                       ; +0xd6, 0x140299106\ncall    qword ptr [rbx+170h]                                           ; +0xd9, 0x140299109\nmov     rdi, [rsi+380h]                                                ; +0xdf, 0x14029910f\nmov     rcx, rsi                                                       ; +0xe6, 0x140299116\nmov     rax, [rsi]                                                     ; +0xe9, 0x140299119\nmov     rbx, [rdi]                                                     ; +0xec, 0x14029911c\ncall    qword ptr [rax+188h]                                           ; +0xef, 0x14029911f\nmovaps  xmm1, xmm0                                                     ; +0xf5, 0x140299125\nmov     rcx, rdi                                                       ; +0xf8, 0x140299128\ncall    qword ptr [rbx+180h]                                           ; +0xfb, 0x14029912b\nmovzx   r10d, byte ptr [rsi+37Dh]                                      ; +0x101, 0x140299131\nmov     rcx, rsi                                                       ; +0x109, 0x140299139\ncall    GameObject__getParentMode                                      ; +0x10c, 0x14029913c\nmov     r9d, eax                                                       ; +0x111, 0x140299141\nmovzx   r8d, r10b                                                      ; +0x114, 0x140299144\nmov     edx, ebp                                                       ; +0x118, 0x140299148\nmov     rcx, rsi                                                       ; +0x11a, 0x14029914a\ncall    GameObject__parentForZLayer                                    ; +0x11d, 0x14029914d\nmov     rcx, [rsi+380h]                                                ; +0x122, 0x140299152\nmov     rbx, rax                                                       ; +0x129, 0x140299159\nmov     rdx, [rcx]                                                     ; +0x12c, 0x14029915c\ncall    qword ptr [rdx+1F8h]                                           ; +0x12f, 0x14029915f\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x135, 0x140299165\ncmp     rax, rbx                                                       ; +0x13a, 0x14029916a\njz      short loc_1402991D4                                            ; +0x13d, 0x14029916d\nmov     rcx, [rsi+380h]                                                ; +0x13f, 0x14029916f\nmov     rdx, [rcx]                                                     ; +0x146, 0x140299176\nmov     r8, [rdx+208h]                                                 ; +0x149, 0x140299179\nxor     edx, edx                                                       ; +0x150, 0x140299180\ncall    r8                                                             ; +0x152, 0x140299182\nmov     r8d, [rsi+470h]                                                ; +0x155, 0x140299185\ntest    r8d, r8d                                                       ; +0x15c, 0x14029918c\njnz     short loc_140299198                                            ; +0x15f, 0x14029918f\nmov     r8d, [rsi+420h]                                                ; +0x161, 0x140299191\nmov     rax, [rbx]                                                     ; +0x168, 0x140299198\nmov     rcx, rbx                                                       ; +0x16b, 0x14029919b\nmov     rdx, [rsi+380h]                                                ; +0x16e, 0x14029919e\ncall    qword ptr [rax+1C8h]                                           ; +0x175, 0x1402991a5\ntest    r15b, r15b                                                     ; +0x17b, 0x1402991ab\njz      short loc_1402991FF                                            ; +0x17e, 0x1402991ae\nmov     rdi, [rsi+380h]                                                ; +0x180, 0x1402991b0\nmov     rcx, rsi                                                       ; +0x187, 0x1402991b7\nmov     rax, [rsi]                                                     ; +0x18a, 0x1402991ba\nmov     rbx, [rdi]                                                     ; +0x18d, 0x1402991bd\ncall    qword ptr [rax+0C8h]                                           ; +0x190, 0x1402991c0\nmov     rdx, rax                                                       ; +0x196, 0x1402991c6\nmov     rcx, rdi                                                       ; +0x199, 0x1402991c9\ncall    qword ptr [rbx+0B8h]                                           ; +0x19c, 0x1402991cc\njmp     short loc_1402991FF                                            ; +0x1a2, 0x1402991d2\ntest    r14b, r14b                                                     ; +0x1a4, 0x1402991d4\njz      short loc_1402991FF                                            ; +0x1a7, 0x1402991d7\nmov     r8d, [rsi+470h]                                                ; +0x1a9, 0x1402991d9\ntest    r8d, r8d                                                       ; +0x1b0, 0x1402991e0\njnz     short loc_1402991EC                                            ; +0x1b3, 0x1402991e3\nmov     r8d, [rsi+420h]                                                ; +0x1b5, 0x1402991e5\nmov     rax, [rbx]                                                     ; +0x1bc, 0x1402991ec\nmov     rcx, rbx                                                       ; +0x1bf, 0x1402991ef\nmov     rdx, [rsi+380h]                                                ; +0x1c2, 0x1402991f2\ncall    qword ptr [rax+248h]                                           ; +0x1c9, 0x1402991f9\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x1cf, 0x1402991ff\nmov     r15, [rsp+38h+arg_10]                                          ; +0x1d4, 0x140299204\nadd     rsp, 20h                                                       ; +0x1d9, 0x140299209\npop     r14                                                            ; +0x1dd, 0x14029920d\npop     rdi                                                            ; +0x1df, 0x14029920f\npop     rsi                                                            ; +0x1e0, 0x140299210\nretn                                                                   ; +0x1e1, 0x140299211", "xrefs": ["GameObject::activateObject @ 0x14028dd75", "LevelEditorLayer::updateVisibility @ 0x1403f67c8", "PlayLayer::updateVisibility @ 0x14050e7fc", "AnimatedGameObject::activateObject @ 0x1406458e3", "<???> @ 0x1408af530", "<???> @ 0x1408af56c", "<???> @ 0x14091d690"], "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"}