{"type": "func", "start": 6442491184, "end": 6442491318, "name": "cocos2d::extension::CCControlSaturationBrightnessPicker::updateWithHSV", "pseudocode": "// \n// cocos2d::extension::CCControlSaturationBrightnessPicker::updateWithHSV from 0x180009d30 to 0x180009db6 (134 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x180025960\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049a74\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\n__int64 __fastcall cocos2d::extension::CCControlSaturationBrightnessPicker::updateWithHSV(__int64 a1, __int64 *a2)\n{\n  __m128d *v3; // rax\n  __int64 (__fastcall ***v4)(_QWORD, char *); // rcx\n  double v5; // xmm2_8\n  double v6; // xmm3_8\n  __int64 v8; // [rsp+20h] [rbp-48h] BYREF\n  __int128 v9; // [rsp+28h] [rbp-40h]\n  _BYTE v10[40]; // [rsp+40h] [rbp-28h] BYREF\n  char v11; // [rsp+70h] [rbp+8h] BYREF\n  char v12; // [rsp+71h] [rbp+9h]\n  char v13; // [rsp+72h] [rbp+Ah]\n\n  v8 = *a2;\n  v9 = xmmword_1800295F0;\n  v3 = (__m128d *)cocos2d::extension::CCControlUtils::RGBfromHSV(v10, &v8);\n  v4 = (__int64 (__fastcall ***)(_QWORD, char *))(*(_QWORD *)(a1 + 480) + 320LL);\n  v5 = _mm_unpackhi_pd(*v3, *v3).m128d_f64[0];\n  v6 = v3[1].m128d_f64[0] * 255.0;\n  v11 = (int)(v3->m128d_f64[0] * 255.0);\n  v12 = (int)(v5 * 255.0);\n  v13 = (int)v6;\n  return (**v4)(v4, &v11);\n}", "assembly": "; \n; cocos2d::extension::CCControlSaturationBrightnessPicker::updateWithHSV from 0x180009d30 to 0x180009db6 (134 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x180025960\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049a74\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    rbx                                                            ; +0x0, 0x180009d30\nsub     rsp, 60h                                                       ; +0x2, 0x180009d32\nmovsd   xmm0, qword ptr [rdx]                                          ; +0x6, 0x180009d36\nmov     rbx, rcx                                                       ; +0xa, 0x180009d3a\nmovaps  xmm1, cs:xmmword_1800295F0                                     ; +0xd, 0x180009d3d\nlea     rdx, [rsp+68h+var_48]                                          ; +0x14, 0x180009d44\nlea     rcx, [rsp+68h+var_28]                                          ; +0x19, 0x180009d49\nmovsd   [rsp+68h+var_48], xmm0                                         ; +0x1e, 0x180009d4e\nmovups  [rsp+68h+var_40], xmm1                                         ; +0x24, 0x180009d54\ncall    ?RGBfromHSV@CCControlUtils@extension@cocos2d@@SA?AURGBA@23@UHSV@23@@Z; cocos2d::extension::CCControlUtils::RGBfromHSV(cocos2d::extension::HSV) ; +0x29, 0x180009d59\nmovsd   xmm1, cs:qword_180029570                                       ; +0x2e, 0x180009d5e\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x36, 0x180009d66\nmov     rcx, [rbx+1E0h]                                                ; +0x3b, 0x180009d6b\nadd     rcx, 140h                                                      ; +0x42, 0x180009d72\nmovups  xmm2, xmmword ptr [rax]                                        ; +0x49, 0x180009d79\nmovups  xmm3, xmmword ptr [rax+10h]                                    ; +0x4c, 0x180009d7c\nmovaps  xmm0, xmm2                                                     ; +0x50, 0x180009d80\nunpckhpd xmm2, xmm2                                                    ; +0x53, 0x180009d83\nmulsd   xmm0, xmm1                                                     ; +0x57, 0x180009d87\nmulsd   xmm2, xmm1                                                     ; +0x5b, 0x180009d8b\nmulsd   xmm3, xmm1                                                     ; +0x5f, 0x180009d8f\ncvttsd2si eax, xmm0                                                    ; +0x63, 0x180009d93\nmov     [rsp+68h+arg_0], al                                            ; +0x67, 0x180009d97\ncvttsd2si eax, xmm2                                                    ; +0x6b, 0x180009d9b\nmov     [rsp+68h+arg_1], al                                            ; +0x6f, 0x180009d9f\ncvttsd2si eax, xmm3                                                    ; +0x73, 0x180009da3\nmov     [rsp+68h+arg_2], al                                            ; +0x77, 0x180009da7\nmov     rax, [rcx]                                                     ; +0x7b, 0x180009dab\ncall    qword ptr [rax]                                                ; +0x7e, 0x180009dae\nadd     rsp, 60h                                                       ; +0x80, 0x180009db0\npop     rbx                                                            ; +0x84, 0x180009db4\nretn                                                                   ; +0x85, 0x180009db5", "xrefs": ["<???> @ 0x180025960", "<???> @ 0x18002fdf8", "<???> @ 0x180049a74"], "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"}