Function at 0x10041847
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
push ecx
push ecx
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x60
mov eax, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebx + 8]
push esi
push edi
movss xmm0, dword [eax]
comiss xmm0, dword [ecx]
mov dword [ebp - 8], eax
jae 0x10041de6
movss xmm0, dword [eax + 4]
comiss xmm0, dword [ecx + 4]
jae 0x10041de6
mov edi, dword [ebx + 0x18]
lea esi, [edi + 4]
mov eax, esi
shl eax, 3
call fcn.100d1360
mov eax, dword [ebx + 8]
mov ecx, esp
mov dword [ebp - 0x18], ecx
mov edx, edi
push dword [eax + 4]
push dword [eax]
mov eax, dword [ebp - 8]
push dword [eax + 4]
push dword [eax]
push esi
push ecx
mov ecx, dword [ebx + 0x14]
call fcn.100414b0
add esp, 0x18
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x100418ec
mov ecx, dword [ebp - 0x10]
push 4
push 6
call fcn.1003ee9a
push dword [ebx + 0x1c]
mov ecx, dword [ebx + 8]
push dword [ebx + 0x10]
push dword [ebx + 0xc]
push ecx
push dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
call fcn.1003f050
jmp 0x10041de6
mov edi, dword [ebp - 0x10]
lea ecx, [eax + 4]
imul eax, ecx, 3
push ecx
mov ecx, edi
push eax
mov dword [ebp - 0x40], eax
call fcn.1003ee9a
mov eax, dword [edi + 0x34]
mov esi, dword [ebx + 8]
mov ecx, dword [ebp - 8]
mov dword [ebp - 4], eax
movzx eax, word [edi + 0x28]
movss xmm0, dword [esi]
subss xmm0, dword [ecx]
mov dword [ebp - 0x28], eax
movzx eax, ax
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 0xc]
mov edx, dword [edi + 0x38]
mov dword [ebp - 0x2c], edx
movss xmm4, dword [eax]
movss xmm5, dword [eax + 4]
mov eax, dword [ebx + 0x10]
movss xmm2, dword [eax]
movss xmm3, dword [eax + 4]
subss xmm2, xmm4
subss xmm3, xmm5
mov eax, dword [ebp - 0xc]
divss xmm2, xmm0
movss xmm0, dword [esi + 4]
subss xmm0, dword [ecx + 4]
divss xmm4, xmm2
divss xmm3, xmm0
subss xmm4, dword [ecx]
divss xmm5, xmm3
subss xmm5, dword [ecx + 4]
test eax, eax
jle 0x100419c2
mov edi, dword [ebp - 4]
mov edx, eax
mov esi, dword [ebp - 0x18]
add edi, 0x10
mov eax, dword [esi]
movaps xmm1, xmm4
mov ecx, dword [esi + 4]
movaps xmm0, xmm5
mov dword [edi - 0x10], eax
mov eax, dword [ebx + 0x1c]
mov dword [edi - 0xc], ecx
addss xmm1, dword [esi]
addss xmm0, dword [esi + 4]
mov dword [edi], eax
add esi, 8
mulss xmm1, xmm2
mulss xmm0, xmm3
movss dword [edi - 8], xmm1
movss dword [edi - 4], xmm0
add edi, 0x14
sub edx, 1
jne 0x1004197d
mov ecx, dword [ebp - 8]
mov esi, dword [ebx + 8]
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
xorps xmm7, xmm7
imul eax, eax, 0x14
mov dword [ebp - 0x14], 4
add dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x28]
movzx eax, ax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x60]
dec dword [ebp - 0x14]
and dword [eax], 0
lea eax, [eax + 8]
and dword [eax - 4], 0
cmp dword [ebp - 0x14], 0
ja 0x100419e4
movss xmm1, dword [esi]
movss xmm0, dword [esi + 4]
movss xmm2, dword [ecx + 4]
movss xmm3, dword [ecx]
mov esi, dword [ebp - 4]
mov eax, dword [ebx + 0xc]
movss dword [ebp - 0x58], xmm1
movss dword [ebp - 0x50], xmm1
movss dword [ebp - 0x4c], xmm0
movss dword [ebp - 0x44], xmm0
movss dword [ebp - 0x54], xmm2
movss dword [ebp - 0x5c], xmm2
movss dword [ebp - 0x48], xmm3
movss dword [ebp - 0x60], xmm3
movss dword [esi], xmm3
movss dword [esi + 4], xmm2
movss xmm0, dword [eax]
movss xmm1, dword [eax + 4]
mov eax, dword [ebx + 0x1c]
mov dword [esi + 0x10], eax
movss dword [esi + 0xc], xmm1
movss dword [esi + 8], xmm0
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
mov dword [esi + 0x14], eax
mov eax, dword [ebx + 0x10]
mov dword [esi + 0x18], ecx
movss xmm0, dword [eax]
mov eax, dword [ebx + 0xc]
movss xmm1, dword [eax + 4]
mov eax, dword [ebx + 0x1c]
mov dword [esi + 0x24], eax
movss dword [esi + 0x20], xmm1
movss dword [esi + 0x1c], xmm0
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x4c]
mov dword [esi + 0x28], eax
mov eax, dword [ebx + 0x10]
mov dword [esi + 0x2c], ecx
movss xmm0, dword [eax]
movss xmm1, dword [eax + 4]
mov eax, dword [ebx + 0x1c]
mov dword [esi + 0x38], eax
movss dword [esi + 0x34], xmm1
movss dword [esi + 0x30], xmm0
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
mov dword [esi + 0x3c], eax
mov eax, dword [ebx + 0xc]
mov dword [esi + 0x40], ecx
mov ecx, dword [ebp - 0xc]
movss xmm0, dword [eax]
mov eax, dword [ebx + 0x10]
movss xmm1, dword [eax + 4]
mov eax, dword [ebx + 0x1c]
mov dword [esi + 0x4c], eax
lea eax, [ecx + 4]
movss dword [esi + 0x48], xmm1
movss dword [esi + 0x44], xmm0
lea esi, [ecx - 1]
add dword [edi + 0x28], eax
lea eax, [ecx + 4]
imul eax, eax, 0x14
mov dword [ebp - 0x1c], esi
add dword [edi + 0x34], eax
or edx, 0xffffffff
mov eax, dword [ebp - 0x18]
mov esi, edx
movss xmm0, dword [eax + ecx*8 - 8]
movss xmm2, dword [eax + 4]
movss xmm1, dword [eax + 0x14]
movss xmm5, dword [eax + ecx*8 - 4]
subss xmm1, xmm2
subss xmm2, dword [eax + 0xc]
movss dword [ebp - 0x14], xmm0
movss xmm0, dword [eax + 0xc]
subss xmm0, dword [eax + 0x14]
mulss xmm1, dword [eax + 8]
mulss xmm2, dword [eax + 0x10]
mulss xmm0, dword [eax]
addss xmm1, xmm0
xor edx, edx
addss xmm1, xmm2
inc edx
comiss xmm7, xmm1
cmova edx, esi
and dword [ebp - 0x20], 0
mov dword [ebp - 0x38], edx
mov edx, dword [ebp - 0x2c]
test ecx, ecx
jle 0x10041dca
movss xmm6, dword [0x10184fd0]
mov edi, esi
mov dword [ebp - 0x3c], 3
movss xmm0, dword [eax]
movss xmm4, dword [eax + 4]
movaps xmm3, xmm0
subss xmm3, dword [ebp - 0x14]
xor eax, eax
movss dword [ebp - 0x34], xmm0
movaps xmm2, xmm4
mov dword [ebp - 4], edi
subss xmm2, xmm5
xorps xmm3, xmmword [0x10185000]
comiss xmm3, xmm7
movaps xmm0, xmm3
movaps xmm1, xmm2
andps xmm0, xmm6
andps xmm1, xmm6
seta al
xor ecx, ecx
inc eax
comiss xmm3, xmm7
cmova ecx, dword [ebp - 0x3c]
comiss xmm2, xmm7
cmovae ecx, eax
xor eax, eax
comiss xmm2, xmm7
mov dword [ebp - 0x2c], ecx
setbe al
xor ecx, ecx
add eax, 2
comiss xmm2, xmm7
seta cl
comiss xmm3, xmm7
movss xmm3, dword [ebp - 0x34]
cmovae ecx, eax
comiss xmm1, xmm0
mov eax, ecx
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0x1c]
movzx ecx, cx
mov dword [ebp - 0x1c], ecx
movaps xmm1, xmm4
cmova eax, dword [ebp - 0x2c]
mov dword [ebp - 8], eax
movss xmm0, dword [ebp + eax*8 - 0x5c]
subss xmm1, xmm0
subss xmm0, xmm5
mulss xmm1, dword [ebp - 0x14]
mulss xmm0, xmm3
addss xmm1, xmm0
movaps xmm0, xmm5
subss xmm0, xmm4
mulss xmm0, dword [ebp + eax*8 - 0x60]
addss xmm1, xmm0
movss xmm0, dword [0x10184ba4]
andps xmm1, xmm6
comiss xmm0, xmm1
ja 0x10041c4c
mov eax, ecx
add eax, dword [ebp - 0x28]
mov word [edx], ax
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x28]
mov word [edx + 2], ax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x24]
mov word [edx + 4], ax
add edx, 6
mov eax, dword [ebp - 8]
movzx ecx, cx
mov dword [ebp - 0x2c], ecx
or ecx, 0xffffffff
cmp edi, ecx
jne 0x10041c65
mov edi, eax
mov esi, eax
mov dword [ebp - 4], edi
jmp 0x10041d18
mov ecx, dword [ebp - 4]
mov edi, ecx
mov dword [ebp - 4], edi
cmp eax, esi
je 0x10041d18
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x30]
movss xmm7, dword [0x10184ba4]
movss xmm3, dword [ebp - 0x14]
mov edi, dword [ebp - 0x24]
movzx eax, ax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x38]
movaps xmm1, xmm5
movss xmm2, dword [ebp + esi*8 - 0x5c]
add ecx, esi
push 3
pop eax
and ecx, eax
subss xmm1, xmm2
movss xmm0, dword [ebp + ecx*8 - 0x5c]
mulss xmm1, dword [ebp + ecx*8 - 0x60]
subss xmm0, xmm5
subss xmm2, dword [ebp + ecx*8 - 0x5c]
mulss xmm0, dword [ebp + esi*8 - 0x60]
mulss xmm2, xmm3
addss xmm1, xmm0
addss xmm1, xmm2
andps xmm1, xmm6
comiss xmm7, xmm1
ja 0x10041cf7
lea eax, [esi + edi]
mov esi, dword [ebp - 0x2c]
mov word [edx], ax
lea eax, [ecx + edi]
mov word [edx + 2], ax
movzx eax, si
mov word [edx + 4], ax
add edx, 6
jmp 0x10041d00
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x30]
movzx eax, ax
mov esi, ecx
movzx eax, ax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 8], ecx
jne 0x10041c94
movss xmm3, dword [ebp - 0x34]
xorps xmm7, xmm7
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
movaps xmm5, xmm4
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
add eax, 8
inc ecx
movss dword [ebp - 0x14], xmm3
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], eax
cmp ecx, dword [ebp - 0xc]
jl 0x10041b67
or eax, 0xffffffff
cmp edi, eax
mov edi, dword [ebp - 0x10]
je 0x10041dca
mov eax, dword [ebp - 4]
cmp eax, esi
je 0x10041dca
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x38]
movaps xmm1, xmm4
movss xmm2, dword [ebp + esi*8 - 0x5c]
add ecx, esi
and ecx, 3
subss xmm1, xmm2
movss xmm0, dword [ebp + ecx*8 - 0x5c]
mulss xmm1, dword [ebp + ecx*8 - 0x60]
subss xmm0, xmm4
subss xmm2, dword [ebp + ecx*8 - 0x5c]
mulss xmm0, dword [ebp + esi*8 - 0x60]
mulss xmm2, xmm3
addss xmm1, xmm0
movss xmm0, dword [0x10184ba4]
addss xmm1, xmm2
andps xmm1, xmm6
comiss xmm0, xmm1
ja 0x10041dc1
lea eax, [esi + edi]
mov word [edx], ax
lea eax, [ecx + edi]
mov word [edx + 2], ax
mov eax, dword [ebp - 0x1c]
movzx eax, ax
add eax, dword [ebp - 0x28]
mov word [edx + 4], ax
add edx, 6
mov eax, dword [ebp - 4]
mov esi, ecx
cmp eax, ecx
jne 0x10041d54
mov edi, dword [ebp - 0x10]
imul ecx, dword [edi], 0x28
mov eax, edx
sub eax, dword [edi + 0x38]
mov dword [edi + 0x38], edx
mov edx, dword [ebp - 0x40]
sar eax, 1
sub edx, eax
mov eax, dword [edi + 8]
sub dword [eax + ecx - 0xc], edx
sub dword [edi + 0xc], edx
lea esp, [ebp - 0x68]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret