Function at 0x598380
Capabilities:
Encrypt data using rc4 prga
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x598751
sub esp, 0x54
mov eax, dword [esp + 0x64]
shl eax, 6
movzx edx, byte [esp + 0x70]
test dl, dl
je 0x5983ac
or eax, 0x20
mov edx, dword [esp + 0x68]
cmp edx, 0x1f
jl 0x598434
mov ebx, dword [esp + 0x5c]
lea ebp, [ebx + 1]
mov esi, dword [esp + 0x60]
cmp esi, ebp
jb 0x5983ca
mov ecx, dword [esp + 0x58]
jmp 0x598410
mov byte [esp + 0x23], al
lea eax, [0x678460]
mov dword [esp], eax
mov ecx, dword [esp + 0x58]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebp
call fcn.0044b8a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebp, [ecx + 1]
mov ebx, dword [esp + 0x5c]
mov ecx, eax
mov esi, edx
movzx eax, byte [esp + 0x23]
mov edx, dword [esp + 0x68]
mov dword [esp + 0x38], ebp
or eax, 0x1f
mov byte [ecx + ebx], al
mov eax, edx
sar edx, 0x1f
mov dword [esp + 0x2c], edx
mov ebx, edx
mov edi, eax
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, edi
jmp 0x59860f
or eax, edx
mov edx, dword [esp + 0x5c]
lea ebx, [edx + 1]
mov ebp, dword [esp + 0x60]
cmp ebp, ebx
jb 0x59844b
mov ecx, dword [esp + 0x58]
jmp 0x59848d
mov byte [esp + 0x23], al
lea eax, [0x678460]
mov dword [esp], eax
mov ecx, dword [esp + 0x58]
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ebx
call fcn.0044b8a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebx, [ecx + 1]
mov ecx, eax
mov ebp, edx
movzx eax, byte [esp + 0x23]
mov edx, dword [esp + 0x5c]
mov byte [ecx + edx], al
mov dword [esp + 0x4c], ebx
mov eax, dword [esp + 0x6c]
cmp eax, 0x80
jl 0x5984a8
mov edx, eax
mov esi, 1
jmp 0x5984fb
lea edx, [ebx + 1]
cmp ebp, edx
jae 0x5984e4
lea eax, [0x678460]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], edx
call fcn.0044b8a0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
lea edx, [eax + 1]
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0x4c]
mov byte [ecx + ebx], al
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], ebp
add esp, 0x54
ret
inc esi
sar eax, 8
cmp eax, 0xff
jg 0x5984f7
lea eax, [ebx + 1]
cmp ebp, eax
jae 0x598544
mov dword [esp + 0x28], esi
lea edx, [0x678460]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], eax
call fcn.0044b8a0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
inc eax
mov edx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x4c]
mov esi, dword [esp + 0x28]
or esi, 0xffffff80
xchg esi, eax
mov byte [ecx + ebx], al
xchg esi, eax
nop
mov ebx, edx
mov esi, 1
jmp 0x59855a
inc esi
sar edx, 8
cmp edx, 0xff
jg 0x598556
jmp 0x598575
mov byte [edi + eax], bl
mov eax, dword [esp + 0x4c]
mov ebx, edx
mov eax, esi
mov ecx, edi
mov esi, dword [esp + 0x4c]
test esi, esi
jle 0x5985e4
lea edx, [esi - 1]
mov dword [esp + 0x4c], edx
shl edx, 3
cmp edx, 0x20
sbb edi, edi
lea esi, [eax + 1]
xchg edi, ebx
not ebx
xchg edi, ebx
or edx, edi
mov edi, ecx
mov ecx, edx
mov edx, ebx
sar ebx, cl
cmp ebp, esi
jae 0x598564
mov dword [esp + 0x48], ebx
mov dword [esp + 0x34], eax
lea ecx, [0x678460]
mov dword [esp], ecx
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], esi
call fcn.0044b8a0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
lea esi, [eax + 1]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x48]
mov edi, ecx
jmp 0x598564
mov edx, eax
jmp 0x5984e7
shr eax, 7
mov ebx, edx
shl edx, 0x19
or eax, edx
sar ebx, 7
mov edx, dword [esp + 0x24]
inc edx
mov ebp, dword [esp + 0x38]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x24], edx
mov edx, ebx
mov ebx, dword [esp + 0x2c]
test edx, edx
setg bl
test eax, eax
xchg edi, ebx
seta bl
xchg edi, ebx
test edx, edx
xchg ebp, ebx
sete bl
xchg ebp, ebx
and ebp, edi
or ebx, ebp
test bl, bl
jne 0x5985eb
mov eax, dword [esp + 0x24]
dec eax
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x38]
jmp 0x598657
mov byte [ecx + ebp], dl
mov edx, edi
lea edi, [ebx - 1]
mov ebx, dword [esp + 0x68]
mov eax, edi
mov ebp, esi
mov esi, edx
mov edx, dword [esp + 0x2c]
test eax, eax
jl 0x598748
mov dword [esp + 0x30], eax
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x3c], esi
mov dword [esp + 0x50], ecx
lea edi, [eax + eax*2]
lea esi, [eax + edi*2]
mov dword [esp + 0x48], esi
cmp esi, 0x20
sbb ebp, ebp
lea edi, [eax + edi*2 - 0x20]
mov dword [esp + 0x44], edi
xchg edi, ebx
neg ebx
xchg edi, ebx
cmp edi, 0x20
sbb eax, eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x44]
cmp eax, 0x20
sbb eax, eax
shr esi, 5
cmp esi, 1
sbb esi, esi
mov ecx, dword [esp + 0x48]
shr ebx, cl
and ebx, ebp
mov ecx, edi
mov ebp, edx
shl edx, cl
mov edi, dword [esp + 0x40]
and edx, edi
or edx, ebx
not eax
mov ecx, dword [esp + 0x44]
or ecx, eax
mov eax, ebp
sar ebp, cl
xor esi, 0xffffffff
and ebp, esi
or ebp, edx
mov edx, ebp
and ebp, 0x7f
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x5986e1
or edx, 0xffffff80
jmp 0x5986e3
mov edx, ebp
mov ebp, dword [esp + 0x4c]
lea esi, [ebp + 1]
mov edi, dword [esp + 0x3c]
cmp edi, esi
jb 0x5986fb
mov ecx, dword [esp + 0x50]
jmp 0x598641
mov byte [esp + 0x22], dl
lea eax, [0x678460]
mov dword [esp], eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
call fcn.0044b8a0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
inc eax
movzx edx, byte [esp + 0x22]
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x4c]
mov edi, esi
mov esi, eax
mov eax, dword [esp + 0x2c]
jmp 0x598641
mov ebx, ebp
mov ebp, esi
jmp 0x598490
call fcn.00461a60
jmp fcn.00598380