; ; GJEffectManager::calculateLightBGColor from 0x1402639f0 to 0x140263bea (506 bytes) ; ; 6 xrefs: ; > LevelEditorLayer::updateVisibility @ 0x1402d9031 ; > LevelEditorLayer::transferDefaultColors @ 0x1402dc0eb ; > LevelEditorLayer::updateGameObjects @ 0x1402dc8c5 ; > LevelEditorLayer::postUpdate @ 0x1402e0fb7 ; > PlayLayer::updateVisibility @ 0x1403af47f ; > @ 0x1406d0140 ; ; 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_0], rbx ; +0x0, 0x1402639f0 push rbp ; +0x5, 0x1402639f5 push rsi ; +0x6, 0x1402639f6 push rdi ; +0x7, 0x1402639f7 push r14 ; +0x8, 0x1402639f8 push r15 ; +0xa, 0x1402639fa sub rsp, 60h ; +0xc, 0x1402639fc mov r15, rdx ; +0x10, 0x140263a00 movaps [rsp+88h+var_38], xmm6 ; +0x13, 0x140263a03 mov edx, 3E8h ; +0x18, 0x140263a08 mov r14, rcx ; +0x1d, 0x140263a0d call GJEffectManager__getColorSprite ; +0x20, 0x140263a10 test rax, rax ; +0x25, 0x140263a15 jz short loc_140263A2A ; +0x28, 0x140263a18 movzx ebx, word ptr [rax+147h] ; +0x2a, 0x140263a1a movzx edi, byte ptr [rax+149h] ; +0x31, 0x140263a21 jmp short loc_140263A38 ; +0x38, 0x140263a28 movzx ebx, cs:word_140529AB0 ; +0x3a, 0x140263a2a movzx edi, cs:byte_140529AB2 ; +0x41, 0x140263a31 mov word ptr [rsp+88h+var_3C], 101h ; +0x48, 0x140263a38 lea r8, [rsp+88h+var_58] ; +0x4f, 0x140263a3f movss xmm0, [rsp+88h+var_3C] ; +0x54, 0x140263a44 lea rdx, [rsp+88h+arg_10] ; +0x5a, 0x140263a4a lea rcx, [rsp+88h+arg_18] ; +0x62, 0x140263a52 movss [rsp+88h+var_4C], xmm0 ; +0x6a, 0x140263a5a mov [rsp+88h+arg_12], dil ; +0x70, 0x140263a60 xorps xmm6, xmm6 ; +0x78, 0x140263a68 mov [rsp+88h+arg_10], bx ; +0x7b, 0x140263a6b mov [rsp+88h+var_58], 0 ; +0x83, 0x140263a73 mov [rsp+88h+var_54], 0BE4CCCCDh ; +0x8b, 0x140263a7b mov [rsp+88h+var_50], 3E4CCCCDh ; +0x93, 0x140263a83 call GameToolbox__transformColor ; +0x9b, 0x140263a8b movzx eax, byte ptr [rsp+88h+arg_10+1] ; +0xa0, 0x140263a90 movss xmm0, cs:dword_140623358 ; +0xa8, 0x140263a98 movzx esi, [rsp+88h+arg_18] ; +0xb0, 0x140263aa0 movzx ebp, [rsp+88h+arg_1A] ; +0xb8, 0x140263aa8 movzx ecx, dil ; +0xc0, 0x140263ab0 add ecx, eax ; +0xc4, 0x140263ab4 mov [rsp+88h+var_68], si ; +0xc6, 0x140263ab6 movzx eax, bl ; +0xcb, 0x140263abb add ecx, eax ; +0xce, 0x140263abe movd xmm5, ecx ; +0xd0, 0x140263ac0 cvtdq2ps xmm5, xmm5 ; +0xd4, 0x140263ac4 comiss xmm0, xmm5 ; +0xd7, 0x140263ac7 jbe loc_140263B9B ; +0xda, 0x140263aca movzx ecx, word ptr [r15] ; +0xe0, 0x140263ad0 xorps xmm3, xmm3 ; +0xe4, 0x140263ad4 movss xmm1, cs:flt_140622C24 ; +0xe7, 0x140263ad7 xorps xmm4, xmm4 ; +0xef, 0x140263adf divss xmm5, xmm0 ; +0xf2, 0x140263ae2 movzx eax, sil ; +0xf6, 0x140263ae6 mov [rsp+88h+arg_10], cx ; +0xfa, 0x140263aea xorps xmm0, xmm0 ; +0x102, 0x140263af2 xorps xmm2, xmm2 ; +0x105, 0x140263af5 cvtsi2ss xmm3, eax ; +0x108, 0x140263af8 movzx eax, cl ; +0x10c, 0x140263afc subss xmm1, xmm5 ; +0x10f, 0x140263aff cvtsi2ss xmm0, eax ; +0x113, 0x140263b03 movzx eax, byte ptr [rsp+88h+arg_18+1] ; +0x117, 0x140263b07 cvtsi2ss xmm2, eax ; +0x11f, 0x140263b0f movzx eax, byte ptr [rsp+88h+arg_10+1] ; +0x123, 0x140263b13 mulss xmm0, xmm1 ; +0x12b, 0x140263b1b cvtsi2ss xmm4, ebp ; +0x12f, 0x140263b1f mulss xmm3, xmm5 ; +0x133, 0x140263b23 mulss xmm4, xmm5 ; +0x137, 0x140263b27 addss xmm3, xmm0 ; +0x13b, 0x140263b2b mulss xmm2, xmm5 ; +0x13f, 0x140263b2f xorps xmm0, xmm0 ; +0x143, 0x140263b33 cvtsi2ss xmm0, eax ; +0x146, 0x140263b36 movzx eax, byte ptr [r15+2] ; +0x14a, 0x140263b3a mulss xmm0, xmm1 ; +0x14f, 0x140263b3f addss xmm2, xmm0 ; +0x153, 0x140263b43 xorps xmm0, xmm0 ; +0x157, 0x140263b47 cvtsi2ss xmm0, eax ; +0x15a, 0x140263b4a mulss xmm0, xmm1 ; +0x15e, 0x140263b4e movss xmm1, cs:dword_140623418 ; +0x162, 0x140263b52 addss xmm4, xmm0 ; +0x16a, 0x140263b5a minss xmm4, xmm1 ; +0x16e, 0x140263b5e comiss xmm6, xmm4 ; +0x172, 0x140263b62 jbe short loc_140263B6A ; +0x175, 0x140263b65 xorps xmm4, xmm4 ; +0x177, 0x140263b67 minss xmm2, xmm1 ; +0x17a, 0x140263b6a comiss xmm6, xmm2 ; +0x17e, 0x140263b6e jbe short loc_140263B76 ; +0x181, 0x140263b71 xorps xmm2, xmm2 ; +0x183, 0x140263b73 minss xmm3, xmm1 ; +0x186, 0x140263b76 comiss xmm6, xmm3 ; +0x18a, 0x140263b7a ja short loc_140263B82 ; +0x18d, 0x140263b7d movaps xmm6, xmm3 ; +0x18f, 0x140263b7f cvttss2si eax, xmm6 ; +0x192, 0x140263b82 cvttss2si ebp, xmm4 ; +0x196, 0x140263b86 mov byte ptr [rsp+88h+var_68], al ; +0x19a, 0x140263b8a cvttss2si eax, xmm2 ; +0x19e, 0x140263b8e mov byte ptr [rsp+88h+var_68+1], al ; +0x1a2, 0x140263b92 movzx esi, [rsp+88h+var_68] ; +0x1a6, 0x140263b96 mov edx, 3EFh ; +0x1ab, 0x140263b9b mov rcx, r14 ; +0x1b0, 0x140263ba0 call GJEffectManager__getColorSprite ; +0x1b3, 0x140263ba3 mov edx, 3EFh ; +0x1b8, 0x140263ba8 mov rcx, r14 ; +0x1bd, 0x140263bad mov [rax+144h], si ; +0x1c0, 0x140263bb0 mov [rax+146h], bpl ; +0x1c7, 0x140263bb7 call GJEffectManager__getColorSprite ; +0x1ce, 0x140263bbe mov rbx, [rsp+88h+arg_0] ; +0x1d3, 0x140263bc3 movaps xmm6, [rsp+88h+var_38] ; +0x1db, 0x140263bcb mov [rax+147h], si ; +0x1e0, 0x140263bd0 mov [rax+149h], bpl ; +0x1e7, 0x140263bd7 add rsp, 60h ; +0x1ee, 0x140263bde pop r15 ; +0x1f2, 0x140263be2 pop r14 ; +0x1f4, 0x140263be4 pop rdi ; +0x1f6, 0x140263be6 pop rsi ; +0x1f7, 0x140263be7 pop rbp ; +0x1f8, 0x140263be8 retn ; +0x1f9, 0x140263be9