{"type": "func", "start": 6442482032, "end": 6442482276, "name": "cocos2d::extension::CCControlColourPicker::setColorValue", "pseudocode": "// \n// cocos2d::extension::CCControlColourPicker::setColorValue from 0x180007970 to 0x180007a64 (244 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x180026c10\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b75c\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 12:15:36 +0000\n// \n\nvoid __fastcall cocos2d::extension::CCControlColourPicker::setColorValue(\n        cocos2d::extension::CCControlColourPicker *this,\n        const struct cocos2d::_ccColor3B *a2)\n{\n  float v3; // xmm1_4\n  __int64 v4; // rax\n  __int64 v5; // xmm0_8\n  __int64 v6; // rcx\n  void (__fastcall ***v7)(_QWORD, __int16 *); // rcx\n  _BYTE v8[32]; // [rsp+20h] [rbp-48h] BYREF\n  __m128d v9; // [rsp+40h] [rbp-28h] BYREF\n  double v10; // [rsp+50h] [rbp-18h]\n  __int64 v11; // [rsp+58h] [rbp-10h]\n  __int16 v12; // [rsp+70h] [rbp+8h] BYREF\n  char v13; // [rsp+72h] [rbp+Ah]\n\n  *((_WORD *)this + 236) = *(_WORD *)a2;\n  *((_BYTE *)this + 474) = *((_BYTE *)a2 + 2);\n  v3 = (float)*((unsigned __int8 *)a2 + 2) / 255.0;\n  v9 = _mm_cvtps_pd(\n         _mm_div_ps(\n           _mm_cvtepi32_ps(\n             _mm_unpacklo_epi16(\n               _mm_unpacklo_epi8(_mm_cvtsi32_si128(*(unsigned __int16 *)a2), (__m128i)0LL),\n               (__m128i)0LL)),\n           (__m128)xmmword_18002BCD0));\n  v10 = v3;\n  v11 = 0x3FF0000000000000LL;\n  v4 = cocos2d::extension::CCControlUtils::HSVfromRGB(v8, &v9);\n  v5 = *(_QWORD *)(v4 + 16);\n  *((_OWORD *)this + 30) = *(_OWORD *)v4;\n  *((_QWORD *)this + 62) = v5;\n  cocos2d::extension::CCControlColourPicker::updateHueAndControlPicker(this);\n  v6 = *((_QWORD *)this + 66);\n  if ( v6 )\n    (**(void (__fastcall ***)(__int64, char *))(v6 + 320))(v6 + 320, (char *)this + 472);\n  v7 = *((void (__fastcall ****)(_QWORD, __int16 *))this + 67);\n  if ( v7 )\n  {\n    v12 = *((_WORD *)this + 236);\n    v13 = *((_BYTE *)this + 474);\n    (**v7)(v7, &v12);\n  }\n}", "assembly": "; \n; cocos2d::extension::CCControlColourPicker::setColorValue from 0x180007970 to 0x180007a64 (244 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x180026c10\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b75c\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 12:15:36 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180007970\npush    rdi                                                            ; +0x5, 0x180007975\nsub     rsp, 60h                                                       ; +0x6, 0x180007976\nmovzx   eax, word ptr [rdx]                                            ; +0xa, 0x18000797a\nxorps   xmm0, xmm0                                                     ; +0xd, 0x18000797d\nmov     [rcx+1D8h], ax                                                 ; +0x10, 0x180007980\nmov     rdi, rcx                                                       ; +0x17, 0x180007987\nmovzx   eax, byte ptr [rdx+2]                                          ; +0x1a, 0x18000798a\nmov     [rcx+1DAh], al                                                 ; +0x1e, 0x18000798e\nlea     rcx, [rsp+68h+var_48]                                          ; +0x24, 0x180007994\nmovzx   eax, word ptr [rdx]                                            ; +0x29, 0x180007999\nmovd    xmm1, eax                                                      ; +0x2c, 0x18000799c\nmovzx   eax, byte ptr [rdx+2]                                          ; +0x30, 0x1800079a0\nlea     rdx, [rsp+68h+var_28]                                          ; +0x34, 0x1800079a4\npunpcklbw xmm1, xmm0                                                   ; +0x39, 0x1800079a9\npunpcklwd xmm1, xmm0                                                   ; +0x3d, 0x1800079ad\ncvtdq2ps xmm0, xmm1                                                    ; +0x41, 0x1800079b1\nmovd    xmm1, eax                                                      ; +0x44, 0x1800079b4\ndivps   xmm0, cs:xmmword_18002BCD0                                     ; +0x48, 0x1800079b8\ncvtdq2ps xmm1, xmm1                                                    ; +0x4f, 0x1800079bf\ncvtps2pd xmm0, xmm0                                                    ; +0x52, 0x1800079c2\ndivss   xmm1, cs:dword_18002BC8C                                       ; +0x55, 0x1800079c5\nmovaps  [rsp+68h+var_28], xmm0                                         ; +0x5d, 0x1800079cd\ncvtps2pd xmm0, xmm1                                                    ; +0x62, 0x1800079d2\nmovsd   xmm1, cs:qword_18002BBF8                                       ; +0x65, 0x1800079d5\nmovsd   [rsp+68h+var_18], xmm0                                         ; +0x6d, 0x1800079dd\nmovsd   [rsp+68h+var_10], xmm1                                         ; +0x73, 0x1800079e3\ncall    ?HSVfromRGB@CCControlUtils@extension@cocos2d@@SA?AUHSV@23@URGBA@23@@Z; cocos2d::extension::CCControlUtils::HSVfromRGB(cocos2d::extension::RGBA) ; +0x79, 0x1800079e9\nmov     rcx, rdi; this                                                 ; +0x7e, 0x1800079ee\nmovups  xmm1, xmmword ptr [rax]                                        ; +0x81, 0x1800079f1\nmovsd   xmm0, qword ptr [rax+10h]                                      ; +0x84, 0x1800079f4\nmovups  xmmword ptr [rdi+1E0h], xmm1                                   ; +0x89, 0x1800079f9\nmovsd   qword ptr [rdi+1F0h], xmm0                                     ; +0x90, 0x180007a00\ncall    ?updateHueAndControlPicker@CCControlColourPicker@extension@cocos2d@@IEAAXXZ; cocos2d::extension::CCControlColourPicker::updateHueAndControlPicker(void) ; +0x98, 0x180007a08\nmov     rcx, [rdi+210h]                                                ; +0x9d, 0x180007a0d\ntest    rcx, rcx                                                       ; +0xa4, 0x180007a14\njz      short loc_180007A2C                                            ; +0xa7, 0x180007a17\nadd     rcx, 140h                                                      ; +0xa9, 0x180007a19\nlea     rdx, [rdi+1D8h]                                                ; +0xb0, 0x180007a20\nmov     rax, [rcx]                                                     ; +0xb7, 0x180007a27\ncall    qword ptr [rax]                                                ; +0xba, 0x180007a2a\nmov     rcx, [rdi+218h]                                                ; +0xbc, 0x180007a2c\ntest    rcx, rcx                                                       ; +0xc3, 0x180007a33\njz      short loc_180007A59                                            ; +0xc6, 0x180007a36\nmovzx   eax, word ptr [rdi+1D8h]                                       ; +0xc8, 0x180007a38\nlea     rdx, [rsp+68h+arg_0]                                           ; +0xcf, 0x180007a3f\nmov     [rsp+68h+arg_0], ax                                            ; +0xd4, 0x180007a44\nmovzx   eax, byte ptr [rdi+1DAh]                                       ; +0xd9, 0x180007a49\nmov     [rsp+68h+arg_2], al                                            ; +0xe0, 0x180007a50\nmov     rax, [rcx]                                                     ; +0xe4, 0x180007a54\ncall    qword ptr [rax]                                                ; +0xe7, 0x180007a57\nmov     rbx, [rsp+68h+arg_8]                                           ; +0xe9, 0x180007a59\nadd     rsp, 60h                                                       ; +0xee, 0x180007a5e\npop     rdi                                                            ; +0xf2, 0x180007a62\nretn                                                                   ; +0xf3, 0x180007a63", "xrefs": ["<???> @ 0x180026c10", "<???> @ 0x180032408", "<???> @ 0x18004b75c"], "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"}