Function at 0x4cfef8
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
movzx edx, word [edx + 0xe]
imul edx
call fcn.004cfa70
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
add eax, 0xd400
add eax, 0x4000
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
call fcn.004b00a4
mov dword [ebp - 0x3c], eax
push ebp
push 0x4d038f
push dword fs:[0]
mov dword fs:[0], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
imul dword [edx + 8]
add eax, eax
call fcn.004b00a4
mov dword [ebp - 0x40], eax
push ebp
push 0x4d0372
push dword fs:[0]
mov dword fs:[0], esp
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
mov edx, 0xc000
mov eax, dword [ebp - 0x3c]
call fcn.004b010c
mov dword [ebp - 0x48], eax
mov edx, 0xd400
mov eax, dword [ebp - 0x3c]
call fcn.004b010c
mov dword [ebp - 0x18], eax
xor ebx, ebx
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
shr ecx, 8
mov byte [edx + eax*4], cl
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
shr ecx, 4
and cl, 0xf
mov byte [edx + eax*4 + 1], cl
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
and cl, 0xf
mov byte [edx + eax*4 + 2], cl
mov edx, dword [ebp - 0x4c]
xor ecx, ecx
mov dword [edx + eax*4 + 4], ecx
inc ebx
cmp ebx, 0x1000
jne 0x4cffa2
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x4d00a1
inc eax
mov dword [ebp - 0x54], eax
xor ebx, ebx
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
dec edx
sub edx, ebx
imul edx, dword [ebp - 0x20]
mov eax, dword [ebp - 8]
call fcn.004b010c
mov edx, eax
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
call fcn.004b0118
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov esi, dword [ebp - 4]
mov esi, dword [esi + 4]
dec esi
test esi, esi
jl 0x4d0097
inc esi
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 2]
and al, 0xf0
mov edi, eax
and edi, 0xff
shl edi, 4
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 1]
and al, 0xf0
and eax, 0xff
add di, ax
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
and al, 0xf0
and eax, 0xff
shr eax, 4
add di, ax
movzx eax, di
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x4c]
inc dword [edx + eax*4 + 4]
mov edx, 3
mov eax, dword [ebp - 0x14]
call fcn.004b010c
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x44]
mov word [eax], di
mov edx, 2
mov eax, dword [ebp - 0x44]
call fcn.004b010c
mov dword [ebp - 0x44], eax
dec esi
jne 0x4d002c
inc ebx
dec dword [ebp - 0x54]
jne 0x4cfff8
xor ebx, ebx
lea eax, [ebx + ebx*4]
mov edx, dword [ebp - 0x48]
xor ecx, ecx
mov dword [edx + eax*4 + 0x10], ecx
mov edx, dword [ebp - 0x48]
xor ecx, ecx
mov dword [edx + eax*4 + 0xc], ecx
mov edx, dword [ebp - 0x48]
xor ecx, ecx
mov dword [edx + eax*4 + 8], ecx
xor ecx, ecx
lea eax, [ebx + ebx*4]
mov edx, dword [ebp - 0x48]
lea edx, [edx + eax*4]
mov byte [edx + ecx], 0
mov edx, dword [ebp - 0x48]
lea eax, [edx + eax*4]
mov byte [eax + ecx + 3], 0xff
inc ecx
cmp ecx, 3
jne 0x4d00c3
inc ebx
cmp ebx, 0x100
jne 0x4d00a3
xor ebx, ebx
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
cmp dword [edx + eax*4 + 4], 0
jg 0x4d0102
inc ebx
cmp ebx, 0x1000
jl 0x4d00ec
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
lea eax, [edx + eax*4]
mov dword [ebp - 0x50], eax
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
lea eax, [edx + eax*4]
mov edx, dword [ebp - 0x48]
mov dword [edx + 0x10], eax
mov edx, 1
inc ebx
cmp ebx, 0x1000
jge 0x4d0157
lea eax, [ebx + ebx*2]
mov ecx, dword [ebp - 0x4c]
cmp dword [ecx + eax*4 + 4], 0
jle 0x4d014e
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx + eax*4]
mov esi, dword [ebp - 0x50]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x4c]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x50], eax
inc edx
inc ebx
cmp ebx, 0x1000
jl 0x4d012b
mov eax, dword [ebp - 0x50]
xor ecx, ecx
mov dword [eax + 8], ecx
mov eax, dword [ebp - 0x48]
mov dword [eax + 8], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
imul dword [edx + 8]
mov edx, dword [ebp - 0x48]
mov dword [edx + 0xc], eax
mov dword [ebp - 0x28], 1
mov edx, dword [ebp - 0x20]
add edx, 0xd400
mov eax, dword [ebp - 0x3c]
call fcn.004b010c
push eax
lea ecx, [ebp - 0x28]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov eax, dword [ebp - 0x48]
call fcn.004cfc00
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x28]
jle 0x4d01d7
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
dec eax
sub eax, ebx
jl 0x4d01d7
inc eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 8]
lea esi, [eax + ebx*4]
mov eax, esi
xor ecx, ecx
mov edx, 4
call fcn.004037d4
add esi, 4
dec dword [ebp - 0x54]
jne 0x4d01c1
mov eax, dword [ebp - 0x28]
dec eax
test eax, eax
jl 0x4d02ad
inc eax
mov dword [ebp - 0x54], eax
xor ebx, ebx
mov esi, dword [ebp + 8]
lea eax, [ebx + ebx*4]
mov edx, dword [ebp - 0x48]
mov ecx, dword [edx + eax*4 + 8]
test ecx, ecx
jle 0x4d02a0
mov edx, dword [ebp - 0x48]
mov eax, dword [edx + eax*4 + 0x10]
mov dword [ebp - 0x50], eax
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x50], 0
je 0x4d024f
mov eax, dword [ebp - 0x50]
mov byte [eax + 3], bl
mov eax, dword [ebp - 0x50]
movzx eax, byte [eax]
add dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x50]
movzx eax, byte [eax + 1]
add dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x50]
movzx eax, byte [eax + 2]
add dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 8]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x4d021d
mov edi, esi
mov eax, dword [ebp - 0x30]
shl eax, 4
or eax, 0xf
cdq
idiv ecx
mov byte [edi + 2], al
mov eax, dword [ebp - 0x34]
shl eax, 4
or eax, 0xf
cdq
idiv ecx
mov byte [edi + 1], al
mov eax, dword [ebp - 0x38]
shl eax, 4
or eax, 0xf
cdq
idiv ecx
mov byte [edi], al
mov byte [edi + 3], 0
cmp byte [edi + 2], 0x10
ja 0x4d02a0
cmp byte [edi + 1], 0x10
ja 0x4d02a0
cmp byte [edi], 0x10
ja 0x4d02a0
mov eax, esi
xor ecx, ecx
mov edx, 4
call fcn.004037d4
inc ebx
add esi, 4
dec dword [ebp - 0x54]
jne 0x4d01ec
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
shl eax, 3
call fcn.004cfa70
mov edi, eax
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
imul edx, edi
mov eax, dword [ebp - 0xc]
call fcn.00408504
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x4d035c
inc eax
mov dword [ebp - 0x54], eax
xor ebx, ebx
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
dec edx
sub edx, ebx
imul edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x40]
call fcn.004b010c
mov dword [ebp - 0x18], eax
mov edx, ebx
imul edx, edi
mov eax, dword [ebp - 0xc]
call fcn.004b010c
mov dword [ebp - 0x1c], eax
mov esi, dword [ebp - 4]
mov esi, dword [esi + 4]
dec esi
test esi, esi
jl 0x4d0356
inc esi
mov eax, dword [ebp - 0x18]
movzx eax, word [eax]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x4c]
mov al, byte [edx + eax*4 + 3]
mov edx, dword [ebp - 0x1c]
mov byte [edx], al
mov edx, 2
mov eax, dword [ebp - 0x18]
call fcn.004b010c
mov dword [ebp - 0x18], eax
mov edx, 1
mov eax, dword [ebp - 0x1c]
call fcn.004b010c
mov dword [ebp - 0x1c], eax
dec esi
jne 0x4d031e
inc ebx
dec dword [ebp - 0x54]
jne 0x4d02ea
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d0379
lea eax, [ebp - 0x40]
call fcn.004b00d4
ret