Function at 0x5f2f4c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 5
add esp, 0xfffff004
push eax
dec eax
jne 0x5f2f55
mov eax, dword [ebp - 4]
add esp, 0xffffffb4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5f3426
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x669f14]
cmp dword [eax], 0
je 0x5f3410
xor eax, eax
push ebp
push 0x5f3398
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0
jne 0x5f2fb3
mov eax, dword [0x669f14]
mov eax, dword [eax]
inc eax
mov dword [ebp - 0x18], eax
jmp 0x5f2fb9
mov eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 4], 0
jne 0x5f2fc6
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x5f2fcc
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x38], eax
mov dl, 1
mov eax, dword [0x41ab08]
call fcn.00403c64
mov dword [ebp - 0x1c], eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 0x1c]
mov ebx, dword [eax]
call dword [ebx + 0x14]
mov eax, dword [ebp - 0x18]
xor edx, edx
div dword [ebp - 0xc]
mov edx, eax
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
call fcn.004d0a08
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
xor edx, edx
call fcn.004d0ab8
xor eax, eax
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x3d], 0
xor eax, eax
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x18], 0
jbe 0x5f337c
mov eax, dword [0x669b48]
mov eax, dword [eax]
call fcn.00498e74
mov eax, dword [ebp - 0xc]
shr eax, 0x18
mov edx, dword [0x669850]
mov byte [edx + 0x18], al
mov eax, dword [ebp - 0xc]
shr eax, 0x10
mov edx, dword [0x669850]
mov byte [edx + 0x19], al
mov eax, dword [ebp - 0xc]
shr eax, 8
mov edx, dword [0x669850]
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 0xc]
and eax, 0xff
mov edx, dword [0x669850]
mov byte [edx + 0x1b], al
mov eax, dword [ebp - 0x14]
shr eax, 0x18
mov edx, dword [0x669850]
mov byte [edx + 0x1c], al
mov eax, dword [ebp - 0x14]
shr eax, 0x10
mov edx, dword [0x669850]
mov byte [edx + 0x1d], al
mov eax, dword [ebp - 0x14]
shr eax, 8
mov edx, dword [0x669850]
mov byte [edx + 0x1e], al
mov eax, dword [ebp - 0x14]
and eax, 0xff
mov edx, dword [0x669850]
mov byte [edx + 0x1f], al
mov eax, dword [0x669850]
add eax, 0x11
mov edx, 0xf
call fcn.005d5aa8
mov edx, dword [0x669850]
mov byte [edx + 0x20], al
mov edx, dword [0x6691f8]
mov eax, dword [0x669850]
mov ecx, 0x21
call fcn.0049b428
xor ecx, ecx
mov edx, 0x21
mov eax, 0x222040
call fcn.005c7d90
mov eax, dword [0x669b48]
mov eax, dword [eax]
call fcn.00498e74
mov eax, 0x80
call fcn.005e6700
mov eax, dword [0x66a180]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x5050]
mov eax, dword [0x66a180]
mov eax, dword [eax]
mov ecx, 0x80
call fcn.0049b428
lea eax, [ebp - 0x28]
call fcn.0049b538
cmp dword [ebp - 0x28], 0x81
jae 0x5f314d
mov byte [ebp - 0x3d], 1
jmp 0x5f3151
mov byte [ebp - 0x3d], 0
mov al, byte [ebp - 0x3d]
sub al, 1
jb 0x5f3163
je 0x5f327e
jmp 0x5f3284
xor eax, eax
mov dword [ebp - 0x44], eax
sub dword [ebp - 0x28], 0x80
mov eax, dword [ebp - 0x28]
shr eax, 7
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x28]
and eax, 0x7f
test eax, eax
jbe 0x5f3185
inc dword [ebp - 0x30]
mov dword [ebp - 0x34], 0x80
mov eax, dword [0x669b48]
mov eax, dword [eax]
call fcn.00498e74
mov eax, dword [ebp - 0x30]
dec eax
test eax, eax
jl 0x5f3229
inc eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x2c], 0
mov eax, dword [0x669b48]
mov eax, dword [eax]
call fcn.00498e74
mov dword [ebp - 0x34], 0x80
mov eax, dword [ebp - 0x34]
call fcn.005e6700
mov eax, dword [0x66a180]
mov eax, dword [eax]
call fcn.004061f0
mov ecx, eax
mov eax, dword [ebp - 0x38]
add eax, 0x80
lea edx, [ebp + eax - 0x5050]
mov eax, dword [0x66a180]
mov eax, dword [eax]
call fcn.0049b428
mov eax, dword [0x66a180]
mov eax, dword [eax]
call fcn.004061f0
add dword [ebp - 0x38], eax
mov eax, dword [0x669b48]
mov eax, dword [eax]
call fcn.00498e74
mov eax, dword [0x66a180]
mov eax, dword [eax]
call fcn.004061f0
cmp eax, 0x80
jl 0x5f3229
inc dword [ebp - 0x2c]
dec dword [ebp - 0x48]
jne 0x5f31af
xor eax, eax
mov dword [ebp - 0x38], eax
cmp byte [ebp - 0x5047], 0x41
jne 0x5f3284
cmp byte [ebp - 0x5046], 0x56
jne 0x5f3284
mov dword [ebp - 0x24], 0xb
mov eax, dword [ebp - 0x24]
mov al, byte [ebp + eax - 0x5050]
mov byte [ebp - 0x1d], al
xor ecx, ecx
mov cl, byte [ebp - 0x1d]
mov eax, dword [ebp - 0x24]
lea edx, [ebp + eax - 0x504f]
mov eax, dword [ebp - 0x1c]
call fcn.0042074c
xor eax, eax
mov al, byte [ebp - 0x1d]
add eax, 2
add dword [ebp - 0x24], eax
cmp byte [ebp - 0x1d], 0xff
jae 0x5f3247
jmp 0x5f3284
inc dword [ebp - 0x3c]
inc dword [ebp - 0x44]
lea eax, [ebp - 0x5050]
xor ecx, ecx
mov edx, 0x4fff
call fcn.00408374
mov eax, dword [ebp - 0xc]
sub dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x14], eax
cmp dword [ebp - 0x44], 0xa
jle 0x5f3333
xor eax, eax
mov dword [ebp - 0x44], eax
mov eax, dword [0x669f14]
mov eax, dword [eax]
inc eax
sub eax, 0xd00000
cmp eax, dword [ebp - 0x14]
jbe 0x5f32fb
add dword [ebp - 0x14], 0x80000
sub dword [ebp - 0x18], 0x80000
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
mov edx, dword [eax + 0x170]
add edx, 0x40
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
call fcn.004d0ab8
jmp 0x5f3359
add dword [ebp - 0x14], 0x10000
sub dword [ebp - 0x18], 0x10000
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
mov edx, dword [eax + 0x170]
add edx, 0x10
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
call fcn.004d0ab8
jmp 0x5f3359
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
mov edx, dword [eax + 0x170]
inc edx
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
call fcn.004d0ab8
mov eax, dword [0x669b48]
mov eax, dword [eax]
call fcn.00498e74
mov eax, dword [0x669f14]
mov eax, dword [eax]
inc eax
cmp eax, dword [ebp - 0x14]
jbe 0x5f337c
cmp dword [ebp - 0x18], 0
ja 0x5f3034
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
mov eax, dword [0x669b48]
mov eax, dword [eax]
call fcn.00498e74
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5f33d8
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x39c]
xor edx, edx
call fcn.004d0ab8
mov eax, dword [0x66a00c]
mov eax, dword [eax]
mov eax, dword [eax + 0x314]
mov eax, dword [eax + 0x208]
mov edx, 1
call fcn.0044e464
xor edx, edx
call fcn.0044e36c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5f342d
lea eax, [ebp - 0x50]
call fcn.00404ae4
ret