Function at 0x58c40
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x244
mov edx, dword [esp + 0x264]
mov dword [esp + 0x3f], 0xe48040
mov dword [esp + 0x3c], 0x4010ec83
mov dword [esp + 0x38], 0x48e78948
mov dword [esp + 0x34], 0xce8948fc
mov dword [esp + 0x27], 0xc3fc8948
mov dword [esp + 0x24], 0x48d2ff41
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0xfffffff1
mov dword [esp + 0x18], 0xba49c031
lea ebx, [esp + 0x44]
lea eax, [esp + 0x34]
mov ecx, 3
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
lea edi, [esp + 0x50]
lea eax, [esp + 0x40]
mov ecx, 1
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
movzx eax, byte [esp + 0x42]
mov byte [esp + 0x52], al
mov esi, edx
cmp edx, 4
jb 0x58cd3
mov esi, 4
lea eax, [esp + 0x53]
test edx, edx
je 0x58eb9
xor ebp, ebp
mov ebx, edx
jmp 0x58d20
mov edx, 0x5e575
mov edi, eax
mov ecx, 1
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
add eax, 4
mov edx, 0x5e579
xor ecx, ecx
mov edi, eax
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov edx, ebx
inc ebp
cmp esi, ebp
je 0x58db1
cmp ebp, 3
ja case.default.0x58d25
jmp dword [ebp*4 + 0x5dd90]
mov edx, 0x5e57a
xor ecx, ecx
mov edi, eax
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
mov edx, 0x5e57a
mov edi, eax
mov ecx, 1
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov byte [eax + 2], 0xe
add eax, 3
jmp 0x58d15
mov edx, 0x5e570
mov edi, eax
mov ecx, 1
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
add eax, 4
mov edx, 0x5e574
xor ecx, ecx
mov edi, eax
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
jmp 0x58d15
mov edx, 0x5e57e
mov edi, eax
mov ecx, 1
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
add eax, 4
mov edx, 0x5e582
xor ecx, ecx
mov edi, eax
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
jmp 0x58d15
cmp edx, 3
jbe 0x58eb5
test dl, 1
je 0x58de6
mov edx, 0x5e587
mov esi, 0x5e587
mov edi, eax
xor ecx, ecx
xchg esi, esi
rep movsd dword es:[edi], dword [esi]
xchg esi, esi
mov ecx, 1
mov edi, eax
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov edx, ebx
add eax, 2
mov word [esp + 4], 0x50
mov dword [esp], 0x20468b48
mov byte [esp + 0x10], 0
mov dword [esp + 0xc], 0x50000000
mov dword [esp + 8], 0x80868b48
mov ecx, edx
and ecx, 8
mov edi, edx
or edx, 8
imul edx, ecx
xor ecx, 8
mov esi, edi
and esi, 0xfffffff7
imul esi, ecx
add edx, esi
cmp edx, 0x7ffffffe
lea ebx, [esp + 0x44]
ja 0x59137
lea esi, [edi - 1]
cmp esi, 4
jb 0x58eb9
lea edx, [edi*8 - 8]
jmp 0x58e80
mov dword [esp + 0xb], edx
lea ebp, [esp + 8]
mov edi, eax
mov ecx, 2
xchg esi, ebp
rep movsd dword es:[edi], dword [esi]
xchg esi, ebp
add eax, 8
lea ebp, [esp + 0x10]
xor ecx, ecx
mov edi, eax
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
dec esi
add edx, 0xfffffff8
cmp esi, 3
jbe 0x58eb9
cmp edx, 0x7e
ja 0x58e50
mov byte [esp + 3], dl
mov ebp, esp
mov edi, eax
mov ecx, 1
xchg esi, ebp
rep movsd dword es:[edi], dword [esi]
xchg esi, ebp
lea edi, [eax + 4]
lea ebp, [esp + 4]
xor ecx, ecx
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
movzx ecx, byte [esp + 4]
mov byte [eax + 4], cl
add eax, 5
jmp 0x58e77
lea ebx, [esp + 0x44]
mov esi, dword [esp + 0x25c]
mov edx, 0x5e56b
mov edi, eax
mov ecx, 1
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
lea edx, [eax + 4]
mov ebp, 0x5e56f
mov edi, edx
xor ecx, ecx
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
mov dword [esp + 0x20], esi
mov ecx, dword [esp + 0x258]
mov dword [esp + 0x1c], ecx
lea esi, [esp + 0x18]
mov edi, edx
mov ecx, 4
xchg esi, esi
rep movsd dword es:[edi], dword [esi]
xchg esi, esi
lea edi, [eax + 0x14]
lea edx, [esp + 0x28]
mov ecx, 1
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
movzx ecx, byte [esp + 0x2a]
mov byte [eax + 0x16], cl
add eax, 0x17
mov ecx, eax
not ecx
and ecx, ebx
not ebx
and ebx, eax
sub ebx, ecx
mov dword [esp + 0x14], 0
lea eax, [ebx + 0x59]
mov dword [esp + 0x30], eax
mov dword [esp + 8], 0xc0d0a0b
mov word [esp + 0xc], 0
mov byte [esp + 0xe], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 6
ja 0x58f96
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
movzx eax, byte [esp + eax + 8]
push dword [esp]
push eax
call fcn.00059150
add esp, 8
mov ecx, dword [esp]
mov byte [esp + ecx + 8], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 7
jb 0x58f70
mov eax, dword [esp + 8]
mov ecx, dword [0x65f70]
test ecx, ecx
je 0x58fee
xor edx, edx
mov esi, dword [0x65f74]
nop
nop
nop
nop
cmp dword [esi + edx*8], 0x633c81d
je 0x58fc0
inc edx
cmp ecx, edx
jne 0x58fb0
jmp 0x58fee
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x58fee
lea eax, [esp + 0x30]
lea edx, [esp + 0x14]
push 0x40
push 0x3000
push eax
push 0
push edx
push 0xffffffffffffffff
push 6
push dword [0x65f78]
push ecx
call fcn.00056bb0
add esp, 0x24
test eax, eax
js 0x59100
mov edx, dword [esp + 0x260]
mov eax, dword [esp + 0x14]
mov esi, 0x5dd35
mov edi, eax
mov ecx, 0x16
xchg esi, esi
rep movsd dword es:[edi], dword [esi]
xchg esi, esi
lea edi, [eax + 0x58]
mov esi, 0x5dd8d
xor ecx, ecx
xchg esi, esi
rep movsw word es:[edi], word [esi]
xchg esi, esi
mov byte [eax + 0x58], 0x24
mov eax, dword [esp + 0x14]
lea edi, [eax + 0x59]
mov ecx, ebx
shr ecx, 2
lea esi, [esp + 0x44]
xchg esi, esi
rep movsd dword es:[edi], dword [esi]
xchg esi, esi
mov ecx, ebx
and ecx, 0xfffffffc
add eax, ecx
add eax, 0x59
lea esi, [esp + ecx]
add esi, 0x44
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov ebp, esi
mov edi, eax
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
test bl, 1
je 0x5906f
and ebx, 2
movzx ecx, byte [esi + ebx]
mov byte [eax + ebx], cl
mov eax, dword [esp + 0x14]
lea ecx, [eax + 0x59]
push edx
push ecx
call eax
mov esi, eax
mov edi, edx
mov dword [esp + 0x2c], 0
mov dword [esp + 8], 0xc0d0a0b
mov word [esp + 0xc], 0
mov byte [esp + 0xe], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 6
ja 0x590d6
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
movzx eax, byte [esp + eax + 8]
push dword [esp]
push eax
call fcn.00059150
add esp, 8
mov ecx, dword [esp]
mov byte [esp + ecx + 8], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 7
jb 0x590b0
mov eax, dword [0x65f70]
test eax, eax
je 0x59131
mov ecx, dword [esp + 8]
xor edx, edx
mov ebx, dword [0x65f74]
nop
nop
nop
nop
nop
cmp dword [ebx + edx*8], 0x44caaeb6
je 0x59107
inc edx
cmp eax, edx
jne 0x590f0
jmp 0x59131
mov edx, eax
sar edx, 0x1f
jmp 0x59141
mov eax, dword [ebx + edx*8 + 4]
cmp eax, ecx
je 0x59131
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x14]
push 0x8000
push ecx
push edx
push 0xffffffffffffffff
push 4
push dword [0x65f78]
push eax
call fcn.00056bb0
add esp, 0x1c
mov eax, esi
mov edx, edi
jmp 0x59141
mov eax, 0xffffffff
mov edx, 0xffffffff
add esp, 0x244
pop esi
pop edi
pop ebx
pop ebp
ret 0x10