Function at 0x4f6fc5
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xb8
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
mov dword [esp + 0x44], edi
mov eax, dword [edi]
mov dword [eax + 8], ebp
call fcn.004f6785
mov edx, dword [edi]
mov ebx, dword [edx + 8]
mov dword [esp + 0x14], ebx
test eax, eax
jne 0x4f6ffd
push ebp
mov edx, ebx
mov ecx, edi
call fcn.004f6059
jmp 0x4f7487
xor eax, eax
push 3
pop edx
inc eax
cmp ebx, edx
jne 0x4f7029
cmp dword [edi + 0x47ec], edx
je 0x4f701f
cmp dword [edi + 0x47e8], ebp
jne 0x4f7029
cmp dword [edi + 0x47e4], ebp
jne 0x4f7029
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebx
jmp 0x4f7031
mov dword [esp + 0x18], ebp
test ebx, ebx
jle 0x4f6fee
mov dword [esp + 0x20], ebp
lea esi, [esp + 0x58]
xorps xmm0, xmm0
lea ebp, [edi + 0x46a0]
movups xmmword [esp + 0x30], xmm0
mov dword [esp + 0x1c], ebp
mov eax, dword [edi]
mov eax, dword [eax]
add eax, edx
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov dword [ebp + 0x34], eax
pop ecx
test eax, eax
je 0x4f7467
mov eax, dword [edi + 0x4684]
cdq
idiv dword [ebp]
and dword [esi + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esi - 4], eax
mov eax, dword [edi + 0x4688]
cdq
idiv dword [ebp + 4]
xor edx, edx
mov ebp, eax
mov eax, dword [esp + 0x10]
mov ecx, ebp
mov dword [esi], ebp
sar ecx, 1
dec eax
mov dword [esi + 8], ecx
mov ecx, dword [edi]
add eax, dword [ecx]
xor ecx, ecx
div dword [esp + 0x10]
inc ecx
mov dword [esi + 4], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x28]
mov dword [esi - 8], eax
mov dword [esi - 0xc], eax
mov eax, dword [esp + 0x10]
cmp eax, ecx
jne 0x4f70cf
cmp ebp, ecx
jne 0x4f70c3
mov eax, 0x4f68a0
jmp 0x4f70f1
cmp ebp, 2
jne 0x4f70ec
mov eax, 0x4f68b0
jmp 0x4f70f1
cmp eax, 2
jne 0x4f70ec
cmp ebp, ecx
jne 0x4f70df
mov eax, 0x4f68f0
jmp 0x4f70f1
cmp ebp, 2
jne 0x4f70ec
mov eax, dword [edi + 0x4814]
jmp 0x4f70f1
mov eax, 0x4f6bf0
mov ebp, dword [esp + 0x1c]
mov dword [esi - 0x10], eax
add ebp, 0x48
mov eax, dword [esp + 0x20]
add esi, 0x20
inc eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], eax
push 3
pop edx
cmp eax, ebx
jl 0x4f704b
mov edx, dword [edi]
push ecx
push dword [edx + 4]
mov edx, dword [edx]
push 4
pop ecx
call fcn.004f254b
mov edx, dword [edi]
mov esi, eax
mov dword [esp + 0x48], esi
pop ecx
pop ecx
test esi, esi
je 0x4f7469
xor ecx, ecx
mov dword [esp + 0x10], ecx
cmp dword [edx + 4], ecx
jbe 0x4f7430
mov eax, dword [edx]
and dword [esp + 0x24], 0
imul eax, ecx
lea ebp, [esi + eax*4]
mov dword [esp + 0x2c], ebp
test ebx, ebx
jle 0x4f7222
lea ebp, [edi + 0x46bc]
mov edi, dword [esp + 0x18]
lea esi, [esp + 0x60]
mov eax, dword [esi - 8]
lea ecx, [esi - 0x10]
sar eax, 1
lea edx, [esi - 0x14]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
cmp dword [esi], eax
jl 0x4f7197
mov eax, dword [edx]
mov edx, ecx
mov dword [esp + 0x20], ecx
jmp 0x4f71a7
mov eax, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov eax, dword [ecx]
push dword [esi - 0xc]
mov ecx, dword [esi - 0x18]
push dword [esi - 4]
push eax
push dword [edx]
push dword [ebp + 0x18]
call dword [0x5035d8]
call dword [esi - 0x18]
mov ecx, dword [esp + 0x38]
add esp, 0x14
mov dword [esp + ecx*4 + 0x30], eax
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x4f71f9
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
and dword [esi], 0
inc dword [esi + 4]
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [esi + 4]
cmp eax, dword [ebp]
jge 0x4f71f9
mov eax, dword [ebp + 4]
add eax, edx
mov edx, dword [esp + 0x18]
mov dword [edx], eax
inc ecx
add esi, 0x20
add ebp, 0x48
mov dword [esp + 0x24], ecx
cmp ecx, ebx
jl 0x4f716e
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x44]
mov dword [esp + 0x14], ebx
mov edx, dword [edi]
cmp dword [edx + 8], 3
jne 0x4f729b
cmp dword [esp + 0x18], 0
je 0x4f7272
xor esi, esi
cmp dword [edx], esi
jbe 0x4f741c
mov ecx, dword [esp + 0x34]
lea edx, [ebp + 2]
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
sub ebp, ecx
sub eax, ecx
mov ebx, eax
mov al, byte [ecx + ebp]
inc esi
mov byte [edx - 2], al
mov al, byte [ecx]
mov byte [edx - 1], al
mov al, byte [ecx + ebx]
inc ecx
mov byte [edx], al
lea edx, [edx + 4]
mov byte [edx - 3], 0xff
mov eax, dword [edi]
cmp esi, dword [eax]
jb 0x4f724e
jmp 0x4f7414
mov esi, dword [edi + 0x4810]
mov ecx, esi
push 4
push dword [edx]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push ebp
call dword [0x5035d8]
call esi
add esp, 0x18
jmp 0x4f7418
cmp dword [edx + 8], 4
jne 0x4f73ee
mov eax, dword [edi + 0x47e8]
test eax, eax
jne 0x4f734c
and dword [esp + 0x24], eax
cmp dword [edx], eax
jbe 0x4f741c
mov esi, dword [esp + 0x3c]
add ebp, 2
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
sub eax, esi
mov dword [esp + 0x2c], eax
sub ebx, esi
mov eax, dword [esp + 0x38]
sub eax, esi
mov dword [esp + 0x28], eax
movzx edx, byte [esi]
movzx ecx, byte [esi + ebx]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 2], al
mov eax, dword [esp + 0x2c]
movzx ecx, byte [esi + eax]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 1], al
mov eax, dword [esp + 0x28]
movzx ecx, byte [esi + eax]
imul ecx, edx
mov byte [ebp + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [esp + 0x24]
shr eax, 8
inc ecx
mov byte [ebp], al
inc esi
mov eax, dword [edi]
lea ebp, [ebp + 4]
mov dword [esp + 0x24], ecx
cmp ecx, dword [eax]
jb 0x4f72e0
jmp 0x4f7414
mov ecx, dword [edx]
mov esi, dword [edi + 0x4810]
push 4
push ecx
mov ecx, esi
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push ebp
cmp eax, 2
jne 0x4f728b
call dword [0x5035d8]
call esi
mov eax, dword [edi]
xor esi, esi
add esp, 0x18
cmp dword [eax], esi
jbe 0x4f7418
mov ebx, dword [esp + 0x3c]
add ebp, 2
mov al, byte [ebp - 2]
movzx edx, byte [esi + ebx]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 2], al
mov al, byte [ebp - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [ebp - 1], al
mov al, byte [ebp]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
inc esi
mov byte [ebp], al
lea ebp, [ebp + 4]
mov eax, dword [edi]
cmp esi, dword [eax]
jb 0x4f738d
jmp 0x4f7414
xor esi, esi
cmp dword [edx], esi
jbe 0x4f741c
mov ebx, dword [esp + 0x30]
lea ecx, [ebp + 1]
mov al, byte [esi + ebx]
inc esi
mov byte [ecx + 1], al
mov byte [ecx], al
lea ecx, [ecx + 4]
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov eax, dword [edi]
cmp esi, dword [eax]
jb 0x4f73fb
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi]
inc ecx
mov esi, dword [esp + 0x40]
mov dword [esp + 0x10], ecx
cmp ecx, dword [edx + 4]
jb 0x4f7147
mov edx, dword [edx + 8]
mov ecx, edi
push 0
call fcn.004f6059
mov eax, dword [edi]
pop ecx
push 3
pop ecx
mov eax, dword [eax]
mov dword [0x65a614], eax
mov eax, dword [edi]
push 1
mov eax, dword [eax + 4]
mov dword [0x65a60c], eax
mov eax, dword [edi]
cmp dword [eax + 8], ecx
pop eax
cmovge eax, ecx
mov dword [0x65a618], eax
mov eax, esi
jmp 0x4f748a
mov edx, dword [edi]
mov edx, dword [edx + 8]
mov ecx, edi
push 0
call fcn.004f6059
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.outofmem
xor eax, eax
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb8
ret