; ; cocos2d::extension::CCControlUtils::RGBfromHSV from 0x18000d050 to 0x18000d1d0 (384 bytes) ; ; 5 xrefs: ; > cocos2d::extension::CCControlColourPicker::hueSliderValueChanged @ 0x180007ba4 ; > cocos2d::extension::CCControlColourPicker::colourSliderValueChanged @ 0x180007ce7 ; > cocos2d::extension::CCControlSaturationBrightnessPicker::updateWithHSV @ 0x180009809 ; > @ 0x180032408 ; > @ 0x18004bcf0 ; ; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 12:15:38 +0000 ; mov [rsp+arg_0], rbx ; +0x0, 0x18000d050 push rdi ; +0x5, 0x18000d055 sub rsp, 30h ; +0x6, 0x18000d056 movsd xmm3, qword ptr [rdx] ; +0xa, 0x18000d05a xorps xmm0, xmm0 ; +0xe, 0x18000d05e movaps [rsp+38h+var_18], xmm6 ; +0x11, 0x18000d061 mov rax, 3FF0000000000000h ; +0x16, 0x18000d066 movsd xmm6, qword ptr [rdx+8] ; +0x20, 0x18000d070 mov rdi, rdx ; +0x25, 0x18000d075 comisd xmm0, xmm6 ; +0x28, 0x18000d078 mov rbx, rcx ; +0x2c, 0x18000d07c mov [rcx+18h], rax ; +0x2f, 0x18000d07f jb short loc_18000D0D6 ; +0x33, 0x18000d083 movaps xmm0, xmm3; X ; +0x35, 0x18000d085 call cs:_isnan ; +0x38, 0x18000d088 test eax, eax ; +0x3e, 0x18000d08e jnz short loc_18000D0B6 ; +0x40, 0x18000d090 movsd xmm0, qword ptr [rdi+10h] ; +0x42, 0x18000d092 mov rax, rbx ; +0x47, 0x18000d097 unpcklpd xmm0, xmm0 ; +0x4a, 0x18000d09a movsd qword ptr [rbx+10h], xmm0 ; +0x4e, 0x18000d09e movups xmmword ptr [rbx], xmm0 ; +0x53, 0x18000d0a3 mov rbx, [rsp+38h+arg_0] ; +0x56, 0x18000d0a6 movaps xmm6, [rsp+38h+var_18] ; +0x5b, 0x18000d0ab add rsp, 30h ; +0x60, 0x18000d0b0 pop rdi ; +0x64, 0x18000d0b4 retn ; +0x65, 0x18000d0b5 xor eax, eax ; +0x66, 0x18000d0b6 mov [rbx], rax ; +0x68, 0x18000d0b8 mov [rbx+8], rax ; +0x6b, 0x18000d0bb mov [rbx+10h], rax ; +0x6f, 0x18000d0bf mov rax, rbx ; +0x73, 0x18000d0c3 mov rbx, [rsp+38h+arg_0] ; +0x76, 0x18000d0c6 movaps xmm6, [rsp+38h+var_18] ; +0x7b, 0x18000d0cb add rsp, 30h ; +0x80, 0x18000d0d0 pop rdi ; +0x84, 0x18000d0d4 retn ; +0x85, 0x18000d0d5 comisd xmm3, cs:qword_18002BC40 ; +0x86, 0x18000d0d6 jb short loc_18000D0E3 ; +0x8e, 0x18000d0de xorps xmm3, xmm3 ; +0x90, 0x18000d0e0 mulsd xmm3, cs:qword_18002BBE8 ; +0x93, 0x18000d0e3 xorps xmm0, xmm0 ; +0x9b, 0x18000d0eb movsd xmm4, cs:qword_18002BBF8 ; +0x9e, 0x18000d0ee movsd xmm1, qword ptr [rdx+10h] ; +0xa6, 0x18000d0f6 movaps xmm5, xmm4 ; +0xab, 0x18000d0fb movaps xmm2, xmm4 ; +0xae, 0x18000d0fe cvttsd2si eax, xmm3 ; +0xb1, 0x18000d101 subsd xmm2, xmm6 ; +0xb5, 0x18000d105 cvtsi2sd xmm0, eax ; +0xb9, 0x18000d109 mulsd xmm2, xmm1 ; +0xbd, 0x18000d10d subsd xmm3, xmm0 ; +0xc1, 0x18000d111 movaps xmm0, xmm3 ; +0xc5, 0x18000d115 mulsd xmm0, xmm6 ; +0xc8, 0x18000d118 subsd xmm5, xmm0 ; +0xcc, 0x18000d11c movaps xmm0, xmm4 ; +0xd0, 0x18000d120 subsd xmm0, xmm3 ; +0xd3, 0x18000d123 mulsd xmm5, xmm1 ; +0xd7, 0x18000d127 mulsd xmm0, xmm6 ; +0xdb, 0x18000d12b subsd xmm4, xmm0 ; +0xdf, 0x18000d12f mulsd xmm4, xmm1 ; +0xe3, 0x18000d133 cmp eax, 5; switch 6 cases ; +0xe7, 0x18000d137 ja short def_18000D14F; jumptable 000000018000D14F default case, case 5 ; +0xea, 0x18000d13a lea rdx, cs:180000000h ; +0xec, 0x18000d13c cdqe ; +0xf3, 0x18000d143 mov ecx, ds:(jpt_18000D14F - 180000000h)[rdx+rax*4] ; +0xf5, 0x18000d145 add rcx, rdx ; +0xfc, 0x18000d14c jmp rcx; switch jump ; +0xff, 0x18000d14f movsd qword ptr [rbx+8], xmm4; jumptable 000000018000D14F case 0 ; +0x101, 0x18000d151 movsd qword ptr [rbx+10h], xmm2 ; +0x106, 0x18000d156 jmp short loc_18000D19E ; +0x10b, 0x18000d15b movsd qword ptr [rbx+8], xmm1; jumptable 000000018000D14F case 1 ; +0x10d, 0x18000d15d movaps xmm1, xmm5 ; +0x112, 0x18000d162 movsd qword ptr [rbx+10h], xmm2 ; +0x115, 0x18000d165 jmp short loc_18000D19E ; +0x11a, 0x18000d16a movsd qword ptr [rbx+8], xmm1; jumptable 000000018000D14F case 2 ; +0x11c, 0x18000d16c movaps xmm1, xmm2 ; +0x121, 0x18000d171 movsd qword ptr [rbx+10h], xmm4 ; +0x124, 0x18000d174 jmp short loc_18000D19E ; +0x129, 0x18000d179 movsd qword ptr [rbx+10h], xmm1; jumptable 000000018000D14F case 3 ; +0x12b, 0x18000d17b movaps xmm1, xmm2 ; +0x130, 0x18000d180 movsd qword ptr [rbx+8], xmm5 ; +0x133, 0x18000d183 jmp short loc_18000D19E ; +0x138, 0x18000d188 movsd qword ptr [rbx+10h], xmm1; jumptable 000000018000D14F case 4 ; +0x13a, 0x18000d18a movaps xmm1, xmm4 ; +0x13f, 0x18000d18f jmp short loc_18000D199 ; +0x142, 0x18000d192 movsd qword ptr [rbx+10h], xmm5; jumptable 000000018000D14F default case, case 5 ; +0x144, 0x18000d194 movsd qword ptr [rbx+8], xmm2 ; +0x149, 0x18000d199 movsd qword ptr [rbx], xmm1 ; +0x14e, 0x18000d19e mov rax, rbx ; +0x152, 0x18000d1a2 mov rbx, [rsp+38h+arg_0] ; +0x155, 0x18000d1a5 movaps xmm6, [rsp+38h+var_18] ; +0x15a, 0x18000d1aa add rsp, 30h ; +0x15f, 0x18000d1af pop rdi ; +0x163, 0x18000d1b3 retn ; +0x164, 0x18000d1b4 align 8 ; +0x165, 0x18000d1b5 dd offset loc_18000D151 - 180000000h; jump table for switch statement ; +0x168, 0x18000d1b8