Function at 0x4bae61
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x5b4400
call fcn.00576dcc
sub esp, 0x3c
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x10], esi
call fcn.004c3a7c
mov ebx, dword [ebp + 0xc]
lea ecx, [ebp - 0x48]
mov eax, ebx
imul eax, dword [ebp + 0x10]
lea eax, [eax + eax*2]
push eax
call fcn.004c3a88
mov eax, dword [ebp - 0x40]
xor edi, edi
cmp eax, edi
jne 0x4bae96
mov dword [esi], 1
jmp 0x4baeb6
cmp byte [ebp + 0x14], 0
mov dword [ebp - 0x20], eax
je 0x4bb078
mov esi, dword [ebp + 0x18]
cmp word [esi + 0x16], 8
je 0x4baebd
mov eax, dword [ebp - 0x10]
mov dword [eax], 0x2f
xor eax, eax
jmp 0x4bb1d7
movzx eax, word [esi + 0xc]
imul eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], edi
call fcn.004b7879
movzx eax, word [esi + 0xc]
imul eax, dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 4], edi
mov dword [ebp + 0x18], edi
mov dword [ebp + 0x14], edi
jle 0x4baf1e
mov ecx, dword [ebp - 0x10]
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.004ba23b
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp + 0x14]
cmp ax, word [ebp + 0x18]
mov word [ecx + edx*2], ax
jle 0x4baf0e
mov dword [ebp + 0x18], eax
movzx eax, word [esi + 0xc]
imul eax, dword [ebp + 0x10]
inc dword [ebp + 0x14]
cmp dword [ebp + 0x14], eax
jl 0x4baee9
movsx eax, word [ebp + 0x18]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
call fcn.004d00a4
mov dword [ebp + 0x14], edi
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 1
mov edi, 0x62cf44
xor eax, eax
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x18], eax
jbe 0x4bb00b
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp + 0x18]
movsx eax, word [ecx + eax]
mov ecx, dword [ebp + 8]
push eax
push dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
call fcn.004b8bfa
test al, al
je 0x4bb03d
push dword [ebp - 0x24]
xor eax, eax
mov ecx, dword [ebp - 0x10]
push dword [ebp - 0x28]
push eax
push eax
push eax
push eax
push dword [ebp + 0x14]
push 3
push ebx
push dword [ebp + 0xc]
call fcn.004ba0c7
test al, al
je 0x4bb03d
mov ecx, edi
call fcn.004b1763
cmp dword [eax + 4], 1
jne 0x4bafe6
mov ecx, edi
call fcn.004b1763
cmp dword [eax], 0
je 0x4bafe6
mov ecx, edi
call fcn.004b1763
mov ecx, edi
mov dword [ebp - 0x24], eax
call fcn.004b1763
mov esi, dword [ebp + 0x10]
push dword [eax + 8]
lea eax, [esi + esi*2]
push eax
mov eax, dword [ebp - 0x24]
push dword [ebp - 0x14]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x4bafeb
mov esi, dword [ebp + 0x10]
xor eax, eax
test eax, eax
jne 0x4bb048
inc dword [ebp - 0x18]
add dword [ebp + 0x18], 2
lea eax, [ebx + ebx*2]
add dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x14]
add dword [ebp - 0x14], eax
cmp dword [ebp - 0x18], esi
jb 0x4baf5d
mov eax, dword [ebp + 0x10]
inc dword [ebp + 0x14]
add eax, eax
add dword [ebp - 0x1c], eax
cmp dword [ebp + 0x14], 3
jb 0x4baf40
and byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.004c7789
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004c7789
jmp 0x4bb1cf
mov eax, dword [ebp - 0x10]
mov dword [eax], 3
jmp 0x4bb051
mov eax, dword [ebp - 0x10]
mov dword [eax], 0xe
lea ecx, [ebp - 0x48]
call fcn.004c3be9
and byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
mov esi, eax
call fcn.004c7789
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004c7789
jmp 0x4bb212
mov ecx, dword [ebp + 0x18]
xor eax, eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], edi
cmp word [ecx + 0x16], 0x10
lea ecx, [ebp - 0x34]
sete al
inc eax
imul eax, ebx
push eax
call fcn.004d00a4
mov dword [ebp + 0x14], edi
mov dword [ebp - 4], 2
mov edi, 0x62cf44
xor eax, eax
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x18], eax
jle 0x4bb1b6
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x1c], eax
lea eax, [ebx + ebx*2]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
add ecx, eax
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp + 0x18]
mov ax, word [eax + 0x16]
cmp ax, 8
jne 0x4bb105
mov ecx, dword [ebp + 8]
push ebx
push dword [ebp - 0x30]
call fcn.004b8bfa
test al, al
je 0x4bb1e8
xor eax, eax
test ebx, ebx
jbe 0x4bb156
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x30]
mov cl, byte [ecx + eax]
inc eax
mov byte [esi], cl
add esi, 3
cmp eax, ebx
jb 0x4bb0f3
jmp 0x4bb156
cmp ax, 0x10
jne 0x4bb156
mov ecx, dword [ebp + 8]
lea eax, [ebx + ebx]
push eax
push dword [ebp - 0x30]
call fcn.004b8bfa
test al, al
je 0x4bb1e8
test ebx, ebx
jbe 0x4bb156
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x24], ebx
xor eax, eax
mov ebx, 0xffff
mov ah, byte [ecx + 1]
mov al, byte [ecx]
movzx eax, ax
imul eax, eax, 0xff
cdq
idiv ebx
inc ecx
inc ecx
mov byte [esi], al
add esi, 3
dec dword [ebp - 0x24]
jne 0x4bb12f
mov ebx, dword [ebp + 0xc]
mov ecx, edi
call fcn.004b1763
cmp dword [eax + 4], 1
jne 0x4bb195
mov ecx, edi
call fcn.004b1763
cmp dword [eax], 0
je 0x4bb195
mov ecx, edi
call fcn.004b1763
mov ecx, edi
mov esi, eax
call fcn.004b1763
push dword [eax + 8]
mov eax, dword [ebp + 0x10]
lea eax, [eax + eax*2]
push eax
push dword [ebp - 0x1c]
call dword [esi]
neg eax
sbb eax, eax
inc eax
jmp 0x4bb197
xor eax, eax
test eax, eax
jne 0x4bb1f3
mov eax, dword [ebp - 0x28]
inc dword [ebp - 0x18]
add dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
add dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp + 0x10]
jl 0x4bb0c9
inc dword [ebp + 0x14]
cmp dword [ebp + 0x14], 3
jl 0x4bb0a7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.004c7789
lea ecx, [ebp - 0x48]
call fcn.004c3be9
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14
mov eax, dword [ebp - 0x10]
mov dword [eax], 3
jmp 0x4bb1fc
mov eax, dword [ebp - 0x10]
mov dword [eax], 0xe
lea ecx, [ebp - 0x48]
call fcn.004c3be9
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
mov esi, eax
call fcn.004c7789
mov eax, esi
jmp 0x4bb1d7