; ; cocos2d::CCLayerGradient::updateColor from 0x180053180 to 0x1800535a1 (1057 bytes) ; ; 5 xrefs: ; > @ 0x1800f4418 ; > @ 0x1801415d8 ; > @ 0x1801415e8 ; > @ 0x18014cf68 ; > @ 0x1801bc46c ; ; 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 11:21:46 +0000 ; mov [rsp+arg_10], rbx ; +0x0, 0x180053180 push rdi ; +0x5, 0x180053185 sub rsp, 0B0h ; +0x6, 0x180053186 mov rbx, rcx ; +0xd, 0x18005318d movaps [rsp+0B8h+var_18], xmm6 ; +0x10, 0x180053190 add rcx, 228h; this ; +0x18, 0x180053198 call ?getLength@CCPoint@cocos2d@@QEBAMXZ; cocos2d::CCPoint::getLength(void) ; +0x1f, 0x18005319f movaps xmm6, xmm0 ; +0x24, 0x1800531a4 xorps xmm1, xmm1 ; +0x27, 0x1800531a7 ucomiss xmm6, xmm1 ; +0x2a, 0x1800531aa jp short loc_1800531B5 ; +0x2d, 0x1800531ad jz loc_180053588 ; +0x2f, 0x1800531af movss xmm0, cs:X; X ; +0x35, 0x1800531b5 ucomiss xmm1, xmm0 ; +0x3d, 0x1800531bd movaps [rsp+0B8h+var_28], xmm7 ; +0x40, 0x1800531c0 movaps [rsp+0B8h+var_38], xmm8 ; +0x48, 0x1800531c8 movaps [rsp+0B8h+var_48], xmm9 ; +0x51, 0x1800531d1 movaps [rsp+0B8h+var_58], xmm10 ; +0x57, 0x1800531d7 movaps [rsp+0B8h+var_68], xmm11 ; +0x5d, 0x1800531dd movaps [rsp+0B8h+var_78], xmm12 ; +0x63, 0x1800531e3 movaps [rsp+0B8h+var_88], xmm13 ; +0x69, 0x1800531e9 movaps [rsp+0B8h+var_98], xmm14 ; +0x6f, 0x1800531ef ja short loc_180053202 ; +0x75, 0x1800531f5 xorps xmm8, xmm8 ; +0x77, 0x1800531f7 sqrtss xmm8, xmm0 ; +0x7b, 0x1800531fb jmp short loc_18005320B ; +0x80, 0x180053200 call sqrtf ; +0x82, 0x180053202 movaps xmm8, xmm0 ; +0x87, 0x180053207 movss xmm2, dword ptr [rbx+22Ch] ; +0x8b, 0x18005320b lea rcx, [rsp+0B8h+arg_0] ; +0x93, 0x180053213 movss xmm1, dword ptr [rbx+228h] ; +0x9b, 0x18005321b divss xmm2, xmm6 ; +0xa3, 0x180053223 divss xmm1, xmm6 ; +0xa7, 0x180053227 call kmVec2Fill ; +0xab, 0x18005322b cmp byte ptr [rbx+230h], 0 ; +0xb0, 0x180053230 jz short loc_180053298 ; +0xb7, 0x180053237 movss xmm3, [rsp+0B8h+arg_4] ; +0xb9, 0x180053239 lea rdx, [rsp+0B8h+arg_8] ; +0xc2, 0x180053242 movss xmm1, [rsp+0B8h+arg_0] ; +0xca, 0x18005324a lea rcx, [rsp+0B8h+arg_0] ; +0xd3, 0x180053253 andps xmm3, cs:xmmword_1800EC5C0 ; +0xdb, 0x18005325b andps xmm1, cs:xmmword_1800EC5C0 ; +0xe2, 0x180053262 movss xmm2, cs:flt_1800EC208 ; +0xe9, 0x180053269 addss xmm3, xmm1 ; +0xf1, 0x180053271 divss xmm2, xmm3 ; +0xf5, 0x180053275 mulss xmm2, xmm8 ; +0xf9, 0x180053279 call ??DCCSize@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCSize::operator*(float) ; +0xfe, 0x18005327e lea rdx, [rsp+0B8h+arg_8] ; +0x103, 0x180053283 lea rcx, [rsp+0B8h+arg_0] ; +0x10b, 0x18005328b call ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x113, 0x180053293 cmp byte ptr [rbx+231h], 0 ; +0x118, 0x180053298 xorps xmm6, xmm6 ; +0x11f, 0x18005329f movss xmm1, cs:dword_1800EB878 ; +0x122, 0x1800532a2 xorps xmm0, xmm0 ; +0x12a, 0x1800532aa movzx eax, byte ptr [rbx+1A0h] ; +0x12d, 0x1800532ad xorps xmm9, xmm9 ; +0x134, 0x1800532b4 xorps xmm10, xmm10 ; +0x138, 0x1800532b8 xorps xmm7, xmm7 ; +0x13c, 0x1800532bc xorps xmm11, xmm11 ; +0x13f, 0x1800532bf xorps xmm12, xmm12 ; +0x143, 0x1800532c3 xorps xmm13, xmm13 ; +0x147, 0x1800532c7 xorps xmm14, xmm14 ; +0x14b, 0x1800532cb cvtsi2ss xmm0, eax ; +0x14f, 0x1800532cf movzx eax, byte ptr [rbx+1A2h] ; +0x153, 0x1800532d3 cvtsi2ss xmm9, eax ; +0x15a, 0x1800532da movzx eax, byte ptr [rbx+1A3h] ; +0x15f, 0x1800532df cvtsi2ss xmm10, eax ; +0x166, 0x1800532e6 movzx eax, byte ptr [rbx+1A4h] ; +0x16b, 0x1800532eb cvtsi2ss xmm11, eax ; +0x172, 0x1800532f2 movzx eax, byte ptr [rbx+226h] ; +0x177, 0x1800532f7 cvtsi2ss xmm6, eax ; +0x17e, 0x1800532fe movzx eax, byte ptr [rbx+223h] ; +0x182, 0x180053302 cvtsi2ss xmm12, eax ; +0x189, 0x180053309 movzx eax, byte ptr [rbx+224h] ; +0x18e, 0x18005330e cvtsi2ss xmm13, eax ; +0x195, 0x180053315 movzx eax, byte ptr [rbx+225h] ; +0x19a, 0x18005331a divss xmm0, xmm1 ; +0x1a1, 0x180053321 cvtsi2ss xmm14, eax ; +0x1a5, 0x180053325 movzx eax, byte ptr [rbx+227h] ; +0x1aa, 0x18005332a cvtsi2ss xmm7, eax ; +0x1b1, 0x180053331 mulss xmm6, xmm0 ; +0x1b5, 0x180053335 mulss xmm7, xmm0 ; +0x1b9, 0x180053339 divss xmm9, xmm1 ; +0x1bd, 0x18005333d divss xmm7, xmm1 ; +0x1c2, 0x180053342 divss xmm10, xmm1 ; +0x1c6, 0x180053346 divss xmm11, xmm1 ; +0x1cb, 0x18005334b divss xmm6, xmm1 ; +0x1d0, 0x180053350 divss xmm12, xmm1 ; +0x1d4, 0x180053354 divss xmm13, xmm1 ; +0x1d9, 0x180053359 divss xmm14, xmm1 ; +0x1de, 0x18005335e jz short loc_1800533AD ; +0x1e3, 0x180053363 movaps xmm0, xmm6 ; +0x1e5, 0x180053365 movaps xmm1, xmm6 ; +0x1e8, 0x180053368 mulss xmm0, xmm9 ; +0x1eb, 0x18005336b mulss xmm1, xmm10 ; +0x1f0, 0x180053370 movaps xmm9, xmm0 ; +0x1f5, 0x180053375 movaps xmm0, xmm6 ; +0x1f9, 0x180053379 mulss xmm0, xmm11 ; +0x1fc, 0x18005337c movaps xmm10, xmm1 ; +0x201, 0x180053381 movaps xmm1, xmm7 ; +0x205, 0x180053385 mulss xmm1, xmm12 ; +0x208, 0x180053388 movaps xmm11, xmm0 ; +0x20d, 0x18005338d movaps xmm0, xmm7 ; +0x211, 0x180053391 mulss xmm0, xmm13 ; +0x214, 0x180053394 movaps xmm12, xmm1 ; +0x219, 0x180053399 movaps xmm1, xmm7 ; +0x21d, 0x18005339d mulss xmm1, xmm14 ; +0x220, 0x1800533a0 movaps xmm13, xmm0 ; +0x225, 0x1800533a5 movaps xmm14, xmm1 ; +0x229, 0x1800533a9 movss xmm3, [rsp+0B8h+arg_4] ; +0x22d, 0x1800533ad subss xmm9, xmm12 ; +0x236, 0x1800533b6 movss xmm2, [rsp+0B8h+arg_0] ; +0x23b, 0x1800533bb subss xmm10, xmm13 ; +0x244, 0x1800533c4 movaps xmm4, xmm2 ; +0x249, 0x1800533c9 subss xmm11, xmm14 ; +0x24c, 0x1800533cc addss xmm4, xmm8 ; +0x251, 0x1800533d1 movaps xmm5, xmm8 ; +0x256, 0x1800533d6 addss xmm5, xmm8 ; +0x25a, 0x1800533da subss xmm8, xmm2 ; +0x25f, 0x1800533df subss xmm6, xmm7 ; +0x264, 0x1800533e4 movaps xmm1, xmm4 ; +0x268, 0x1800533e8 subss xmm4, xmm3 ; +0x26b, 0x1800533eb addss xmm1, xmm3 ; +0x26f, 0x1800533ef movaps xmm2, xmm8 ; +0x273, 0x1800533f3 subss xmm8, xmm3 ; +0x277, 0x1800533f7 addss xmm2, xmm3 ; +0x27c, 0x1800533fc divss xmm4, xmm5 ; +0x280, 0x180053400 divss xmm1, xmm5 ; +0x284, 0x180053404 divss xmm2, xmm5 ; +0x288, 0x180053408 movaps xmm0, xmm1 ; +0x28c, 0x18005340c mulss xmm0, xmm9 ; +0x28f, 0x18005340f divss xmm8, xmm5 ; +0x294, 0x180053414 addss xmm0, xmm12 ; +0x299, 0x180053419 movss dword ptr [rbx+1D8h], xmm0 ; +0x29e, 0x18005341e movaps xmm0, xmm10 ; +0x2a6, 0x180053426 mulss xmm0, xmm1 ; +0x2aa, 0x18005342a addss xmm0, xmm13 ; +0x2ae, 0x18005342e movss dword ptr [rbx+1DCh], xmm0 ; +0x2b3, 0x180053433 movaps xmm0, xmm11 ; +0x2bb, 0x18005343b mulss xmm0, xmm1 ; +0x2bf, 0x18005343f mulss xmm1, xmm6 ; +0x2c3, 0x180053443 addss xmm0, xmm14 ; +0x2c7, 0x180053447 addss xmm1, xmm7 ; +0x2cc, 0x18005344c movss dword ptr [rbx+1E0h], xmm0 ; +0x2d0, 0x180053450 movaps xmm0, xmm2 ; +0x2d8, 0x180053458 mulss xmm0, xmm9 ; +0x2db, 0x18005345b movss dword ptr [rbx+1E4h], xmm1 ; +0x2e0, 0x180053460 movaps xmm1, xmm2 ; +0x2e8, 0x180053468 mulss xmm1, xmm10 ; +0x2eb, 0x18005346b addss xmm0, xmm12 ; +0x2f0, 0x180053470 addss xmm1, xmm13 ; +0x2f5, 0x180053475 movss dword ptr [rbx+1E8h], xmm0 ; +0x2fa, 0x18005347a movaps xmm0, xmm2 ; +0x302, 0x180053482 mulss xmm0, xmm11 ; +0x305, 0x180053485 movss dword ptr [rbx+1ECh], xmm1 ; +0x30a, 0x18005348a movaps xmm1, xmm4 ; +0x312, 0x180053492 mulss xmm1, xmm10 ; +0x315, 0x180053495 addss xmm0, xmm14 ; +0x31a, 0x18005349a mulss xmm2, xmm6 ; +0x31f, 0x18005349f addss xmm1, xmm13 ; +0x323, 0x1800534a3 addss xmm2, xmm7 ; +0x328, 0x1800534a8 movss dword ptr [rbx+1F0h], xmm0 ; +0x32c, 0x1800534ac movaps xmm0, xmm4 ; +0x334, 0x1800534b4 mulss xmm0, xmm9 ; +0x337, 0x1800534b7 movss dword ptr [rbx+1F4h], xmm2 ; +0x33c, 0x1800534bc addss xmm0, xmm12 ; +0x344, 0x1800534c4 movss dword ptr [rbx+1F8h], xmm0 ; +0x349, 0x1800534c9 movaps xmm0, xmm4 ; +0x351, 0x1800534d1 movss dword ptr [rbx+1FCh], xmm1 ; +0x354, 0x1800534d4 movaps xmm1, xmm8 ; +0x35c, 0x1800534dc mulss xmm0, xmm11 ; +0x360, 0x1800534e0 mulss xmm4, xmm6 ; +0x365, 0x1800534e5 addss xmm0, xmm14 ; +0x369, 0x1800534e9 mulss xmm1, xmm10 ; +0x36e, 0x1800534ee addss xmm4, xmm7 ; +0x373, 0x1800534f3 addss xmm1, xmm13 ; +0x377, 0x1800534f7 movss dword ptr [rbx+200h], xmm0 ; +0x37c, 0x1800534fc movaps xmm0, xmm8 ; +0x384, 0x180053504 mulss xmm0, xmm9 ; +0x388, 0x180053508 movss dword ptr [rbx+204h], xmm4 ; +0x38d, 0x18005350d addss xmm0, xmm12 ; +0x395, 0x180053515 movss dword ptr [rbx+208h], xmm0 ; +0x39a, 0x18005351a movaps xmm0, xmm8 ; +0x3a2, 0x180053522 movss dword ptr [rbx+20Ch], xmm1 ; +0x3a6, 0x180053526 mulss xmm0, xmm11 ; +0x3ae, 0x18005352e mulss xmm8, xmm6 ; +0x3b3, 0x180053533 addss xmm0, xmm14 ; +0x3b8, 0x180053538 addss xmm8, xmm7 ; +0x3bd, 0x18005353d movss dword ptr [rbx+210h], xmm0 ; +0x3c2, 0x180053542 movss dword ptr [rbx+214h], xmm8 ; +0x3ca, 0x18005354a movaps xmm14, [rsp+0B8h+var_98] ; +0x3d3, 0x180053553 movaps xmm13, [rsp+0B8h+var_88] ; +0x3d9, 0x180053559 movaps xmm12, [rsp+0B8h+var_78] ; +0x3df, 0x18005355f movaps xmm11, [rsp+0B8h+var_68] ; +0x3e5, 0x180053565 movaps xmm10, [rsp+0B8h+var_58] ; +0x3eb, 0x18005356b movaps xmm9, [rsp+0B8h+var_48] ; +0x3f1, 0x180053571 movaps xmm8, [rsp+0B8h+var_38] ; +0x3f7, 0x180053577 movaps xmm7, [rsp+0B8h+var_28] ; +0x400, 0x180053580 mov rbx, [rsp+0B8h+arg_10] ; +0x408, 0x180053588 movaps xmm6, [rsp+0B8h+var_18] ; +0x410, 0x180053590 add rsp, 0B0h ; +0x418, 0x180053598 pop rdi ; +0x41f, 0x18005359f retn ; +0x420, 0x1800535a0