Function at 0x4cb8ea
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov eax, dword [ebx]
mov esi, edx
mov dword [esp + 0xc], esi
push edi
mov edi, ecx
test eax, eax
jne 0x4cba53
mov ecx, dword [ebx + 4]
cmp ecx, 8
jne 0x4cb966
xor ecx, ecx
test esi, esi
je 0x4cb931
nop
mov al, byte [ecx + ebp]
inc ecx
mov byte [edi + 2], al
mov byte [edi + 1], al
mov byte [edi], al
mov byte [edi + 3], 0xff
add edi, 4
cmp ecx, esi
jne 0x4cb91a
cmp dword [ebx + 0x10], 0
je 0x4cbcd1
mov eax, esi
neg eax
lea ecx, [edi + eax*4]
test esi, esi
je 0x4cbcd1
movzx eax, byte [ecx]
cmp eax, dword [ebx + 0x14]
jne 0x4cb956
mov byte [ecx + 3], 0
add ecx, 4
sub esi, 1
jne 0x4cb94a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp ecx, 0x10
jne 0x4cb9b7
xor edx, edx
test esi, esi
je 0x4cbcd1
inc edi
lea esp, [esp]
mov al, byte [ebp + edx*2]
mov byte [edi + 1], al
mov byte [edi], al
mov byte [edi - 1], al
cmp dword [ebx + 0x10], 0
je 0x4cb9a2
movzx ecx, byte [ebp + edx*2 + 1]
movzx eax, al
shl eax, 8
add ecx, eax
cmp ecx, dword [ebx + 0x14]
jne 0x4cb9a2
xor al, al
jmp 0x4cb9a4
or al, 0xff
mov byte [edi + 2], al
inc edx
add edi, 4
cmp edx, esi
jne 0x4cb97a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, 1
mov dword [esp + 0x10], 0
shl eax, cl
dec eax
mov dword [esp + 0x18], eax
test esi, esi
je 0x4cbcd1
lea ecx, [edi + 1]
mov dword [esp + 0x14], ecx
mov edx, dword [ebx + 4]
xor edi, edi
test edx, edx
je 0x4cba17
mov ebx, dword [esp + 0x10]
lea ecx, [ecx]
mov al, bl
mov cl, 7
and al, 7
add edi, edi
sub cl, al
mov eax, ebx
shr eax, 3
inc ebx
mov al, byte [eax + ebp]
shr al, cl
and al, 1
movzx eax, al
or edi, eax
sub edx, 1
jne 0x4cb9ea
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x24]
imul eax, edi, 0xff
xor edx, edx
div dword [esp + 0x18]
mov byte [ecx + 1], al
mov byte [ecx], al
mov byte [ecx - 1], al
cmp dword [ebx + 0x10], 0
je 0x4cba3a
cmp edi, dword [ebx + 0x14]
jne 0x4cba3a
xor al, al
jmp 0x4cba3c
or al, 0xff
mov byte [ecx + 2], al
add ecx, 4
mov dword [esp + 0x14], ecx
sub esi, 1
jne 0x4cb9da
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp eax, 2
jne 0x4cbb50
cmp dword [ebx + 4], 8
jne 0x4cbad8
test esi, esi
je 0x4cba8b
mov ebx, esi
mov edi, edi
push 3
mov edx, ebp
mov ecx, edi
call fcn.004d07a4
mov byte [edi + 3], 0xff
add esp, 4
add ebp, 3
add edi, 4
sub ebx, 1
jne 0x4cba6a
mov ebx, dword [esp + 0x24]
cmp dword [ebx + 0x10], 0
je 0x4cbcd1
mov eax, esi
neg eax
lea ecx, [edi + eax*4]
test esi, esi
je 0x4cbcd1
lea ebx, [ebx]
movzx eax, byte [ecx]
cmp eax, dword [ebx + 0x14]
jne 0x4cbac8
movzx eax, byte [ecx + 1]
cmp eax, dword [ebx + 0x18]
jne 0x4cbac8
movzx eax, byte [ecx + 2]
cmp eax, dword [ebx + 0x1c]
jne 0x4cbac8
mov byte [ecx + 3], 0
add ecx, 4
sub esi, 1
jne 0x4cbaaa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
test esi, esi
je 0x4cbcd1
add edi, 2
add ebp, 4
lea esp, [esp]
mov al, byte [ebp - 4]
mov dl, byte [ebp - 2]
mov dh, byte [ebp]
mov byte [edi - 2], al
mov byte [edi - 1], dl
mov byte [edi], dh
cmp dword [ebx + 0x10], 0
je 0x4cbb38
movzx ecx, al
movzx eax, byte [ebp - 3]
shl ecx, 8
add ecx, eax
cmp ecx, dword [ebx + 0x14]
jne 0x4cbb38
movzx eax, byte [ebp - 1]
movzx ecx, dl
shl ecx, 8
add ecx, eax
cmp ecx, dword [ebx + 0x18]
jne 0x4cbb38
movzx eax, byte [ebp + 1]
movzx ecx, dh
shl ecx, 8
add ecx, eax
cmp ecx, dword [ebx + 0x1c]
jne 0x4cbb38
xor al, al
jmp 0x4cbb3a
or al, 0xff
mov byte [edi + 1], al
add ebp, 6
add edi, 4
sub esi, 1
jne 0x4cbaea
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp eax, 3
jne 0x4cbc11
cmp dword [ebx + 4], 8
jne 0x4cbb9b
xor eax, eax
mov dword [esp + 0x24], eax
test esi, esi
je 0x4cbcd1
movzx ecx, byte [eax + ebp]
mov eax, dword [ebx + 8]
push 4
lea edx, [eax + ecx*4]
mov ecx, edi
call fcn.004d07a4
mov eax, dword [esp + 0x28]
add esp, 4
inc eax
add edi, 4
mov dword [esp + 0x24], eax
cmp eax, esi
jne 0x4cbb6d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov dword [esp + 0x14], 0
test esi, esi
je 0x4cbcd1
mov eax, dword [ebx + 4]
xor edx, edx
mov dword [esp + 0x18], eax
test eax, eax
je 0x4cbbeb
mov ebx, dword [esp + 0x14]
mov esi, eax
mov al, bl
mov cl, 7
and al, 7
add edx, edx
sub cl, al
mov eax, ebx
shr eax, 3
inc ebx
mov al, byte [eax + ebp]
shr al, cl
and al, 1
movzx eax, al
or edx, eax
sub esi, 1
jne 0x4cbbbe
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x24]
mov eax, dword [ebx + 8]
mov ecx, edi
push 4
lea edx, [eax + edx*4]
call fcn.004d07a4
add esp, 4
add edi, 4
sub esi, 1
mov dword [esp + 0x10], esi
jne 0x4cbbab
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp eax, 4
jne 0x4cbc7f
xor ecx, ecx
cmp dword [ebx + 4], 8
jne 0x4cbc4f
test esi, esi
je 0x4cbcd1
inc edi
lea ecx, [ecx]
mov al, byte [ebp + ecx*2]
lea edi, [edi + 4]
mov byte [edi - 3], al
mov byte [edi - 4], al
mov byte [edi - 5], al
movzx eax, byte [ebp + ecx*2 + 1]
inc ecx
mov byte [edi - 2], al
cmp ecx, esi
jne 0x4cbc2a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
test esi, esi
je 0x4cbcd1
inc edi
mov edi, edi
mov al, byte [ebp + ecx*4]
lea edi, [edi + 4]
mov byte [edi - 3], al
mov byte [edi - 4], al
mov byte [edi - 5], al
movzx eax, byte [ebp + ecx*4 + 2]
inc ecx
mov byte [edi - 2], al
cmp ecx, esi
jne 0x4cbc5a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp eax, 6
jne 0x4cbcd1
cmp dword [ebx + 4], 8
jne 0x4cbca0
shl esi, 2
mov edx, ebp
push esi
call fcn.004d07a4
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
test esi, esi
je 0x4cbcd1
add edi, 2
add ebp, 4
movzx eax, byte [ebp - 4]
lea ebp, [ebp + 8]
mov byte [edi - 2], al
lea edi, [edi + 4]
movzx eax, byte [ebp - 0xa]
mov byte [edi - 5], al
movzx eax, byte [ebp - 8]
mov byte [edi - 4], al
movzx eax, byte [ebp - 6]
mov byte [edi - 3], al
sub esi, 1
jne 0x4cbcaa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret