Function at 0x4f4670
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov edx, dword [eax + 8]
mov dword [esp + 8], eax
cmp byte [edx + 1], 0x1e
mov esi, dword [edx + 2]
ja 0x4f4740
mov eax, dword [eax]
mov ebx, dword [eax + 8]
test ebx, ebx
je 0x4f4740
cmp word [ebx], 1
je 0x4f4b93
movzx edi, byte [edx]
mov eax, dword [ebx + 4]
mov ecx, edi
cmp byte [eax], cl
je 0x4f4b50
mov edi, edx
mov edx, ecx
jmp 0x4f46c2
mov eax, ecx
cmp dl, byte [eax + 6]
lea ecx, [eax + 6]
jne 0x4f46c0
mov ebp, edx
mov dword [esp + 4], ecx
mov edx, edi
mov edi, ebp
mov ebp, ecx
movzx ecx, byte [ecx + 1]
cmp cl, byte [eax + 1]
mov byte [esp], cl
jb 0x4f4722
movzx ecx, word [ebp + 2]
mov word [esp + 4], cx
movzx ecx, word [ebp + 4]
mov word [esp + 0xe], cx
mov ecx, dword [eax]
mov dword [ebp], ecx
movzx ecx, word [eax + 4]
mov word [ebp + 4], cx
mov ecx, edi
mov byte [eax], cl
movzx ecx, byte [esp]
mov byte [eax + 1], cl
movzx ecx, word [esp + 4]
mov dword [esp + 4], eax
mov word [eax + 2], cx
movzx ecx, word [esp + 0xe]
mov word [eax + 4], cx
movzx eax, byte [esp]
cmp al, 0x72
ja 0x4f4740
mov edi, dword [esp + 4]
add eax, 2
mov byte [edi + 1], al
add word [ebx + 2], 2
lea esi, [esi]
mov eax, dword [esp + 8]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4f4ad0
mov edi, eax
mov eax, dword [eax + 0x3c]
lea ecx, [eax + 1]
mov dword [edi + 0x3c], ecx
movzx edx, byte [edx]
mov byte [eax], dl
mov eax, edi
mov edi, dword [edi + 0x3c]
cmp dword [eax + 0x40], edi
mov dword [esp + 0x14], edi
jbe 0x4f49a4
test esi, esi
je 0x4f4b03
cmp esi, edi
mov dword [esp + 0x28], esi
jbe 0x4f4b60
mov ebx, dword [esp + 8]
mov eax, dword [ebx + 0xc]
mov esi, dword [ebx]
mov ecx, dword [ebx + 8]
mov edi, dword [ebx + 4]
mov dword [esp], eax
sub eax, 1
mov dword [esp + 0x10], esi
test eax, eax
mov dword [ebx + 0xc], eax
mov dword [esp + 4], ecx
je 0x4f4b30
mov ebx, dword [esp + 0x10]
movzx esi, word [ebx]
movzx eax, word [ebx + 2]
mov dword [esp + 0x1c], esi
sub eax, esi
mov esi, dword [esp + 4]
movzx edx, byte [esi + 1]
sub eax, edx
add eax, 1
cmp ebx, edi
mov dword [esp + 0x18], eax
je 0x4f4945
mov eax, dword [esp + 0x14]
shr eax, 0x10
mov dword [esp + 0x20], eax
movzx ebp, word [edi]
cmp ebp, 1
mov eax, ebp
mov word [esp + 0xe], bp
je 0x4f4a00
test al, 1
jne 0x4f49b4
mov esi, dword [esp + 8]
mov ebx, ebp
shr ebx, 1
movzx eax, byte [esi + ebx + 0x6d]
cmp al, byte [esi + ebx + 0x6e]
je 0x4f49b4
lea esi, [esi + eax*4]
lea ecx, [eax + 1]
mov eax, dword [esi + 0xf4]
test eax, eax
mov dword [esp], eax
je 0x4f4960
mov edx, dword [eax]
mov dword [esi + 0xf4], edx
mov eax, dword [edi + 4]
mov edx, dword [esp]
mov dword [esp + 4], eax
mov ecx, eax
nop
mov eax, dword [ecx]
add edx, 0xc
add ecx, 0xc
mov dword [edx - 0xc], eax
mov eax, dword [ecx - 8]
mov dword [edx - 8], eax
mov eax, dword [ecx - 4]
mov dword [edx - 4], eax
sub ebx, 1
jne 0x4f4840
mov eax, dword [esp + 4]
mov edx, dword [esi + 0xf0]
mov dword [eax], edx
mov dword [esi + 0xf0], eax
mov eax, dword [esp]
mov dword [edi + 4], eax
mov eax, dword [esp + 8]
mov ebx, dword [eax + 8]
mov eax, dword [eax]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], eax
movzx ebx, word [edi + 2]
mov eax, dword [esp + 0x1c]
lea edx, [ebp*4]
lea ecx, [ebp*8]
cmp edx, eax
setbe dl
cmp ebx, ecx
mov esi, ebx
setbe cl
and edx, ecx
lea ecx, [ebp + ebp]
movzx edx, dl
cmp ecx, eax
mov eax, dword [esp + 4]
setb cl
movzx ecx, cl
add esi, ecx
lea edx, [esi + edx*2]
mov word [edi + 2], dx
movzx ebx, byte [eax + 1]
movzx ecx, dx
lea esi, [ecx + 6]
add ecx, dword [esp + 0x18]
add ebx, ebx
imul ebx, esi
lea esi, [ecx + ecx*2]
lea eax, [esi + esi]
cmp eax, ebx
jbe 0x4f49c0
xor eax, eax
cmp ebx, ecx
seta al
shl ecx, 2
cmp ecx, ebx
mov esi, eax
setbe cl
add edx, 3
movzx ecx, cl
mov word [edi + 2], dx
lea ecx, [esi + ecx + 1]
mov eax, dword [esp]
lea edx, [ebp + ebp*2]
movzx ebx, word [esp + 0x14]
mov esi, dword [esp + 4]
lea eax, [eax + edx*2]
mov word [eax + 2], bx
movzx ebx, word [esp + 0x20]
mov word [eax + 4], bx
movzx edx, byte [esi]
mov byte [eax + 1], cl
mov byte [eax], dl
movzx eax, word [esp + 0xe]
add eax, 1
mov word [edi], ax
mov edi, dword [edi + 8]
cmp edi, dword [esp + 0x10]
jne 0x4f47e2
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 8]
mov dword [eax], edi
mov dword [eax + 4], edi
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 8]
movzx eax, byte [edx + ecx + 0x48]
lea eax, [eax + eax*2]
shl eax, 2
mov dword [esp + 4], eax
mov eax, edx
mov edx, dword [edx + 0x34]
mov dword [esp], edx
mov edx, dword [eax + 0x38]
mov dword [esp + 0x10], edx
sub edx, dword [esp]
cmp dword [esp + 4], edx
ja 0x4f4bb0
mov edx, dword [esp + 4]
add edx, dword [esp]
mov dword [eax + 0x34], edx
mov edx, dword [esp]
test edx, edx
jne 0x4f4833
mov eax, dword [esp + 8]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004f3bc0
mov eax, dword [edi + 4]
mov dword [esp], eax
jmp 0x4f4885
lea eax, [ecx + ecx*8]
cmp eax, ebx
setbe al
shl esi, 2
movzx eax, al
mov dword [esp + 0x24], eax
xor eax, eax
cmp esi, ebx
setbe al
mov esi, eax
mov eax, dword [esp + 0x24]
lea eax, [eax + esi + 4]
mov esi, ecx
shl esi, 4
sub esi, ecx
xor ecx, ecx
cmp esi, ebx
setbe cl
add ecx, eax
add edx, ecx
mov word [edi + 2], dx
jmp 0x4f4905
mov eax, dword [esp + 8]
mov ebx, dword [eax + 0xf0]
test ebx, ebx
mov dword [esp], ebx
je 0x4f4a80
mov edx, dword [ebx]
mov dword [eax + 0xf0], edx
mov edx, dword [edi + 2]
mov eax, dword [esp]
mov dword [eax], edx
movzx edx, word [edi + 6]
mov word [eax + 4], dx
mov dword [edi + 4], eax
movzx edx, byte [eax + 1]
cmp dl, 0x1d
ja 0x4f4a70
add edx, edx
movzx ecx, dl
mov byte [eax + 1], dl
xor edx, edx
cmp dword [esp + 0x1c], 3
mov eax, dword [esp + 8]
seta dl
add dx, word [eax + 0x10]
mov ebx, dword [eax + 8]
mov eax, dword [eax]
mov dword [esp + 4], ebx
add edx, ecx
mov dword [esp + 0x10], eax
mov eax, ebx
mov word [edi + 2], dx
jmp 0x4f48c5
mov ecx, 0x78
mov edx, 0x78
jmp 0x4f4a3a
mov ebx, eax
movzx eax, byte [eax + 0x48]
mov esi, dword [ebx + 0x34]
lea edx, [eax + eax*2]
mov eax, ebx
mov ebx, dword [ebx + 0x38]
mov dword [esp], esi
shl edx, 2
mov ecx, ebx
mov dword [esp + 4], ebx
sub ecx, esi
cmp edx, ecx
ja 0x4f4b80
add edx, esi
mov dword [eax + 0x34], edx
mov eax, dword [esp]
test eax, eax
jne 0x4f4a19
mov eax, dword [esp + 8]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004f3bc0
mov edx, 1
mov edi, eax
call fcn.004f4420
test eax, eax
mov dword [edi + 4], eax
mov dword [edi], eax
je 0x4f49a4
mov edi, dword [esp + 8]
mov edx, dword [edi + 8]
mov word [edx + 2], ax
shr eax, 0x10
mov word [edx + 4], ax
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edi
mov edi, dword [esp + 8]
mov ebx, dword [edi + 8]
mov word [ebx + 2], ax
shr eax, 0x10
mov dword [esp + 4], ebx
mov word [ebx + 4], ax
mov eax, dword [edi]
mov edi, dword [edi + 4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], eax
jmp 0x4f47ad
xor eax, eax
cmp edi, esi
setne al
sub dword [ebx + 0x3c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x4f47ad
movzx ecx, byte [eax + 1]
mov dword [esp + 4], eax
mov byte [esp], cl
jmp 0x4f4722
mov eax, dword [esp + 8]
xor edx, edx
call fcn.004f4420
test eax, eax
mov dword [esp + 0x28], eax
jne 0x4f4785
jmp 0x4f49a4
mov eax, dword [esp + 8]
xor edx, edx
call fcn.004f4170
mov dword [esp], eax
jmp 0x4f4aac
movzx eax, byte [ebx + 3]
cmp al, 0x1f
ja 0x4f4740
add eax, 1
mov byte [ebx + 3], al
jmp 0x4f4740
mov eax, dword [esp + 8]
mov edx, ecx
call fcn.004f4170
mov dword [esp], eax
jmp 0x4f4999