; ; cocos2d::CCLayerGradient::updateColor from 0x180051410 to 0x18005182e (1054 bytes) ; ; 5 xrefs: ; > @ 0x1800ee258 ; > @ 0x1801383b0 ; > @ 0x1801383c0 ; > @ 0x1801438a8 ; > @ 0x1801b21d8 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; mov [rsp+arg_10], rbx ; +0x0, 0x180051410 push rdi ; +0x5, 0x180051415 sub rsp, 0B0h ; +0x6, 0x180051416 mov rbx, rcx ; +0xd, 0x18005141d movaps [rsp+0B8h+var_18], xmm6 ; +0x10, 0x180051420 add rcx, 228h; this ; +0x18, 0x180051428 call ?getLength@CCPoint@cocos2d@@QEBAMXZ; cocos2d::CCPoint::getLength(void) ; +0x1f, 0x18005142f movaps xmm6, xmm0 ; +0x24, 0x180051434 xorps xmm1, xmm1 ; +0x27, 0x180051437 ucomiss xmm6, xmm1 ; +0x2a, 0x18005143a jp short loc_180051445 ; +0x2d, 0x18005143d jz loc_180051815 ; +0x2f, 0x18005143f movss xmm0, cs:Y; X ; +0x35, 0x180051445 ucomiss xmm1, xmm0 ; +0x3d, 0x18005144d movaps [rsp+0B8h+var_28], xmm7 ; +0x40, 0x180051450 movaps [rsp+0B8h+var_38], xmm8 ; +0x48, 0x180051458 movaps [rsp+0B8h+var_48], xmm9 ; +0x51, 0x180051461 movaps [rsp+0B8h+var_58], xmm10 ; +0x57, 0x180051467 movaps [rsp+0B8h+var_68], xmm11 ; +0x5d, 0x18005146d movaps [rsp+0B8h+var_78], xmm12 ; +0x63, 0x180051473 movaps [rsp+0B8h+var_88], xmm13 ; +0x69, 0x180051479 movaps [rsp+0B8h+var_98], xmm14 ; +0x6f, 0x18005147f ja short loc_180051492 ; +0x75, 0x180051485 xorps xmm8, xmm8 ; +0x77, 0x180051487 sqrtss xmm8, xmm0 ; +0x7b, 0x18005148b jmp short loc_18005149B ; +0x80, 0x180051490 call sqrtf ; +0x82, 0x180051492 movaps xmm8, xmm0 ; +0x87, 0x180051497 movss xmm2, dword ptr [rbx+22Ch] ; +0x8b, 0x18005149b lea rcx, [rsp+0B8h+arg_0] ; +0x93, 0x1800514a3 movss xmm1, dword ptr [rbx+228h] ; +0x9b, 0x1800514ab divss xmm2, xmm6 ; +0xa3, 0x1800514b3 divss xmm1, xmm6 ; +0xa7, 0x1800514b7 call kmVec2Fill ; +0xab, 0x1800514bb cmp byte ptr [rbx+230h], 0 ; +0xb0, 0x1800514c0 jz short loc_180051528 ; +0xb7, 0x1800514c7 movss xmm3, [rsp+0B8h+arg_0] ; +0xb9, 0x1800514c9 lea rdx, [rsp+0B8h+arg_8] ; +0xc2, 0x1800514d2 movss xmm1, [rsp+0B8h+arg_4] ; +0xca, 0x1800514da lea rcx, [rsp+0B8h+arg_0] ; +0xd3, 0x1800514e3 andps xmm3, cs:xmmword_1800E6560 ; +0xdb, 0x1800514eb andps xmm1, cs:xmmword_1800E6560 ; +0xe2, 0x1800514f2 movss xmm2, cs:flt_1800E61A8 ; +0xe9, 0x1800514f9 addss xmm3, xmm1 ; +0xf1, 0x180051501 divss xmm2, xmm3 ; +0xf5, 0x180051505 mulss xmm2, xmm8 ; +0xf9, 0x180051509 call ??DCCSize@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCSize::operator*(float) ; +0xfe, 0x18005150e lea rdx, [rsp+0B8h+arg_8] ; +0x103, 0x180051513 lea rcx, [rsp+0B8h+arg_0] ; +0x10b, 0x18005151b call ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x113, 0x180051523 cmp byte ptr [rbx+231h], 0 ; +0x118, 0x180051528 xorps xmm6, xmm6 ; +0x11f, 0x18005152f movss xmm1, cs:dword_1800E5838 ; +0x122, 0x180051532 xorps xmm0, xmm0 ; +0x12a, 0x18005153a movzx eax, byte ptr [rbx+1A0h] ; +0x12d, 0x18005153d xorps xmm10, xmm10 ; +0x134, 0x180051544 xorps xmm9, xmm9 ; +0x138, 0x180051548 xorps xmm7, xmm7 ; +0x13c, 0x18005154c xorps xmm11, xmm11 ; +0x13f, 0x18005154f xorps xmm12, xmm12 ; +0x143, 0x180051553 xorps xmm13, xmm13 ; +0x147, 0x180051557 xorps xmm14, xmm14 ; +0x14b, 0x18005155b cvtsi2ss xmm0, eax ; +0x14f, 0x18005155f movzx eax, byte ptr [rbx+1A2h] ; +0x153, 0x180051563 cvtsi2ss xmm10, eax ; +0x15a, 0x18005156a movzx eax, byte ptr [rbx+1A3h] ; +0x15f, 0x18005156f cvtsi2ss xmm9, eax ; +0x166, 0x180051576 movzx eax, byte ptr [rbx+1A4h] ; +0x16b, 0x18005157b cvtsi2ss xmm11, eax ; +0x172, 0x180051582 movzx eax, byte ptr [rbx+226h] ; +0x177, 0x180051587 cvtsi2ss xmm6, eax ; +0x17e, 0x18005158e movzx eax, byte ptr [rbx+223h] ; +0x182, 0x180051592 cvtsi2ss xmm12, eax ; +0x189, 0x180051599 movzx eax, byte ptr [rbx+224h] ; +0x18e, 0x18005159e cvtsi2ss xmm13, eax ; +0x195, 0x1800515a5 movzx eax, byte ptr [rbx+225h] ; +0x19a, 0x1800515aa divss xmm0, xmm1 ; +0x1a1, 0x1800515b1 cvtsi2ss xmm14, eax ; +0x1a5, 0x1800515b5 movzx eax, byte ptr [rbx+227h] ; +0x1aa, 0x1800515ba cvtsi2ss xmm7, eax ; +0x1b1, 0x1800515c1 mulss xmm6, xmm0 ; +0x1b5, 0x1800515c5 mulss xmm7, xmm0 ; +0x1b9, 0x1800515c9 divss xmm10, xmm1 ; +0x1bd, 0x1800515cd divss xmm7, xmm1 ; +0x1c2, 0x1800515d2 divss xmm9, xmm1 ; +0x1c6, 0x1800515d6 divss xmm11, xmm1 ; +0x1cb, 0x1800515db divss xmm6, xmm1 ; +0x1d0, 0x1800515e0 divss xmm12, xmm1 ; +0x1d4, 0x1800515e4 divss xmm13, xmm1 ; +0x1d9, 0x1800515e9 divss xmm14, xmm1 ; +0x1de, 0x1800515ee jz short loc_18005163D ; +0x1e3, 0x1800515f3 movaps xmm0, xmm6 ; +0x1e5, 0x1800515f5 movaps xmm1, xmm6 ; +0x1e8, 0x1800515f8 mulss xmm0, xmm10 ; +0x1eb, 0x1800515fb mulss xmm1, xmm9 ; +0x1f0, 0x180051600 movaps xmm10, xmm0 ; +0x1f5, 0x180051605 movaps xmm0, xmm6 ; +0x1f9, 0x180051609 mulss xmm0, xmm11 ; +0x1fc, 0x18005160c movaps xmm9, xmm1 ; +0x201, 0x180051611 movaps xmm1, xmm7 ; +0x205, 0x180051615 mulss xmm1, xmm12 ; +0x208, 0x180051618 movaps xmm11, xmm0 ; +0x20d, 0x18005161d movaps xmm0, xmm7 ; +0x211, 0x180051621 mulss xmm0, xmm13 ; +0x214, 0x180051624 movaps xmm12, xmm1 ; +0x219, 0x180051629 movaps xmm1, xmm7 ; +0x21d, 0x18005162d mulss xmm1, xmm14 ; +0x220, 0x180051630 movaps xmm13, xmm0 ; +0x225, 0x180051635 movaps xmm14, xmm1 ; +0x229, 0x180051639 movss xmm3, [rsp+0B8h+arg_4] ; +0x22d, 0x18005163d subss xmm9, xmm13 ; +0x236, 0x180051646 movss xmm2, [rsp+0B8h+arg_0] ; +0x23b, 0x18005164b subss xmm11, xmm14 ; +0x244, 0x180051654 movaps xmm4, xmm2 ; +0x249, 0x180051659 subss xmm10, xmm12 ; +0x24c, 0x18005165c addss xmm4, xmm8 ; +0x251, 0x180051661 movaps xmm5, xmm8 ; +0x256, 0x180051666 addss xmm5, xmm8 ; +0x25a, 0x18005166a subss xmm8, xmm2 ; +0x25f, 0x18005166f subss xmm6, xmm7 ; +0x264, 0x180051674 movaps xmm0, xmm10 ; +0x268, 0x180051678 movaps xmm1, xmm4 ; +0x26c, 0x18005167c subss xmm4, xmm3 ; +0x26f, 0x18005167f addss xmm1, xmm3 ; +0x273, 0x180051683 movaps xmm2, xmm8 ; +0x277, 0x180051687 subss xmm8, xmm3 ; +0x27b, 0x18005168b addss xmm2, xmm3 ; +0x280, 0x180051690 divss xmm4, xmm5 ; +0x284, 0x180051694 divss xmm1, xmm5 ; +0x288, 0x180051698 divss xmm2, xmm5 ; +0x28c, 0x18005169c mulss xmm0, xmm1 ; +0x290, 0x1800516a0 divss xmm8, xmm5 ; +0x294, 0x1800516a4 addss xmm0, xmm12 ; +0x299, 0x1800516a9 movss dword ptr [rbx+1D8h], xmm0 ; +0x29e, 0x1800516ae movaps xmm0, xmm9 ; +0x2a6, 0x1800516b6 mulss xmm0, xmm1 ; +0x2aa, 0x1800516ba addss xmm0, xmm13 ; +0x2ae, 0x1800516be movss dword ptr [rbx+1DCh], xmm0 ; +0x2b3, 0x1800516c3 movaps xmm0, xmm11 ; +0x2bb, 0x1800516cb mulss xmm0, xmm1 ; +0x2bf, 0x1800516cf mulss xmm1, xmm6 ; +0x2c3, 0x1800516d3 addss xmm0, xmm14 ; +0x2c7, 0x1800516d7 addss xmm1, xmm7 ; +0x2cc, 0x1800516dc movss dword ptr [rbx+1E0h], xmm0 ; +0x2d0, 0x1800516e0 movaps xmm0, xmm2 ; +0x2d8, 0x1800516e8 mulss xmm0, xmm10 ; +0x2db, 0x1800516eb movss dword ptr [rbx+1E4h], xmm1 ; +0x2e0, 0x1800516f0 movaps xmm1, xmm9 ; +0x2e8, 0x1800516f8 mulss xmm1, xmm2 ; +0x2ec, 0x1800516fc addss xmm0, xmm12 ; +0x2f0, 0x180051700 addss xmm1, xmm13 ; +0x2f5, 0x180051705 movss dword ptr [rbx+1E8h], xmm0 ; +0x2fa, 0x18005170a movaps xmm0, xmm2 ; +0x302, 0x180051712 mulss xmm0, xmm11 ; +0x305, 0x180051715 movss dword ptr [rbx+1ECh], xmm1 ; +0x30a, 0x18005171a movaps xmm1, xmm9 ; +0x312, 0x180051722 mulss xmm1, xmm4 ; +0x316, 0x180051726 addss xmm0, xmm14 ; +0x31a, 0x18005172a mulss xmm9, xmm8 ; +0x31f, 0x18005172f mulss xmm2, xmm6 ; +0x324, 0x180051734 addss xmm1, xmm13 ; +0x328, 0x180051738 addss xmm9, xmm13 ; +0x32d, 0x18005173d movss dword ptr [rbx+1F0h], xmm0 ; +0x332, 0x180051742 movaps xmm0, xmm4 ; +0x33a, 0x18005174a mulss xmm0, xmm10 ; +0x33d, 0x18005174d addss xmm2, xmm7 ; +0x342, 0x180051752 addss xmm0, xmm12 ; +0x346, 0x180051756 movss dword ptr [rbx+1F4h], xmm2 ; +0x34b, 0x18005175b movss dword ptr [rbx+1F8h], xmm0 ; +0x353, 0x180051763 movaps xmm0, xmm4 ; +0x35b, 0x18005176b mulss xmm0, xmm11 ; +0x35e, 0x18005176e movss dword ptr [rbx+1FCh], xmm1 ; +0x363, 0x180051773 mulss xmm4, xmm6 ; +0x36b, 0x18005177b addss xmm0, xmm14 ; +0x36f, 0x18005177f addss xmm4, xmm7 ; +0x374, 0x180051784 movss dword ptr [rbx+200h], xmm0 ; +0x378, 0x180051788 movaps xmm0, xmm8 ; +0x380, 0x180051790 mulss xmm0, xmm10 ; +0x384, 0x180051794 movss dword ptr [rbx+204h], xmm4 ; +0x389, 0x180051799 addss xmm0, xmm12 ; +0x391, 0x1800517a1 movss dword ptr [rbx+208h], xmm0 ; +0x396, 0x1800517a6 movaps xmm0, xmm8 ; +0x39e, 0x1800517ae movss dword ptr [rbx+20Ch], xmm9 ; +0x3a2, 0x1800517b2 mulss xmm0, xmm11 ; +0x3ab, 0x1800517bb mulss xmm8, xmm6 ; +0x3b0, 0x1800517c0 addss xmm0, xmm14 ; +0x3b5, 0x1800517c5 movaps xmm14, [rsp+0B8h+var_98] ; +0x3ba, 0x1800517ca addss xmm8, xmm7 ; +0x3c0, 0x1800517d0 movss dword ptr [rbx+210h], xmm0 ; +0x3c5, 0x1800517d5 movss dword ptr [rbx+214h], xmm8 ; +0x3cd, 0x1800517dd movaps xmm13, [rsp+0B8h+var_88] ; +0x3d6, 0x1800517e6 movaps xmm12, [rsp+0B8h+var_78] ; +0x3dc, 0x1800517ec movaps xmm11, [rsp+0B8h+var_68] ; +0x3e2, 0x1800517f2 movaps xmm10, [rsp+0B8h+var_58] ; +0x3e8, 0x1800517f8 movaps xmm9, [rsp+0B8h+var_48] ; +0x3ee, 0x1800517fe movaps xmm8, [rsp+0B8h+var_38] ; +0x3f4, 0x180051804 movaps xmm7, [rsp+0B8h+var_28] ; +0x3fd, 0x18005180d mov rbx, [rsp+0B8h+arg_10] ; +0x405, 0x180051815 movaps xmm6, [rsp+0B8h+var_18] ; +0x40d, 0x18005181d add rsp, 0B0h ; +0x415, 0x180051825 pop rdi ; +0x41c, 0x18005182c retn ; +0x41d, 0x18005182d