{"type": "func", "start": 4297445060, "end": 4297445300, "name": "GameObject::addColorSpriteToSelf", "pseudocode": "// \n// GameObject::addColorSpriteToSelf from 0x10025cec4 to 0x10025cfb4 (240 bytes)\n// \n// 2 xrefs:\n// > GameObject::addColorSpriteToParent @ 0x1002563a4\n// > EditorUI::spriteFromObjectString @ 0x1003eab84\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 v2; // x2\n  double *v3; // x0\n  __n128 v4; // q0\n  cocos2d::CCSprite *m_colorSprite; // x19\n  __n128 v6; // q1\n  int v7; // [xsp+0h] [xbp-20h] BYREF\n  __int64 v8; // [xsp+8h] [xbp-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    if ( a1->m_colorZLayerRelated )\n      v2 = 100;\n    else\n      v2 = 4294967196LL;\n    ((void (__fastcall *)(GameObject *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, a1->m_colorSprite, v2);\n    ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_colorSprite->setScale)(a1->m_colorSprite, 1.0);\n    ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_colorSprite->setRotation)(a1->m_colorSprite, 0.0);\n    v3 = (double *)((__int64 (__fastcall *)(GameObject *))a1->getContentSize)(a1);\n    v4.n128_f64[0] = sub_100022AFC(&v8, v3);\n    m_colorSprite = a1->m_colorSprite;\n    v4.n128_f32[0] = *(float *)&v8 * 0.5;\n    v6.n128_f32[0] = *((float *)&v8 + 1) * 0.5;\n    sub_100022980(v4, v6, &v7);\n    ((void (__fastcall *)(cocos2d::CCSprite *, int *))m_colorSprite->setPosition)(m_colorSprite, &v7);\n  }\n}", "assembly": "; \n; GameObject::addColorSpriteToSelf from 0x10025cec4 to 0x10025cfb4 (240 bytes)\n; \n; 2 xrefs:\n; > GameObject::addColorSpriteToParent @ 0x1002563a4\n; > EditorUI::spriteFromObjectString @ 0x1003eab84\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\nSUB             SP, SP, #0x30                                          ; +0x0, 0x10025cec4\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x10025cec8\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x10025cecc\nADD             X29, SP, #0x20                                         ; +0xc, 0x10025ced0\nMOV             X19, X0                                                ; +0x10, 0x10025ced4\nLDR             X0, [X0,#0x378]                                        ; +0x14, 0x10025ced8\nLDR             X8, [X0]                                               ; +0x18, 0x10025cedc\nLDR             X8, [X8,#0x1F0]                                        ; +0x1c, 0x10025cee0\nBLR             X8                                                     ; +0x20, 0x10025cee4\nCMP             X0, X19                                                ; +0x24, 0x10025cee8\nB.EQ            loc_10025CFA4                                          ; +0x28, 0x10025ceec\nMOV             W8, #1                                                 ; +0x2c, 0x10025cef0\nSTRB            W8, [X19,#0x362]                                       ; +0x30, 0x10025cef4\nLDR             X0, [X19,#0x378]                                       ; +0x34, 0x10025cef8\nLDR             X8, [X0]                                               ; +0x38, 0x10025cefc\nLDR             X8, [X8,#0x200]                                        ; +0x3c, 0x10025cf00\nMOV             W1, #0                                                 ; +0x40, 0x10025cf04\nBLR             X8                                                     ; +0x44, 0x10025cf08\nLDR             X1, [X19,#0x378]                                       ; +0x48, 0x10025cf0c\nLDRB            W8, [X19,#0x41D]                                       ; +0x4c, 0x10025cf10\nCMP             W8, #0                                                 ; +0x50, 0x10025cf14\nMOV             W8, #0x64 ; 'd'                                        ; +0x54, 0x10025cf18\nCNEG            W2, W8, EQ                                             ; +0x58, 0x10025cf1c\nLDR             X8, [X19]                                              ; +0x5c, 0x10025cf20\nLDR             X8, [X8,#0x1C0]                                        ; +0x60, 0x10025cf24\nMOV             X0, X19                                                ; +0x64, 0x10025cf28\nBLR             X8                                                     ; +0x68, 0x10025cf2c\nLDR             X0, [X19,#0x378]                                       ; +0x6c, 0x10025cf30\nLDR             X8, [X0]                                               ; +0x70, 0x10025cf34\nLDR             X8, [X8,#0xA0]                                         ; +0x74, 0x10025cf38\nFMOV            S0, #1.0                                               ; +0x78, 0x10025cf3c\nBLR             X8                                                     ; +0x7c, 0x10025cf40\nLDR             X0, [X19,#0x378]                                       ; +0x80, 0x10025cf44\nLDR             X8, [X0]                                               ; +0x84, 0x10025cf48\nLDR             X8, [X8,#0x158]                                        ; +0x88, 0x10025cf4c\nFMOV            S0, WZR                                                ; +0x8c, 0x10025cf50\nBLR             X8                                                     ; +0x90, 0x10025cf54\nLDR             X8, [X19]                                              ; +0x94, 0x10025cf58\nLDR             X8, [X8,#0x138]                                        ; +0x98, 0x10025cf5c\nMOV             X0, X19                                                ; +0x9c, 0x10025cf60\nBLR             X8                                                     ; +0xa0, 0x10025cf64\nMOV             X1, X0                                                 ; +0xa4, 0x10025cf68\nADD             X0, SP, #0x20+var_18                                   ; +0xa8, 0x10025cf6c\nBL              sub_100022AFC                                          ; +0xac, 0x10025cf70\nLDR             X19, [X19,#0x378]                                      ; +0xb0, 0x10025cf74\nFMOV            S1, #0.5                                               ; +0xb4, 0x10025cf78\nLDP             S0, S2, [SP,#0x20+var_18]                              ; +0xb8, 0x10025cf7c\nFMUL            S0, S0, S1                                             ; +0xbc, 0x10025cf80\nFMUL            S1, S2, S1                                             ; +0xc0, 0x10025cf84\nMOV             X0, SP                                                 ; +0xc4, 0x10025cf88\nBL              sub_100022980                                          ; +0xc8, 0x10025cf8c\nLDR             X8, [X19]                                              ; +0xcc, 0x10025cf90\nLDR             X8, [X8,#0xB8]                                         ; +0xd0, 0x10025cf94\nMOV             X1, SP                                                 ; +0xd4, 0x10025cf98\nMOV             X0, X19                                                ; +0xd8, 0x10025cf9c\nBLR             X8                                                     ; +0xdc, 0x10025cfa0\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xe0, 0x10025cfa4\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xe4, 0x10025cfa8\nADD             SP, SP, #0x30 ; '0'                                    ; +0xe8, 0x10025cfac\nRET                                                                    ; +0xec, 0x10025cfb0", "xrefs": ["GameObject::addColorSpriteToParent @ 0x1002563a4", "EditorUI::spriteFromObjectString @ 0x1003eab84"], "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"}