Function at 0x61f580
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x61f8cf
sub esp, 0x40
movzx eax, byte [esp + 0x44]
lea edx, [eax - 1]
cmp dl, 7
ja 0x61f8b6
mov edx, dword [esp + 0x4c]
test edx, edx
je 0x61f6c0
mov ebx, dword [esp + 0x48]
movzx ebp, byte [ebx]
cmp al, 8
jae 0x61f5d8
movzx ecx, al
cmp ecx, 0x20
sbb esi, esi
mov edi, 1
shl edi, cl
and edi, esi
add edi, 0xffffffff
and ebp, edi
movzx eax, al
cmp eax, 0x20
sbb esi, esi
lea ecx, [eax - 0x20]
mov dword [esp + 0x30], ecx
cmp ecx, 0x20
sbb edi, edi
neg ecx
mov dword [esp + 0x2c], ecx
cmp ecx, 0x20
sbb edx, edx
mov ecx, dword [esp + 0x30]
mov ebx, 1
shl ebx, cl
and edi, ebx
mov ecx, eax
mov eax, 1
shl eax, cl
and eax, esi
mov ecx, dword [esp + 0x2c]
mov ebx, 1
shr ebx, cl
and ebx, edx
or edi, ebx
add eax, 0xffffffff
adc edi, 0xffffffff
test edi, edi
sete dl
cmp eax, ebp
seta al
test edi, edi
seta bl
and edx, eax
or edx, ebx
test dl, dl
jne 0x61f67a
mov eax, dword [esp + 0x50]
lea edx, [eax - 1]
mov ebx, edx
neg edx
sar edx, 0x1f
and edx, 1
mov esi, dword [esp + 0x48]
add edx, esi
mov edi, dword [esp + 0x4c]
mov ecx, eax
lea eax, [edi - 1]
mov dword [esp + 0x34], eax
xor eax, eax
mov dword [esp + 0x30], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
jmp 0x61f728
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], ebp
mov eax, dword [esp + 0x50]
dec eax
mov ecx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov edx, dword [esp + 0x48]
add eax, edx
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x4c]
dec eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
add esp, 0x40
ret
mov eax, dword [0x8b2b80]
mov ecx, dword [0x8b2b84]
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], ecx
add esp, 0x40
ret
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, edx
mov edx, ecx
mov dword [esp + 0x30], esi
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edi
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x4c]
test eax, eax
je 0x61f882
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x3c], edx
mov edi, dword [esp + 0x14]
cmp edi, 1
sbb esi, esi
xor esi, 0xffffffff
mov edi, dword [esp + 0x10]
or esi, edi
lea edi, [esi - 0x20]
mov dword [esp + 0x20], edi
cmp edi, 0x20
sbb eax, eax
xchg edi, ebx
neg ebx
xchg edi, ebx
cmp edi, 0x20
sbb ebx, ebx
cmp esi, 0x20
sbb ebp, ebp
movzx edx, byte [edx]
mov byte [esp + 0xf], dl
and edx, 0x7f
mov dword [esp + 0x1c], edx
mov ecx, esi
mov esi, edx
shl edx, cl
mov ecx, dword [esp + 0x20]
shl esi, cl
mov ecx, edi
mov edi, dword [esp + 0x1c]
shr edi, cl
and ebx, edi
and esi, eax
and ebp, edx
or esi, ebx
mov eax, dword [esp + 0x2c]
add ebp, eax
mov eax, dword [esp + 0x30]
adc esi, eax
mov eax, dword [esp + 0x24]
dec eax
mov edx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov ebx, dword [esp + 0x3c]
add eax, ebx
mov ebx, dword [esp + 0x28]
dec ebx
movzx edi, byte [esp + 0xf]
xchg edi, eax
test al, 0x80
xchg edi, eax
je 0x61f85a
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], edx
mov edi, dword [esp + 0x10]
add edi, 7
mov ecx, eax
mov eax, dword [esp + 0x14]
adc eax, 0
mov dword [esp + 0x18], eax
test eax, eax
seta al
sete dl
cmp edi, 0x3f
setae bl
and ebx, edx
or ebx, eax
test bl, bl
je 0x61f6fc
lea eax, [0x699e00]
mov dword [esp], eax
lea eax, [0x8b2b88]
mov dword [esp + 4], eax
call fcn.004093f0
mov eax, dword [esp + 8]
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x64], ecx
lea ecx, [0x727a8c]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], eax
add esp, 0x40
ret
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebp
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
add esp, 0x40
ret
mov eax, dword [0x8b2b80]
mov edx, dword [0x8b2b84]
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], edx
add esp, 0x40
ret
lea eax, [0x6871e0]
mov dword [esp], eax
lea eax, [0x726ff8]
mov dword [esp + 4], eax
call fcn.00436170
nop
call fcn.00462f90
jmp fcn.0061f580