Function at 0x1009a210
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [0x10159470]
sub esp, 0x44
push ebx
push esi
push edi
test ecx, ecx
je 0x1009a6b9
cmp byte [0x100c2e98], 0
je 0x1009a6b9
cmp byte [0x10159474], 0
jne 0x1009a25d
mov eax, dword [0x10154b00]
cmp eax, dword [0x10154b04]
je 0x1009a6b9
mov dword [0x10154b04], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x10154b04]
sub edx, dword [0x10154b00]
sar edx, 5
mov dword [esp + 0x48], edx
test edx, edx
je 0x1009a6b9
mov eax, dword [0x10153f04]
mov ebx, edx
add eax, 0xffffffb8
xor eax, 0xc528b56a
shl ebx, 5
movd xmm2, dword [eax + ecx]
mov ecx, edx
mov eax, dword [0x10153c88]
cvtdq2ps xmm2, xmm2
mulss xmm2, dword [eax + 0x20]
movss dword [esp + 0x14], xmm2
sub ebx, 0x20
mov edi, ecx
dec ecx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0xc], ecx
add ebx, dword [0x10154b00]
je 0x1009a6a9
mov esi, dword [ebx + 0x18]
movaps xmm0, xmm2
mov eax, dword [0x10153c88]
movd xmm1, esi
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [eax + 0x20]
subss xmm0, xmm1
call fcn.10019f60
comiss xmm0, dword [0x100c3044]
jbe 0x1009a357
mov edi, dword [0x10154b04]
lea esi, [ebx + 0x20]
cmp esi, edi
je 0x1009a34b
lea ecx, [ebx + 0x14]
lea edx, [ebx + 0x34]
nop word [eax + eax]
mov eax, dword [esi]
lea ebx, [ebx + 0x20]
mov dword [ebx - 0x20], eax
lea ecx, [ecx + 0x20]
mov eax, dword [edx - 0x10]
lea edx, [edx + 0x20]
mov dword [ecx - 0x30], eax
add esi, 0x20
mov eax, dword [edx - 0x2c]
mov dword [ecx - 0x2c], eax
mov eax, dword [edx - 0x28]
mov dword [ecx - 0x28], eax
mov eax, dword [edx - 0x24]
mov dword [ecx - 0x24], eax
mov eax, dword [edx - 0x20]
mov dword [ecx - 0x20], eax
mov eax, dword [edx - 0x1c]
mov dword [ecx - 0x1c], eax
movzx eax, byte [edx - 0x18]
mov byte [ecx - 0x18], al
movzx eax, byte [edx - 0x17]
mov byte [ecx - 0x17], al
cmp esi, edi
jne 0x1009a300
mov ecx, dword [esp + 0xc]
sub dword [0x10154b04], 0x20
jmp 0x1009a6a9
cmp byte [ebx + 0x1c], 0
jne 0x1009a6a9
lea eax, [edx - 1]
cmp ecx, eax
je 0x1009a379
cmp edi, edx
jae 0x1009a6a9
cmp esi, dword [ebx + 0x38]
je 0x1009a6a9
movss xmm6, dword [ebx + 0xc]
movss xmm7, dword [ebx + 0x10]
movss xmm3, dword [ebx]
movss xmm4, dword [ebx + 4]
subss xmm3, xmm6
movss xmm0, dword [ebx + 0x14]
subss xmm4, xmm7
movss xmm5, dword [ebx + 8]
subss xmm5, xmm0
movss dword [esp + 0x1c], xmm0
movss dword [esp + 0x28], xmm6
movaps xmm1, xmm3
movss dword [esp + 0x2c], xmm7
movaps xmm0, xmm4
mulss xmm1, xmm3
mulss xmm0, xmm4
addss xmm0, xmm1
movaps xmm1, xmm5
mulss xmm1, xmm5
addss xmm0, xmm1
call fcn.10019f90
movaps xmm2, xmm0
movaps xmm1, xmm3
addss xmm2, dword [0x100b0e80]
movaps xmm0, xmm4
mulss xmm1, xmm3
mulss xmm0, xmm4
addss xmm0, xmm1
movaps xmm1, xmm5
mulss xmm1, xmm5
addss xmm0, xmm1
call fcn.10019f90
divss xmm3, xmm2
mov ecx, dword [0x10153c64]
push str.sprites_purplelaser1.vmt
mov eax, dword [ecx]
mov eax, dword [eax + 8]
divss xmm4, xmm2
divss xmm5, xmm2
mulss xmm3, xmm0
mulss xmm4, xmm0
mulss xmm5, xmm0
movaps xmm0, xmm3
addss xmm0, xmm6
movss dword [esp + 0x40], xmm3
movss dword [esp + 0x44], xmm4
movss dword [esp + 0x48], xmm5
movss dword [esp + 0x34], xmm0
movaps xmm0, xmm4
addss xmm0, xmm7
movss dword [esp + 0x38], xmm0
movaps xmm0, xmm5
addss xmm0, dword [esp + 0x20]
movss dword [esp + 0x3c], xmm0
call eax
cmp byte [ebx + 0x1d], 0
movss xmm0, dword [0x100c3044]
mov dword [esp + 0x18], eax
movss dword [esp + 0x24], xmm0
jne 0x1009a48e
movzx edx, word [0x100c2f3e]
mov eax, dword [0x100c2f3c]
jmp 0x1009a49a
movzx edx, word [0x100c2fce]
mov eax, dword [0x100c2fcc]
mov ecx, eax
movzx edi, dl
shr ecx, 8
movzx eax, al
movzx esi, cl
mov ecx, dword [0x10153cb8]
push 1
mov dword [esp + 0x24], eax
call dword [0x10153de0]
mov dword [esp + 0x10], eax
test eax, eax
je 0x1009a69f
mov ecx, dword [0x10153c88]
mov edx, dword [esp + 0x18]
mov ecx, dword [ecx + 0x10]
mov dword [eax + 0xc8], ecx
test edx, edx
js 0x1009a69f
mov ecx, dword [0x10153c64]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov edx, eax
test edx, edx
je 0x1009a646
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push edx
mov dword [eax + 0x30], 0
mov dword [eax + 0x150], ecx
mov dword [eax + 0x154], 0xffffffff
mov dword [eax + 0x158], 0
mov dword [eax + 0xf8], 0
mov dword [eax + 0xf4], 0
mov ecx, dword [0x10153c64]
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
call eax
mov edx, dword [esp + 0x10]
movss xmm1, dword [esp + 0x24]
mov dword [edx + 0x15c], eax
mov eax, dword [0x10153c88]
movss xmm0, dword [eax + 0x10]
mulss xmm0, dword [0x100b0f44]
movss dword [edx + 0xc4], xmm0
movaps xmm0, xmm1
mov eax, dword [0x10153c88]
addss xmm0, dword [eax + 0x10]
mov dword [edx + 0xd8], 0
mov dword [edx + 0x34], 0
mov dword [edx + 0xcc], 0x40000000
mov dword [edx + 0xd0], 0x40000000
movss dword [edx + 0xc8], xmm0
movss xmm0, dword [esp + 0x28]
movss dword [edx + 0x3c], xmm0
movss xmm0, dword [esp + 0x2c]
movss dword [edx + 0x40], xmm0
movss xmm0, dword [esp + 0x1c]
movss dword [edx + 0x44], xmm0
movss xmm0, dword [esp + 0x30]
movss dword [edx + 0x48], xmm0
movss xmm0, dword [esp + 0x34]
movss dword [edx + 0x4c], xmm0
movss xmm0, dword [esp + 0x38]
movss dword [edx + 0x50], xmm0
movss xmm0, dword [esp + 0x3c]
movss dword [edx + 0xb4], xmm0
movss xmm0, dword [esp + 0x40]
movss dword [edx + 0xb8], xmm0
movss xmm0, dword [esp + 0x44]
movss dword [edx + 0xbc], xmm0
mov dword [edx + 0xd4], 0
mov dword [edx + 0xec], 0x437f0000
mov dword [edx + 0xf0], 0x3f000000
movss dword [edx + 0xdc], xmm1
mov dword [edx + 0xfc], 2
jmp 0x1009a64a
mov edx, dword [esp + 0x10]
movd xmm0, dword [esp + 0x20]
cvtdq2ps xmm0, xmm0
mov dword [edx + 0xf8], 0
mov dword [edx + 0xf4], 0
push edx
movss dword [edx + 0xe0], xmm0
movd xmm0, esi
cvtdq2ps xmm0, xmm0
movss dword [edx + 0xe4], xmm0
movd xmm0, edi
cvtdq2ps xmm0, xmm0
movss dword [edx + 0xe8], xmm0
mov ecx, dword [0x10153cb8]
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
mov byte [ebx + 0x1c], 1
movss xmm2, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
test ecx, ecx
jne 0x1009a2a4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret