{"type": "func", "start": 6442483376, "end": 6442483635, "name": "cocos2d::extension::CCControlColourPicker::setColorValue", "pseudocode": "// \n// cocos2d::extension::CCControlColourPicker::setColorValue from 0x180007eb0 to 0x180007fb3 (259 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1800246b8\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049828\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 cocos2d::extension::CCControlColourPicker::setColorValue(\n        cocos2d::extension::CCControlColourPicker *this,\n        const struct cocos2d::_ccColor3B *a2)\n{\n  __m128i v3; // xmm1\n  int v4; // eax\n  __int64 v5; // rax\n  __int64 v6; // xmm0_8\n  __int64 v7; // rcx\n  void (__fastcall ***v8)(_QWORD, __int16 *); // rcx\n  _BYTE v9[32]; // [rsp+20h] [rbp-48h] BYREF\n  double v10[5]; // [rsp+40h] [rbp-28h] BYREF\n  __int16 v11; // [rsp+70h] [rbp+8h] BYREF\n  char v12; // [rsp+72h] [rbp+Ah]\n\n  *((_WORD *)this + 236) = *(_WORD *)a2;\n  *((_BYTE *)this + 474) = *((_BYTE *)a2 + 2);\n  v3 = _mm_cvtsi32_si128(*((unsigned __int8 *)a2 + 1));\n  v4 = *((unsigned __int8 *)a2 + 2);\n  v10[0] = (float)((float)*(unsigned __int8 *)a2 / 255.0);\n  v10[1] = (float)(_mm_cvtepi32_ps(v3).m128_f32[0] / 255.0);\n  v10[2] = (float)((float)v4 / 255.0);\n  v10[3] = 1.0;\n  v5 = cocos2d::extension::CCControlUtils::HSVfromRGB(v9, v10);\n  v6 = *(_QWORD *)(v5 + 16);\n  *((_OWORD *)this + 30) = *(_OWORD *)v5;\n  *((_QWORD *)this + 62) = v6;\n  cocos2d::extension::CCControlColourPicker::updateHueAndControlPicker(this);\n  v7 = *((_QWORD *)this + 66);\n  if ( v7 )\n    (**(void (__fastcall ***)(__int64, char *))(v7 + 320))(v7 + 320, (char *)this + 472);\n  v8 = *((void (__fastcall ****)(_QWORD, __int16 *))this + 67);\n  if ( v8 )\n  {\n    v11 = *((_WORD *)this + 236);\n    v12 = *((_BYTE *)this + 474);\n    (**v8)(v8, &v11);\n  }\n}", "assembly": "; \n; cocos2d::extension::CCControlColourPicker::setColorValue from 0x180007eb0 to 0x180007fb3 (259 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1800246b8\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049828\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], rbx                                               ; +0x0, 0x180007eb0\npush    rdi                                                            ; +0x5, 0x180007eb5\nsub     rsp, 60h                                                       ; +0x6, 0x180007eb6\nmovzx   eax, word ptr [rdx]                                            ; +0xa, 0x180007eba\nmov     rdi, rcx                                                       ; +0xd, 0x180007ebd\nmovss   xmm2, cs:dword_1800295C4                                       ; +0x10, 0x180007ec0\nmov     [rcx+1D8h], ax                                                 ; +0x18, 0x180007ec8\nmovzx   eax, byte ptr [rdx+2]                                          ; +0x1f, 0x180007ecf\nmov     [rcx+1DAh], al                                                 ; +0x23, 0x180007ed3\nlea     rcx, [rsp+68h+var_48]                                          ; +0x29, 0x180007ed9\nmovzx   eax, byte ptr [rdx]                                            ; +0x2e, 0x180007ede\nmovd    xmm0, eax                                                      ; +0x31, 0x180007ee1\nmovzx   eax, byte ptr [rdx+1]                                          ; +0x35, 0x180007ee5\ncvtdq2ps xmm0, xmm0                                                    ; +0x39, 0x180007ee9\nmovd    xmm1, eax                                                      ; +0x3c, 0x180007eec\nmovzx   eax, byte ptr [rdx+2]                                          ; +0x40, 0x180007ef0\nlea     rdx, [rsp+68h+var_28]                                          ; +0x44, 0x180007ef4\ncvtdq2ps xmm1, xmm1                                                    ; +0x49, 0x180007ef9\ndivss   xmm0, xmm2                                                     ; +0x4c, 0x180007efc\ndivss   xmm1, xmm2                                                     ; +0x50, 0x180007f00\ncvtps2pd xmm0, xmm0                                                    ; +0x54, 0x180007f04\nmovsd   [rsp+68h+var_28], xmm0                                         ; +0x57, 0x180007f07\ncvtps2pd xmm0, xmm1                                                    ; +0x5d, 0x180007f0d\nmovd    xmm1, eax                                                      ; +0x60, 0x180007f10\ncvtdq2ps xmm1, xmm1                                                    ; +0x64, 0x180007f14\nmovsd   [rsp+68h+var_20], xmm0                                         ; +0x67, 0x180007f17\ndivss   xmm1, xmm2                                                     ; +0x6d, 0x180007f1d\ncvtps2pd xmm0, xmm1                                                    ; +0x71, 0x180007f21\nmovsd   xmm1, cs:qword_180029530                                       ; +0x74, 0x180007f24\nmovsd   [rsp+68h+var_18], xmm0                                         ; +0x7c, 0x180007f2c\nmovsd   [rsp+68h+var_10], xmm1                                         ; +0x82, 0x180007f32\ncall    ?HSVfromRGB@CCControlUtils@extension@cocos2d@@SA?AUHSV@23@URGBA@23@@Z; cocos2d::extension::CCControlUtils::HSVfromRGB(cocos2d::extension::RGBA) ; +0x88, 0x180007f38\nmov     rcx, rdi; this                                                 ; +0x8d, 0x180007f3d\nmovups  xmm1, xmmword ptr [rax]                                        ; +0x90, 0x180007f40\nmovsd   xmm0, qword ptr [rax+10h]                                      ; +0x93, 0x180007f43\nmovups  xmmword ptr [rdi+1E0h], xmm1                                   ; +0x98, 0x180007f48\nmovsd   qword ptr [rdi+1F0h], xmm0                                     ; +0x9f, 0x180007f4f\ncall    ?updateHueAndControlPicker@CCControlColourPicker@extension@cocos2d@@IEAAXXZ; cocos2d::extension::CCControlColourPicker::updateHueAndControlPicker(void) ; +0xa7, 0x180007f57\nmov     rcx, [rdi+210h]                                                ; +0xac, 0x180007f5c\ntest    rcx, rcx                                                       ; +0xb3, 0x180007f63\njz      short loc_180007F7B                                            ; +0xb6, 0x180007f66\nadd     rcx, 140h                                                      ; +0xb8, 0x180007f68\nlea     rdx, [rdi+1D8h]                                                ; +0xbf, 0x180007f6f\nmov     rax, [rcx]                                                     ; +0xc6, 0x180007f76\ncall    qword ptr [rax]                                                ; +0xc9, 0x180007f79\nmov     rcx, [rdi+218h]                                                ; +0xcb, 0x180007f7b\ntest    rcx, rcx                                                       ; +0xd2, 0x180007f82\njz      short loc_180007FA8                                            ; +0xd5, 0x180007f85\nmovzx   eax, word ptr [rdi+1D8h]                                       ; +0xd7, 0x180007f87\nlea     rdx, [rsp+68h+arg_0]                                           ; +0xde, 0x180007f8e\nmov     [rsp+68h+arg_0], ax                                            ; +0xe3, 0x180007f93\nmovzx   eax, byte ptr [rdi+1DAh]                                       ; +0xe8, 0x180007f98\nmov     [rsp+68h+arg_2], al                                            ; +0xef, 0x180007f9f\nmov     rax, [rcx]                                                     ; +0xf3, 0x180007fa3\ncall    qword ptr [rax]                                                ; +0xf6, 0x180007fa6\nmov     rbx, [rsp+68h+arg_8]                                           ; +0xf8, 0x180007fa8\nadd     rsp, 60h                                                       ; +0xfd, 0x180007fad\npop     rdi                                                            ; +0x101, 0x180007fb1\nretn                                                                   ; +0x102, 0x180007fb2", "xrefs": ["<???> @ 0x1800246b8", "<???> @ 0x18002fdf8", "<???> @ 0x180049828"], "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"}