{"type": "func", "start": 6442786576, "end": 6442786883, "name": "cocos2d::CCLayerColor::initWithColor", "pseudocode": "// \n// cocos2d::CCLayerColor::initWithColor from 0x180051f10 to 0x180052043 (307 bytes)\n// \n// 6 xrefs:\n// > <???> @ 0x1800f3e88\n// > <???> @ 0x1800f4410\n// > <???> @ 0x1801414f8\n// > <???> @ 0x180141508\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bc1e4\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:21:45 +0000\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  struct cocos2d::CCDirector *v6; // rax\n  __int64 v7; // rbx\n  __int64 v8; // rax\n  char v9; // al\n  char v10; // al\n  char v11; // al\n  char v12; // al\n  __int64 v13; // rbx\n  float *v14; // rax\n  __int64 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 = *(_QWORD *)this;\n    cocos2d::CCDirector::getWinSize(v6, v19);\n    (*(void (__fastcall **)(cocos2d::CCLayerColor *, __int64))(v7 + 312))(this, v8);\n    *((_WORD *)this + 180) = 0;\n    *((_DWORD *)this + 134) = 770;\n    *((_DWORD *)this + 135) = 771;\n    v9 = *(_BYTE *)a2;\n    *((_BYTE *)this + 421) = *(_BYTE *)a2;\n    *((_BYTE *)this + 418) = v9;\n    v10 = *((_BYTE *)a2 + 1);\n    *((_BYTE *)this + 422) = v10;\n    *((_BYTE *)this + 419) = v10;\n    v11 = *((_BYTE *)a2 + 2);\n    *((_BYTE *)this + 423) = v11;\n    *((_BYTE *)this + 420) = v11;\n    v12 = *((_BYTE *)a2 + 3);\n    *((_BYTE *)this + 417) = v12;\n    *((_BYTE *)this + 416) = v12;\n    *((_QWORD *)this + 55) = 0;\n    *((_QWORD *)this + 56) = 0;\n    *((_QWORD *)this + 57) = 0;\n    *((_QWORD *)this + 58) = 0;\n    (*(void (__fastcall **)(cocos2d::CCLayerColor *))(*(_QWORD *)this + 1048LL))(this);\n    v13 = *(_QWORD *)this;\n    v14 = kmVec2Fill(v19, a3, a4);\n    (*(void (__fastcall **)(cocos2d::CCLayerColor *, float *))(v13 + 312))(this, v14);\n    v15 = *(_QWORD *)this;\n    v16 = cocos2d::CCShaderCache::sharedShaderCache();\n    v17 = cocos2d::CCShaderCache::programForKey(v16, \"ShaderPositionColor\");\n    (*(void (__fastcall **)(cocos2d::CCLayerColor *, struct cocos2d::CCGLProgram *))(v15 + 656))(this, v17);\n  }\n  return 1;\n}", "assembly": "; \n; cocos2d::CCLayerColor::initWithColor from 0x180051f10 to 0x180052043 (307 bytes)\n; \n; 6 xrefs:\n; > <???> @ 0x1800f3e88\n; > <???> @ 0x1800f4410\n; > <???> @ 0x1801414f8\n; > <???> @ 0x180141508\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bc1e4\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:21:45 +0000\n; \nmov     [rsp+arg_8], rsi                                               ; +0x0, 0x180051f10\npush    rdi                                                            ; +0x5, 0x180051f15\nsub     rsp, 50h                                                       ; +0x6, 0x180051f16\nmovaps  [rsp+58h+var_18], xmm6                                         ; +0xa, 0x180051f1a\nmov     rsi, rdx                                                       ; +0xf, 0x180051f1f\nmovaps  [rsp+58h+var_28], xmm7                                         ; +0x12, 0x180051f22\nmovaps  xmm6, xmm3                                                     ; +0x17, 0x180051f27\nmovaps  xmm7, xmm2                                                     ; +0x1a, 0x180051f2a\nmov     rdi, rcx                                                       ; +0x1d, 0x180051f2d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x20, 0x180051f30\ntest    rax, rax                                                       ; +0x25, 0x180051f35\njz      loc_18005202C                                                  ; +0x28, 0x180051f38\nmov     [rsp+58h+arg_0], rbx                                           ; +0x2e, 0x180051f3e\nlea     rdx, [rsp+58h+var_38]                                          ; +0x33, 0x180051f43\nmov     rbx, [rdi]                                                     ; +0x38, 0x180051f48\nmov     rcx, rax                                                       ; +0x3b, 0x180051f4b\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x3e, 0x180051f4e\nmov     rdx, rax                                                       ; +0x43, 0x180051f53\nmov     rcx, rdi                                                       ; +0x46, 0x180051f56\ncall    qword ptr [rbx+138h]                                           ; +0x49, 0x180051f59\nmov     word ptr [rdi+168h], 0                                         ; +0x4f, 0x180051f5f\nmov     rcx, rdi                                                       ; +0x58, 0x180051f68\nmov     dword ptr [rdi+218h], 302h                                     ; +0x5b, 0x180051f6b\nmov     dword ptr [rdi+21Ch], 303h                                     ; +0x65, 0x180051f75\nmovzx   eax, byte ptr [rsi]                                            ; +0x6f, 0x180051f7f\nmov     [rdi+1A5h], al                                                 ; +0x72, 0x180051f82\nmov     [rdi+1A2h], al                                                 ; +0x78, 0x180051f88\nmovzx   eax, byte ptr [rsi+1]                                          ; +0x7e, 0x180051f8e\nmov     [rdi+1A6h], al                                                 ; +0x82, 0x180051f92\nmov     [rdi+1A3h], al                                                 ; +0x88, 0x180051f98\nmovzx   eax, byte ptr [rsi+2]                                          ; +0x8e, 0x180051f9e\nmov     [rdi+1A7h], al                                                 ; +0x92, 0x180051fa2\nmov     [rdi+1A4h], al                                                 ; +0x98, 0x180051fa8\nmovzx   eax, byte ptr [rsi+3]                                          ; +0x9e, 0x180051fae\nmov     [rdi+1A1h], al                                                 ; +0xa2, 0x180051fb2\nmov     [rdi+1A0h], al                                                 ; +0xa8, 0x180051fb8\nxor     eax, eax                                                       ; +0xae, 0x180051fbe\nmov     [rdi+1B8h], rax                                                ; +0xb0, 0x180051fc0\nmov     [rdi+1C0h], rax                                                ; +0xb7, 0x180051fc7\nmov     [rdi+1C8h], rax                                                ; +0xbe, 0x180051fce\nmov     [rdi+1D0h], rax                                                ; +0xc5, 0x180051fd5\nmov     rax, [rdi]                                                     ; +0xcc, 0x180051fdc\ncall    qword ptr [rax+418h]                                           ; +0xcf, 0x180051fdf\nmov     rbx, [rdi]                                                     ; +0xd5, 0x180051fe5\nlea     rcx, [rsp+58h+var_38]                                          ; +0xd8, 0x180051fe8\nmovaps  xmm2, xmm6                                                     ; +0xdd, 0x180051fed\nmovaps  xmm1, xmm7                                                     ; +0xe0, 0x180051ff0\ncall    kmVec2Fill                                                     ; +0xe3, 0x180051ff3\nmov     rdx, rax                                                       ; +0xe8, 0x180051ff8\nmov     rcx, rdi                                                       ; +0xeb, 0x180051ffb\ncall    qword ptr [rbx+138h]                                           ; +0xee, 0x180051ffe\nmov     rbx, [rdi]                                                     ; +0xf4, 0x180052004\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0xf7, 0x180052007\nmov     rcx, rax; this                                                 ; +0xfc, 0x18005200c\nlea     rdx, aShaderposition_1; \"ShaderPositionColor\"                  ; +0xff, 0x18005200f\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x106, 0x180052016\nmov     rdx, rax                                                       ; +0x10b, 0x18005201b\nmov     rcx, rdi                                                       ; +0x10e, 0x18005201e\ncall    qword ptr [rbx+290h]                                           ; +0x111, 0x180052021\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x117, 0x180052027\nmov     rsi, [rsp+58h+arg_8]                                           ; +0x11c, 0x18005202c\nmov     al, 1                                                          ; +0x121, 0x180052031\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x123, 0x180052033\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0x128, 0x180052038\nadd     rsp, 50h                                                       ; +0x12d, 0x18005203d\npop     rdi                                                            ; +0x131, 0x180052041\nretn                                                                   ; +0x132, 0x180052042", "xrefs": ["<???> @ 0x1800f3e88", "<???> @ 0x1800f4410", "<???> @ 0x1801414f8", "<???> @ 0x180141508", "<???> @ 0x18014cf68", "<???> @ 0x1801bc1e4"], "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"}