{"type": "func", "start": 6442778864, "end": 6442779171, "name": "cocos2d::CCLayerColor::initWithColor", "pseudocode": "// \n// cocos2d::CCLayerColor::initWithColor from 0x1800500f0 to 0x180050223 (307 bytes)\n// \n// 6 xrefs:\n// > <???> @ 0x1800edce8\n// > <???> @ 0x1800ee250\n// > <???> @ 0x1801382d0\n// > <???> @ 0x1801382e0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b1f50\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\nchar __fastcall cocos2d::CCLayerColor::initWithColor(\n        cocos2d::CCLayerColor *this,\n        const struct cocos2d::_ccColor4B *a2,\n        float a3,\n        float a4)\n{\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCLayerColor_vtbl *v7; // rbx\n  struct cocos2d::CCSize WinSize; // rax\n  GLubyte r; // al\n  GLubyte g; // al\n  GLubyte b; // al\n  GLubyte a; // al\n  cocos2d::CCLayerColor_vtbl *v13; // rbx\n  float *v14; // rax\n  cocos2d::CCLayerColor_vtbl *v15; // rbx\n  cocos2d::CCShaderCache *v16; // rax\n  struct cocos2d::CCGLProgram *v17; // rax\n  float v19[4]; // [rsp+20h] [rbp-38h] BYREF\n\n  v6 = cocos2d::CCDirector::sharedDirector();\n  if ( v6 )\n  {\n    v7 = this->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    WinSize = cocos2d::CCDirector::getWinSize(v6);\n    ((void (__fastcall *)(cocos2d::CCLayerColor *, struct cocos2d::CCSize))v7->setContentSize)(this, WinSize);\n    *(_WORD *)&this->m_bTouchEnabled = 0;\n    this->m_tBlendFunc.src = 770;\n    this->m_tBlendFunc.dst = 771;\n    r = a2->r;\n    this->_realColor.r = a2->r;\n    this->_displayedColor.r = r;\n    g = a2->g;\n    this->_realColor.g = g;\n    this->_displayedColor.g = g;\n    b = a2->b;\n    this->_realColor.b = b;\n    this->_displayedColor.b = b;\n    a = a2->a;\n    this->_realOpacity = a;\n    this->_displayedOpacity = a;\n    this->m_pSquareVertices[0] = 0;\n    this->m_pSquareVertices[1] = 0;\n    this->m_pSquareVertices[2] = 0;\n    this->m_pSquareVertices[3] = 0;\n    ((void (__fastcall *)(cocos2d::CCLayerColor *))this->updateColor)(this);\n    v13 = this->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v14 = kmVec2Fill(v19, a3, a4);\n    ((void (__fastcall *)(cocos2d::CCLayerColor *, float *))v13->setContentSize)(this, v14);\n    v15 = this->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v16 = cocos2d::CCShaderCache::sharedShaderCache();\n    v17 = cocos2d::CCShaderCache::programForKey(v16, \"ShaderPositionColor\");\n    ((void (__fastcall *)(cocos2d::CCLayerColor *, struct cocos2d::CCGLProgram *))v15->setShaderProgram)(this, v17);\n  }\n  return 1;\n}", "assembly": "; \n; cocos2d::CCLayerColor::initWithColor from 0x1800500f0 to 0x180050223 (307 bytes)\n; \n; 6 xrefs:\n; > <???> @ 0x1800edce8\n; > <???> @ 0x1800ee250\n; > <???> @ 0x1801382d0\n; > <???> @ 0x1801382e0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b1f50\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\nmov     [rsp+arg_8], rsi                                               ; +0x0, 0x1800500f0\npush    rdi                                                            ; +0x5, 0x1800500f5\nsub     rsp, 50h                                                       ; +0x6, 0x1800500f6\nmovaps  [rsp+58h+var_18], xmm6                                         ; +0xa, 0x1800500fa\nmov     rsi, rdx                                                       ; +0xf, 0x1800500ff\nmovaps  [rsp+58h+var_28], xmm7                                         ; +0x12, 0x180050102\nmovaps  xmm6, xmm3                                                     ; +0x17, 0x180050107\nmovaps  xmm7, xmm2                                                     ; +0x1a, 0x18005010a\nmov     rdi, rcx                                                       ; +0x1d, 0x18005010d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x20, 0x180050110\ntest    rax, rax                                                       ; +0x25, 0x180050115\njz      loc_18005020C                                                  ; +0x28, 0x180050118\nmov     [rsp+58h+arg_0], rbx                                           ; +0x2e, 0x18005011e\nlea     rdx, [rsp+58h+var_38]                                          ; +0x33, 0x180050123\nmov     rbx, [rdi]                                                     ; +0x38, 0x180050128\nmov     rcx, rax                                                       ; +0x3b, 0x18005012b\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x3e, 0x18005012e\nmov     rdx, rax                                                       ; +0x43, 0x180050133\nmov     rcx, rdi                                                       ; +0x46, 0x180050136\ncall    qword ptr [rbx+128h]                                           ; +0x49, 0x180050139\nmov     word ptr [rdi+168h], 0                                         ; +0x4f, 0x18005013f\nmov     rcx, rdi                                                       ; +0x58, 0x180050148\nmov     dword ptr [rdi+218h], 302h                                     ; +0x5b, 0x18005014b\nmov     dword ptr [rdi+21Ch], 303h                                     ; +0x65, 0x180050155\nmovzx   eax, byte ptr [rsi]                                            ; +0x6f, 0x18005015f\nmov     [rdi+1A5h], al                                                 ; +0x72, 0x180050162\nmov     [rdi+1A2h], al                                                 ; +0x78, 0x180050168\nmovzx   eax, byte ptr [rsi+1]                                          ; +0x7e, 0x18005016e\nmov     [rdi+1A6h], al                                                 ; +0x82, 0x180050172\nmov     [rdi+1A3h], al                                                 ; +0x88, 0x180050178\nmovzx   eax, byte ptr [rsi+2]                                          ; +0x8e, 0x18005017e\nmov     [rdi+1A7h], al                                                 ; +0x92, 0x180050182\nmov     [rdi+1A4h], al                                                 ; +0x98, 0x180050188\nmovzx   eax, byte ptr [rsi+3]                                          ; +0x9e, 0x18005018e\nmov     [rdi+1A1h], al                                                 ; +0xa2, 0x180050192\nmov     [rdi+1A0h], al                                                 ; +0xa8, 0x180050198\nxor     eax, eax                                                       ; +0xae, 0x18005019e\nmov     [rdi+1B8h], rax                                                ; +0xb0, 0x1800501a0\nmov     [rdi+1C0h], rax                                                ; +0xb7, 0x1800501a7\nmov     [rdi+1C8h], rax                                                ; +0xbe, 0x1800501ae\nmov     [rdi+1D0h], rax                                                ; +0xc5, 0x1800501b5\nmov     rax, [rdi]                                                     ; +0xcc, 0x1800501bc\ncall    qword ptr [rax+408h]                                           ; +0xcf, 0x1800501bf\nmov     rbx, [rdi]                                                     ; +0xd5, 0x1800501c5\nlea     rcx, [rsp+58h+var_38]                                          ; +0xd8, 0x1800501c8\nmovaps  xmm2, xmm6                                                     ; +0xdd, 0x1800501cd\nmovaps  xmm1, xmm7                                                     ; +0xe0, 0x1800501d0\ncall    kmVec2Fill                                                     ; +0xe3, 0x1800501d3\nmov     rdx, rax                                                       ; +0xe8, 0x1800501d8\nmov     rcx, rdi                                                       ; +0xeb, 0x1800501db\ncall    qword ptr [rbx+128h]                                           ; +0xee, 0x1800501de\nmov     rbx, [rdi]                                                     ; +0xf4, 0x1800501e4\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0xf7, 0x1800501e7\nmov     rcx, rax; this                                                 ; +0xfc, 0x1800501ec\nlea     rdx, aShaderposition_1; \"ShaderPositionColor\"                  ; +0xff, 0x1800501ef\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x106, 0x1800501f6\nmov     rdx, rax                                                       ; +0x10b, 0x1800501fb\nmov     rcx, rdi                                                       ; +0x10e, 0x1800501fe\ncall    qword ptr [rbx+280h]                                           ; +0x111, 0x180050201\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x117, 0x180050207\nmov     rsi, [rsp+58h+arg_8]                                           ; +0x11c, 0x18005020c\nmov     al, 1                                                          ; +0x121, 0x180050211\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x123, 0x180050213\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0x128, 0x180050218\nadd     rsp, 50h                                                       ; +0x12d, 0x18005021d\npop     rdi                                                            ; +0x131, 0x180050221\nretn                                                                   ; +0x132, 0x180050222", "xrefs": ["<???> @ 0x1800edce8", "<???> @ 0x1800ee250", "<???> @ 0x1801382d0", "<???> @ 0x1801382e0", "<???> @ 0x1801438a8", "<???> @ 0x1801b1f50"], "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"}