Function at 0x1003cfb0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x38
mov eax, ecx
xor ecx, ecx
push esi
mov esi, edx
mov dword [ebp - 0xc], eax
push edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], ecx
cmp dword [ebx + 0xc], ecx
jle 0x1003d28b
mov cl, byte [eax + 0x18]
xorps xmm0, xmm0
mov edi, dword [ebx + 8]
mov al, byte [eax + 0x1c]
add edi, 0x14
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], edi
nop dword [eax + eax]
movss xmm1, dword [edi - 0x14]
mov eax, 0x100
comiss xmm1, xmm0
jbe 0x1003d053
mov edi, dword [esi + 0x1c]
mov esi, dword [esi + 4]
cwde
movzx ecx, byte [edi + esi + 4]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 5]
add cx, ax
mov eax, 0x100
movsx edx, cx
movzx ecx, byte [edi + esi + 6]
cwde
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 7]
mov edi, dword [ebp - 0x28]
add cx, ax
movsx eax, cx
sub edx, eax
movd xmm0, edx
jmp 0x1003d073
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 4]
xorps xmm1, xmmword [0x100fa820]
movzx ecx, byte [edx + eax + 0x12]
movzx eax, byte [edx + eax + 0x13]
shl ecx, 8
add ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
mov ecx, dword [ebp - 8]
xor esi, esi
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov byte [edi], cl
mov byte [edi + 1], dl
divss xmm1, xmm0
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], edx
movss dword [ebp - 0x2c], xmm1
cmp dword [edi - 8], esi
jle 0x1003d26c
mov ecx, dword [ebx + 0x10]
shl eax, 4
add ecx, 6
add eax, ecx
mov dword [ebp - 0x28], eax
nop dword [eax]
mov edx, dword [edi - 0xc]
test edx, edx
jne 0x1003d0be
mov edx, dword [edi - 0x10]
add edx, esi
jmp 0x1003d0c1
mov edx, dword [edx + esi*4]
mov ecx, dword [ebp - 0x14]
call fcn.10038140
mov ecx, dword [ebp - 0xc]
mov edx, eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ecx + 0x18]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100fa7a0]
mov eax, dword [ecx + 0x1c]
mov ecx, dword [ebp - 0x14]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 8], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100fa7a0]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
cvtpd2ps xmm0, xmm0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
mulss xmm0, xmm1
movss dword [ebp - 0x1c], xmm0
call fcn.10038550
add esp, 0x10
test eax, eax
jne 0x1003d154
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
jmp 0x1003d216
xorps xmm0, xmm0
xorps xmm1, xmm1
cvtsi2ss xmm0, dword [ebp - 0x10]
sub esp, 8
mulss xmm0, dword [ebp - 8]
addss xmm0, xmm1
movss dword [ebp - 0x24], xmm0
fld dword [ebp - 0x24]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
xorps xmm1, xmm1
xorps xmm0, xmm0
cvtsi2ss xmm1, dword [ebp - 0x30]
fstp dword [ebp - 0x24]
mulss xmm1, dword [ebp - 0x1c]
cvttss2si eax, dword [ebp - 0x24]
subss xmm0, xmm1
mov dword [ebp - 0x10], eax
movss dword [ebp - 0x24], xmm0
fld dword [ebp - 0x24]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
xorps xmm0, xmm0
xorps xmm1, xmm1
cvtsi2ss xmm0, dword [ebp - 0x34]
fstp dword [ebp - 0x24]
mulss xmm0, dword [ebp - 8]
cvttss2si eax, dword [ebp - 0x24]
addss xmm0, xmm1
mov dword [ebp - 0x24], eax
movss dword [ebp - 0x20], xmm0
fld dword [ebp - 0x20]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
xorps xmm1, xmm1
xorps xmm0, xmm0
cvtsi2ss xmm1, dword [ebp - 0x18]
fstp dword [ebp - 0x20]
mulss xmm1, dword [ebp - 0x1c]
cvttss2si eax, dword [ebp - 0x20]
subss xmm0, xmm1
mov dword [ebp - 0x20], eax
movss dword [ebp - 0x1c], xmm0
fld dword [ebp - 0x1c]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
fstp dword [ebp - 0x1c]
cvttss2si eax, dword [ebp - 0x1c]
add esp, 8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
inc esi
movss xmm1, dword [ebp - 0x2c]
movzx edx, word [eax + 0x18]
movzx ecx, word [eax + 0x14]
mov eax, ecx
mov dword [ebp - 8], edx
sub eax, dword [ebp - 0x10]
add eax, edx
mov edx, dword [ebp - 0x20]
dec edx
add eax, edx
mov edx, dword [ebp - 0x28]
mov word [edx - 2], ax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x1c]
mov dword [ebp - 0x10], eax
sub eax, dword [ebp - 0x24]
add eax, ecx
mov ecx, dword [ebp - 0x1c]
dec ecx
add eax, ecx
mov word [edx], ax
add edx, 0x10
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 4], eax
cmp esi, dword [edi - 8]
jl 0x1003d0b0
mov esi, dword [ebp - 0x14]
add edi, 0x18
sub dword [ebx + 0xc], 1
xorps xmm0, xmm0
mov dword [ebp - 0x28], edi
jne 0x1003d000
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
pop edi
mov eax, ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret