Function at 0x1010a490
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [ecx + 0x1c]
xorps xmm2, xmm2
mov dword [ebp - 0x48], eax
mov eax, dword [ecx + 0x20]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 8]
push esi
mov esi, edx
mov dword [ebp - 4], ecx
push edi
movss xmm1, dword [eax]
mov eax, 0x100
comiss xmm1, xmm2
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x1c], 1
movss dword [ebp - 0x24], xmm2
jbe 0x1010a51a
mov edi, dword [esi + 4]
mov edx, dword [esi + 0x1c]
cwde
movzx ecx, byte [edx + edi + 6]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edx + edi + 7]
movzx edx, byte [edx + edi + 5]
add cx, ax
movsx esi, cx
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 0x1c]
movzx ecx, byte [eax + edi + 4]
mov eax, 0x100
cwde
movsx ecx, cx
imul ecx, eax
add dx, cx
movsx eax, dx
sub eax, esi
movd xmm0, eax
jmp 0x1010a53a
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 4]
xorps xmm1, xmmword [0x1023da60]
movzx ecx, byte [edx + eax + 0x12]
movzx eax, byte [edx + eax + 0x13]
shl ecx, 8
add ecx, eax
movd xmm0, ecx
mov edx, dword [ebp + 8]
cvtdq2ps xmm0, xmm0
mov ecx, dword [ebp - 4]
movzx edi, byte [edx + 0x14]
mov eax, edi
shr eax, 0x1f
divss xmm1, xmm0
mov dword [ecx + 0x1c], edi
movzx esi, byte [edx + 0x15]
mov dword [ecx + 0x20], esi
movd xmm0, edi
cvtdq2pd xmm0, xmm0
movss dword [ebp - 0xc], xmm1
addsd xmm0, qword [eax*8 + 0x1023d960]
movss xmm1, dword [0x1023d120]
mov eax, esi
movaps xmm3, xmm1
shr eax, 0x1f
cvtpd2ps xmm0, xmm0
divss xmm3, xmm0
movd xmm0, esi
movss dword [ebp - 0x3c], xmm3
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1023d960]
mov eax, 1
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [ebp - 0x44], xmm1
test edi, edi
je 0x1010a5d1
movd xmm0, edi
sub eax, edi
cvtdq2ps xmm0, xmm0
movd xmm2, eax
mov eax, 1
cvtdq2ps xmm2, xmm2
addss xmm0, xmm0
divss xmm2, xmm0
movss dword [ebp - 0x20], xmm2
test esi, esi
je 0x1010a5f7
movd xmm0, esi
sub eax, esi
cvtdq2ps xmm0, xmm0
movd xmm1, eax
cvtdq2ps xmm1, xmm1
addss xmm0, xmm0
divss xmm1, xmm0
movss dword [ebp - 0x24], xmm1
xor esi, esi
mov dword [ebp - 0x28], esi
cmp dword [edx + 0xc], esi
jle 0x1010a965
mov edi, dword [ebp + 0x10]
add edi, 0xc
nop dword [eax + eax]
mov eax, dword [edi + 8]
test eax, eax
je 0x1010a8fb
cmp dword [edi - 8], 0
je 0x1010a8fb
cmp dword [edi - 4], 0
je 0x1010a8fb
lea eax, [esi*8]
sub eax, esi
mov dword [ebp - 0x34], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 8]
test eax, eax
jne 0x1010a64f
mov edx, dword [edx + 4]
add edx, esi
jmp 0x1010a652
mov edx, dword [eax + esi*4]
mov ecx, dword [ebp - 8]
call fcn.10105350
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov ecx, dword [esi + 0x14]
add dword [edi], ecx
add dword [edi + 4], ecx
sub dword [edi - 8], ecx
sub dword [edi - 4], ecx
mov eax, dword [edx + 0x1c]
mov ecx, dword [edx + 4]
mov esi, dword [edx + 4]
movzx ecx, byte [eax + ecx + 0x23]
movzx eax, byte [eax + esi + 0x22]
mov esi, dword [ebp - 4]
shl eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x30], eax
cmp ecx, eax
mov eax, dword [edx + 4]
jge 0x1010a6b7
lea edx, [eax + ecx*4]
mov eax, dword [ebp - 8]
add edx, dword [eax + 0x20]
mov eax, 0x100
cwde
movzx ecx, byte [edx]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edx + 1]
jmp 0x1010a6d9
mov ecx, dword [ebp - 0x30]
mov edx, dword [edx + 0x20]
lea esi, [eax + ecx*4]
mov eax, 0x100
movzx ecx, byte [esi + edx - 4]
cwde
movsx ecx, cx
imul ecx, eax
movzx eax, byte [esi + edx - 3]
mov esi, dword [ebp - 4]
add cx, ax
mov edx, dword [ebp - 0x10]
movzx eax, cx
cwde
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x50]
mov ecx, dword [ebp - 8]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [esi + 0x20]
sub esp, 8
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mov dword [esp + 4], 0
mov dword [esp], 0
addsd xmm0, qword [eax*8 + 0x1023d960]
mov eax, dword [esi + 0x1c]
cvtpd2ps xmm3, xmm0
movd xmm0, eax
mulss xmm3, dword [ebp - 0xc]
shr eax, 0x1f
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1023d960]
cvtpd2ps xmm2, xmm0
mulss xmm2, dword [ebp - 0xc]
call fcn.10107be0
mov ecx, dword [esi + 0x20]
add esp, 0x18
mov edx, dword [esi + 0x1c]
mov eax, ecx
shr eax, 0x1f
mov esi, dword [esi + 0x10]
push dword [ebp - 0x10]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
sub esp, 0x10
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
addsd xmm0, qword [eax*8 + 0x1023d960]
mov eax, edx
shr eax, 0x1f
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0xc]
movss dword [esp + 4], xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1023d960]
mov eax, dword [edi - 4]
sub eax, ecx
mov ecx, dword [ebp - 8]
inc eax
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0xc]
movss dword [esp], xmm0
push esi
push eax
mov eax, dword [edi - 8]
sub eax, edx
mov edx, dword [edi + 4]
imul edx, esi
inc eax
mov esi, dword [ebp - 4]
push eax
add edx, dword [edi]
add edx, dword [esi + 0x24]
call fcn.10109d70
mov ecx, dword [esi + 0x1c]
add esp, 0x20
cmp ecx, 1
jbe 0x1010a809
mov eax, dword [esi + 0x10]
mov edx, dword [edi - 8]
push ecx
mov ecx, dword [edi + 4]
imul ecx, eax
push eax
push dword [edi - 4]
add ecx, dword [edi]
add ecx, dword [esi + 0x24]
call fcn.1010a000
add esp, 0xc
mov ecx, dword [esi + 0x20]
cmp ecx, 1
jbe 0x1010a82f
mov eax, dword [esi + 0x10]
mov edx, dword [edi - 8]
push ecx
mov ecx, dword [edi + 4]
imul ecx, eax
push eax
push dword [edi - 4]
add ecx, dword [edi]
add ecx, dword [esi + 0x24]
call fcn.1010a230
add esp, 0xc
mov esi, dword [ebp - 0x34]
movzx eax, word [edi]
mov edx, dword [ebp - 0x18]
movd xmm0, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
cvtdq2ps xmm0, xmm0
mov word [edx + esi*4], ax
movzx eax, word [edi + 4]
mov word [edx + esi*4 + 2], ax
movzx eax, word [edi]
add ax, word [edi - 8]
mulss xmm0, dword [ebp - 0xc]
mov word [edx + esi*4 + 4], ax
movzx eax, word [edi + 4]
add ax, word [edi - 4]
movss dword [edx + esi*4 + 0x10], xmm0
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
mov word [edx + esi*4 + 6], ax
mov eax, dword [ebp - 0x18]
mulss xmm0, dword [ebp - 0x3c]
addss xmm0, dword [ebp - 0x20]
movss dword [edx + esi*4 + 8], xmm0
mov edx, dword [ebp - 0x40]
movd xmm0, edx
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x44]
addss xmm0, dword [ebp - 0x24]
movss dword [eax + esi*4 + 0xc], xmm0
mov eax, dword [edi - 8]
add eax, ecx
mov ecx, dword [ebp - 0x18]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x3c]
addss xmm0, dword [ebp - 0x20]
movss dword [ecx + esi*4 + 0x14], xmm0
mov eax, dword [edi - 4]
add eax, edx
cmp dword [ebp - 0x10], 0
mov edx, dword [ebp + 8]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x44]
addss xmm0, dword [ebp - 0x24]
movss dword [ecx + esi*4 + 0x18], xmm0
mov esi, dword [ebp - 0x28]
mov eax, esi
cmovne eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x14], eax
jmp 0x1010a955
cmp dword [ecx + 0x18], 0
jne 0x1010a94e
test eax, eax
je 0x1010a94e
cmp dword [edi - 8], 0
jne 0x1010a94e
cmp dword [edi - 4], 0
jne 0x1010a94e
mov eax, dword [ebp - 0x14]
test eax, eax
js 0x1010a94e
mov edx, dword [edx + 0x10]
lea ecx, [esi*8]
shl eax, 3
sub eax, dword [ebp - 0x14]
sub ecx, esi
movups xmm0, xmmword [edx + eax*4]
movups xmmword [edx + ecx*4], xmm0
movq xmm0, qword [edx + eax*4 + 0x10]
movq qword [edx + ecx*4 + 0x10], xmm0
mov eax, dword [edx + eax*4 + 0x18]
mov dword [edx + ecx*4 + 0x18], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
jmp 0x1010a955
mov dword [ebp - 0x1c], 0
inc esi
add edi, 0x18
mov dword [ebp - 0x28], esi
cmp esi, dword [edx + 0xc]
jl 0x1010a610
mov eax, dword [ebp - 0x48]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0x4c]
pop edi
mov dword [ecx + 0x20], eax
mov eax, dword [ebp - 0x1c]
pop esi
mov esp, ebp
pop ebp
ret