{"type": "func", "start": 4300988288, "end": 4300988523, "name": "GameObject::addColorSpriteToSelf", "pseudocode": "// \n// GameObject::addColorSpriteToSelf from 0x1005bdf80 to 0x1005be06b (235 bytes)\n// \n// 2 xrefs:\n// > EditorUI::spriteFromObjectString @ 0x1000344b4\n// > GameObject::addColorSpriteToParent @ 0x1005aa0bf\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 GameObject::addColorSpriteToSelf(GameObject *a1)\n{\n  __int64 v1; // rdx\n  _QWORD *v2; // rax\n  cocos2d::CCSprite *m_colorSprite; // rbx\n  float v4; // [rsp+0h] [rbp-20h] BYREF\n  __int64 v5; // [rsp+8h] [rbp-18h] BYREF\n\n  if ( (GameObject *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_colorSprite->getParent)(a1->m_colorSprite) != a1 )\n  {\n    a1->m_colorSpriteLocked = 1;\n    ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_colorSprite->removeFromParentAndCleanup)(\n      a1->m_colorSprite,\n      0);\n    v1 = 4294967196LL;\n    if ( a1->m_colorZLayerRelated )\n      v1 = 100;\n    ((void (__fastcall *)(GameObject *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, a1->m_colorSprite, v1);\n    ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_colorSprite->setScale)(a1->m_colorSprite, 1.0);\n    ((void (__fastcall *)(cocos2d::CCSprite *, double))a1->m_colorSprite->setRotation)(a1->m_colorSprite, 0.0);\n    v2 = (_QWORD *)((__int64 (__fastcall *)(GameObject *))a1->getContentSize)(a1);\n    sub_10028CFC0(&v5, v2);\n    m_colorSprite = a1->m_colorSprite;\n    sub_10028CBE0(&v4, *(float *)&v5 * 0.5, 0.5 * *((float *)&v5 + 1));\n    ((void (__fastcall *)(cocos2d::CCSprite *, float *))m_colorSprite->setPosition)(m_colorSprite, &v4);\n  }\n}", "assembly": "; \n; GameObject::addColorSpriteToSelf from 0x1005bdf80 to 0x1005be06b (235 bytes)\n; \n; 2 xrefs:\n; > EditorUI::spriteFromObjectString @ 0x1000344b4\n; > GameObject::addColorSpriteToParent @ 0x1005aa0bf\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, 0x1005bdf80\nmov     rbp, rsp                                                       ; +0x1, 0x1005bdf81\npush    r14                                                            ; +0x4, 0x1005bdf84\npush    rbx                                                            ; +0x6, 0x1005bdf86\nsub     rsp, 10h                                                       ; +0x7, 0x1005bdf87\nmov     rbx, rdi                                                       ; +0xb, 0x1005bdf8b\nmov     rdi, [rdi+378h]                                                ; +0xe, 0x1005bdf8e\nmov     rax, [rdi]                                                     ; +0x15, 0x1005bdf95\ncall    qword ptr [rax+1F0h]                                           ; +0x18, 0x1005bdf98\ncmp     rax, rbx                                                       ; +0x1e, 0x1005bdf9e\njz      loc_1005BE062                                                  ; +0x21, 0x1005bdfa1\nmov     byte ptr [rbx+362h], 1                                         ; +0x27, 0x1005bdfa7\nmov     rdi, [rbx+378h]                                                ; +0x2e, 0x1005bdfae\nmov     rax, [rdi]                                                     ; +0x35, 0x1005bdfb5\nxor     esi, esi                                                       ; +0x38, 0x1005bdfb8\ncall    qword ptr [rax+200h]                                           ; +0x3a, 0x1005bdfba\nmov     rsi, [rbx+378h]                                                ; +0x40, 0x1005bdfc0\ncmp     byte ptr [rbx+41Dh], 0                                         ; +0x47, 0x1005bdfc7\nmov     eax, 64h ; 'd'                                                 ; +0x4e, 0x1005bdfce\nmov     edx, 0FFFFFF9Ch                                                ; +0x53, 0x1005bdfd3\ncmovnz  edx, eax                                                       ; +0x58, 0x1005bdfd8\nmov     rax, [rbx]                                                     ; +0x5b, 0x1005bdfdb\nmov     rdi, rbx                                                       ; +0x5e, 0x1005bdfde\ncall    qword ptr [rax+1C0h]                                           ; +0x61, 0x1005bdfe1\nmov     rdi, [rbx+378h]                                                ; +0x67, 0x1005bdfe7\nmov     rax, [rdi]                                                     ; +0x6e, 0x1005bdfee\nmovss   xmm0, cs:alpha                                                 ; +0x71, 0x1005bdff1\ncall    qword ptr [rax+0A0h]                                           ; +0x79, 0x1005bdff9\nmov     rdi, [rbx+378h]                                                ; +0x7f, 0x1005bdfff\nmov     rax, [rdi]                                                     ; +0x86, 0x1005be006\nxorps   xmm0, xmm0                                                     ; +0x89, 0x1005be009\ncall    qword ptr [rax+158h]                                           ; +0x8c, 0x1005be00c\nmov     rax, [rbx]                                                     ; +0x92, 0x1005be012\nmov     rdi, rbx                                                       ; +0x95, 0x1005be015\ncall    qword ptr [rax+138h]                                           ; +0x98, 0x1005be018\nlea     rdi, [rbp+var_18]                                              ; +0x9e, 0x1005be01e\nmov     rsi, rax                                                       ; +0xa2, 0x1005be022\ncall    sub_10028CFC0                                                  ; +0xa5, 0x1005be025\nmov     rbx, [rbx+378h]                                                ; +0xaa, 0x1005be02a\nmovss   xmm1, cs:dword_100814FA8                                       ; +0xb1, 0x1005be031\nmovss   xmm0, [rbp+var_18]                                             ; +0xb9, 0x1005be039\nmulss   xmm0, xmm1                                                     ; +0xbe, 0x1005be03e\nmulss   xmm1, [rbp+var_14]                                             ; +0xc2, 0x1005be042\nlea     r14, [rbp+var_20]                                              ; +0xc7, 0x1005be047\nmov     rdi, r14                                                       ; +0xcb, 0x1005be04b\ncall    sub_10028CBE0                                                  ; +0xce, 0x1005be04e\nmov     rax, [rbx]                                                     ; +0xd3, 0x1005be053\nmov     rdi, rbx                                                       ; +0xd6, 0x1005be056\nmov     rsi, r14                                                       ; +0xd9, 0x1005be059\ncall    qword ptr [rax+0B8h]                                           ; +0xdc, 0x1005be05c\nadd     rsp, 10h                                                       ; +0xe2, 0x1005be062\npop     rbx                                                            ; +0xe6, 0x1005be066\npop     r14                                                            ; +0xe7, 0x1005be067\npop     rbp                                                            ; +0xe9, 0x1005be069\nretn                                                                   ; +0xea, 0x1005be06a", "xrefs": ["EditorUI::spriteFromObjectString @ 0x1000344b4", "GameObject::addColorSpriteToParent @ 0x1005aa0bf"], "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"}