Function at 0x58d2f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x64
push ebx
push esi
push edi
mov edi, dword [ecx + 0x60]
xor eax, eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x3c], edi
test edi, edi
jle 0x58d474
cmp edi, 8
jb 0x58d474
mov esi, dword [ecx + 0xac]
mov ecx, edi
and ecx, reloc.OLEAUT32.dll_VariantInit
jns 0x58d347
dec ecx
or ecx, 0xfffffff8
inc ecx
movdqa xmm2, xmmword [0x6cedb0]
mov edx, edi
sub edx, ecx
xorps xmm3, xmm3
mov ecx, 0x10
movdqa xmm0, xmm3
movdqa xmmword [esp + 0x40], xmm0
movdqa xmm4, xmm0
movdqa xmm7, xmm3
movdqa xmm6, xmm3
movdqa xmm5, xmm7
movd xmm0, ecx
mov ecx, 8
movdqa xmmword [esp + 0x50], xmm0
movd xmm0, ecx
movdqa xmmword [esp + 0x60], xmm0
mov edi, edi
movdqu xmm1, xmmword [esi + eax*4]
movdqa xmm0, xmm1
psrld xmm0, xmmword [esp + 0x50]
pand xmm0, xmm2
paddd xmm3, xmm0
movdqa xmm0, xmm1
psrld xmm0, xmmword [esp + 0x60]
pand xmm0, xmm2
paddd xmm7, xmm0
movdqa xmm0, xmm2
pand xmm0, xmm1
paddd xmm0, xmmword [esp + 0x40]
movdqu xmm1, xmmword [esi + eax*4 + 0x10]
add eax, 8
movdqa xmmword [esp + 0x40], xmm0
movdqa xmm0, xmm1
psrld xmm0, xmmword [esp + 0x50]
pand xmm0, xmm2
paddd xmm6, xmm0
movdqa xmm0, xmm1
pand xmm1, xmm2
paddd xmm4, xmm1
psrld xmm0, xmmword [esp + 0x60]
pand xmm0, xmm2
paddd xmm5, xmm0
cmp eax, edx
jl 0x58d390
paddd xmm4, xmmword [esp + 0x40]
paddd xmm5, xmm7
movdqa xmm0, xmm4
paddd xmm6, xmm3
psrldq xmm0, 8
paddd xmm4, xmm0
movdqa xmm0, xmm4
psrldq xmm0, 4
paddd xmm4, xmm0
movdqa xmm0, xmm5
psrldq xmm0, 8
paddd xmm5, xmm0
movd dword [esp + 0x20], xmm4
movdqa xmm0, xmm5
psrldq xmm0, 4
paddd xmm5, xmm0
movdqa xmm0, xmm6
psrldq xmm0, 8
paddd xmm6, xmm0
movd dword [esp + 0x1c], xmm5
movdqa xmm0, xmm6
psrldq xmm0, 4
paddd xmm6, xmm0
movd dword [esp + 0x18], xmm6
xor edx, edx
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], edx
cmp eax, edi
jge 0x58d56f
mov ecx, edi
sub ecx, eax
cmp ecx, 2
jl 0x58d51e
mov ecx, dword [esp + 0x34]
lea edx, [edi - 1]
mov dword [esp + 0x38], edx
xor edi, edi
mov ecx, dword [ecx + 0xac]
mov dword [esp + 0x30], ecx
mov edx, dword [ecx + eax*4]
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
add esi, ecx
mov ecx, edx
shr ecx, 8
and ecx, 0xff
add dword [esp + 0x24], ecx
movzx ecx, dl
mov edx, dword [esp + 0x30]
add edi, ecx
mov edx, dword [edx + eax*4 + 4]
mov ecx, edx
shr ecx, 0x10
add eax, 2
and ecx, 0xff
add ebx, ecx
mov ecx, edx
shr ecx, 8
and ecx, 0xff
add dword [esp + 0x28], ecx
movzx ecx, dl
add dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x30]
cmp eax, dword [esp + 0x38]
jl 0x58d4b6
mov edx, dword [esp + 0x24]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x3c]
cmp eax, edi
jge 0x58d552
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + 0xac]
mov ecx, dword [ecx + eax*4]
mov eax, ecx
shr eax, 0x10
and eax, 0xff
add dword [esp + 0x18], eax
mov eax, ecx
shr eax, 8
and eax, 0xff
add dword [esp + 0x1c], eax
movzx eax, cl
add dword [esp + 0x20], eax
lea eax, [ebx + esi]
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
add eax, edx
add dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x2c]
add dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov ecx, edi
shr ecx, 1
xor edx, edx
add eax, ecx
div edi
xor edx, edx
mov esi, eax
mov eax, dword [esp + 0x1c]
add eax, ecx
or esi, 0xffffff00
div edi
shl esi, 8
xor edx, edx
or esi, eax
mov eax, dword [esp + 0x20]
add eax, ecx
shl esi, 8
div edi
pop edi
or esi, eax
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov al, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4