{"type": "func", "start": 4297974896, "end": 4297975139, "name": "GJEffectManager::getColorSprite", "pseudocode": "// \n// GJEffectManager::getColorSprite from 0x1002de470 to 0x1002de563 (243 bytes)\n// \n// 21 xrefs:\n// > LevelEditorLayer::transferDefaultColors @ 0x1000eea75\n// > LevelEditorLayer::transferDefaultColors @ 0x1000eeaa8\n// > LevelEditorLayer::transferDefaultColors @ 0x1000eeadb\n// > LevelEditorLayer::transferDefaultColors @ 0x1000eeb0e\n// > GJBaseGameLayer::updateColor @ 0x10013c8c6\n// > GJEffectManager::getColorAction @ 0x1002de3d0\n// > GJEffectManager::activeColorForIndex @ 0x1002de440\n// > GJEffectManager::activeOpacityForIndex @ 0x1002de584\n// > GJEffectManager::processCopyColorPulseActions @ 0x1002ded48\n// > GJEffectManager::processCopyColorPulseActions @ 0x1002ded8a\n// > GJEffectManager::calculateInheritedColor @ 0x1002df185\n// > GJEffectManager::colorForPulseEffect @ 0x1002df48b\n// > GJEffectManager::setColorAction @ 0x1002df58a\n// > GJEffectManager::calculateLightBGColor @ 0x1002edbb5\n// > GJEffectManager::calculateLightBGColor @ 0x1002edced\n// > GJEffectManager::calculateLightBGColor @ 0x1002edd0f\n// > GJEffectManager::setupFromString @ 0x1002ee8a1\n// > GJEffectManager::loadFromState @ 0x1002ef0d8\n// > GameObject::saveActiveColors @ 0x1005c8c72\n// > GameObject::saveActiveColors @ 0x1005c8c8b\n// > GameObject::setupColorSprite @ 0x1005c8d73\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\nColorActionSprite *__fastcall GJEffectManager::getColorSprite(GJEffectManager *a1, int a2)\n{\n  int v2; // eax\n  intptr_t v3; // rbx\n  ColorActionSprite *v4; // r14\n\n  v2 = 0;\n  if ( a2 > 0 )\n    v2 = a2;\n  v3 = 1101;\n  if ( v2 < 1101 )\n    v3 = (unsigned int)v2;\n  v4 = a1->m_colorActionSpriteVector.__begin_[v3];\n  if ( !v4 )\n  {\n    v4 = (ColorActionSprite *)operator new(0x158u);\n    cocos2d::CCNode::CCNode((__int64)v4);\n    v4->__vftable = (ColorActionSprite_vtbl *)off_100909C18;\n    v4->m_opacity = 255.0;\n    v4->m_colorID = 0;\n    v4->m_colorAction = nullptr;\n    if ( cocos2d::CCNode::init(v4) )\n    {\n      *(_WORD *)&v4->m_copyColor.g = -1;\n      *(_QWORD *)&v4->m_opacity = -3162570752LL;\n      cocos2d::CCObject::autorelease(v4);\n    }\n    else\n    {\n      ((void (__fastcall *)(ColorActionSprite *))v4->~ColorActionSprite_0)(v4);\n      v4 = nullptr;\n    }\n    v4->m_colorID = v3;\n    ((void (__fastcall *)(GJEffectManager *, ColorActionSprite *))a1->addChild)(a1, v4);\n    a1->m_colorActionSpriteVector.__begin_[v3] = v4;\n    cocos2d::CCDictionary::setObject(a1->m_unkDict150, v4, v3);\n  }\n  return v4;\n}", "assembly": "; \n; GJEffectManager::getColorSprite from 0x1002de470 to 0x1002de563 (243 bytes)\n; \n; 21 xrefs:\n; > LevelEditorLayer::transferDefaultColors @ 0x1000eea75\n; > LevelEditorLayer::transferDefaultColors @ 0x1000eeaa8\n; > LevelEditorLayer::transferDefaultColors @ 0x1000eeadb\n; > LevelEditorLayer::transferDefaultColors @ 0x1000eeb0e\n; > GJBaseGameLayer::updateColor @ 0x10013c8c6\n; > GJEffectManager::getColorAction @ 0x1002de3d0\n; > GJEffectManager::activeColorForIndex @ 0x1002de440\n; > GJEffectManager::activeOpacityForIndex @ 0x1002de584\n; > GJEffectManager::processCopyColorPulseActions @ 0x1002ded48\n; > GJEffectManager::processCopyColorPulseActions @ 0x1002ded8a\n; > GJEffectManager::calculateInheritedColor @ 0x1002df185\n; > GJEffectManager::colorForPulseEffect @ 0x1002df48b\n; > GJEffectManager::setColorAction @ 0x1002df58a\n; > GJEffectManager::calculateLightBGColor @ 0x1002edbb5\n; > GJEffectManager::calculateLightBGColor @ 0x1002edced\n; > GJEffectManager::calculateLightBGColor @ 0x1002edd0f\n; > GJEffectManager::setupFromString @ 0x1002ee8a1\n; > GJEffectManager::loadFromState @ 0x1002ef0d8\n; > GameObject::saveActiveColors @ 0x1005c8c72\n; > GameObject::saveActiveColors @ 0x1005c8c8b\n; > GameObject::setupColorSprite @ 0x1005c8d73\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, 0x1002de470\nmov     rbp, rsp                                                       ; +0x1, 0x1002de471\npush    r15                                                            ; +0x4, 0x1002de474\npush    r14                                                            ; +0x6, 0x1002de476\npush    rbx                                                            ; +0x8, 0x1002de478\npush    rax                                                            ; +0x9, 0x1002de479\nxor     eax, eax                                                       ; +0xa, 0x1002de47a\ntest    esi, esi                                                       ; +0xc, 0x1002de47c\ncmovg   eax, esi                                                       ; +0xe, 0x1002de47e\ncmp     eax, 44Dh                                                      ; +0x11, 0x1002de481\nmov     ebx, 44Dh                                                      ; +0x16, 0x1002de486\ncmovl   ebx, eax                                                       ; +0x1b, 0x1002de48b\nmov     rax, [rdi+298h]                                                ; +0x1e, 0x1002de48e\nmov     r14, [rax+rbx*8]                                               ; +0x25, 0x1002de495\ntest    r14, r14                                                       ; +0x29, 0x1002de499\njnz     loc_1002DE555                                                  ; +0x2c, 0x1002de49c\nmov     r15, rdi                                                       ; +0x32, 0x1002de4a2\nmov     edi, 158h; __sz                                                ; +0x35, 0x1002de4a5\ncall    __Znwm; operator new(ulong)                                    ; +0x3a, 0x1002de4aa\nmov     r14, rax                                                       ; +0x3f, 0x1002de4af\nmov     rdi, rax                                                       ; +0x42, 0x1002de4b2\ncall    cocos2d__CCNode__CCNode                                        ; +0x45, 0x1002de4b5\nlea     rax, off_100909C18                                             ; +0x4a, 0x1002de4ba\nmov     [r14], rax                                                     ; +0x51, 0x1002de4c1\nmov     dword ptr [r14+13Ch], 437F0000h                                ; +0x54, 0x1002de4c4\nmov     dword ptr [r14+148h], 0                                        ; +0x5f, 0x1002de4cf\nmov     qword ptr [r14+150h], 0                                        ; +0x6a, 0x1002de4da\nmov     rdi, r14                                                       ; +0x75, 0x1002de4e5\ncall    cocos2d__CCNode__init                                          ; +0x78, 0x1002de4e8\ntest    al, al                                                         ; +0x7d, 0x1002de4ed\njz      short loc_1002DE516                                            ; +0x7f, 0x1002de4ef\nmov     word ptr [r14+144h], 0FFFFh                                    ; +0x81, 0x1002de4f1\nmov     rax, 0FFFFFFFF437F0000h                                        ; +0x8b, 0x1002de4fb\nmov     [r14+13Ch], rax                                                ; +0x95, 0x1002de505\nmov     rdi, r14                                                       ; +0x9c, 0x1002de50c\ncall    cocos2d__CCObject__autorelease                                 ; +0x9f, 0x1002de50f\njmp     short loc_1002DE522                                            ; +0xa4, 0x1002de514\nmov     rax, [r14]                                                     ; +0xa6, 0x1002de516\nmov     rdi, r14                                                       ; +0xa9, 0x1002de519\ncall    qword ptr [rax+10h]                                            ; +0xac, 0x1002de51c\nxor     r14d, r14d                                                     ; +0xaf, 0x1002de51f\nmov     [r14+148h], ebx                                                ; +0xb2, 0x1002de522\nmov     rax, [r15]                                                     ; +0xb9, 0x1002de529\nmov     rdi, r15                                                       ; +0xbc, 0x1002de52c\nmov     rsi, r14                                                       ; +0xbf, 0x1002de52f\ncall    qword ptr [rax+1B8h]                                           ; +0xc2, 0x1002de532\nmov     rax, [r15+298h]                                                ; +0xc8, 0x1002de538\nmov     [rax+rbx*8], r14                                               ; +0xcf, 0x1002de53f\nmov     rdi, [r15+150h]                                                ; +0xd3, 0x1002de543\nmov     rsi, r14                                                       ; +0xda, 0x1002de54a\nmov     rdx, rbx                                                       ; +0xdd, 0x1002de54d\ncall    cocos2d__CCDictionary__setObject                               ; +0xe0, 0x1002de550\nmov     rax, r14                                                       ; +0xe5, 0x1002de555\nadd     rsp, 8                                                         ; +0xe8, 0x1002de558\npop     rbx                                                            ; +0xec, 0x1002de55c\npop     r14                                                            ; +0xed, 0x1002de55d\npop     r15                                                            ; +0xef, 0x1002de55f\npop     rbp                                                            ; +0xf1, 0x1002de561\nretn                                                                   ; +0xf2, 0x1002de562", "xrefs": ["LevelEditorLayer::transferDefaultColors @ 0x1000eea75", "LevelEditorLayer::transferDefaultColors @ 0x1000eeaa8", "LevelEditorLayer::transferDefaultColors @ 0x1000eeadb", "LevelEditorLayer::transferDefaultColors @ 0x1000eeb0e", "GJBaseGameLayer::updateColor @ 0x10013c8c6", "GJEffectManager::getColorAction @ 0x1002de3d0", "GJEffectManager::activeColorForIndex @ 0x1002de440", "GJEffectManager::activeOpacityForIndex @ 0x1002de584", "GJEffectManager::processCopyColorPulseActions @ 0x1002ded48", "GJEffectManager::processCopyColorPulseActions @ 0x1002ded8a", "GJEffectManager::calculateInheritedColor @ 0x1002df185", "GJEffectManager::colorForPulseEffect @ 0x1002df48b", "GJEffectManager::setColorAction @ 0x1002df58a", "GJEffectManager::calculateLightBGColor @ 0x1002edbb5", "GJEffectManager::calculateLightBGColor @ 0x1002edced", "GJEffectManager::calculateLightBGColor @ 0x1002edd0f", "GJEffectManager::setupFromString @ 0x1002ee8a1", "GJEffectManager::loadFromState @ 0x1002ef0d8", "GameObject::saveActiveColors @ 0x1005c8c72", "GameObject::saveActiveColors @ 0x1005c8c8b", "GameObject::setupColorSprite @ 0x1005c8d73"], "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"}