Function at 0x5add60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x14]
push ebx
push ebp
push esi
movzx si, byte [eax]
push edi
lea edx, [eax + 2]
movzx di, byte [eax + 1]
shl esi, 8
add esi, edi
mov edi, edx
and esi, 0xffff
sub edi, eax
cmp edi, esi
mov dword [esp + 0x10], edx
jge 0x5ae015
mov ebx, 1
mov edi, 0x11
xor esi, esi
xor eax, eax
mov al, byte [edx + esi + 1]
add edi, eax
inc esi
cmp esi, 0x10
jl 0x5add9e
mov al, byte [edx]
mov dword [esp + 0x18], edi
test al, 0xf0
je 0x5adecf
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5ae01f
xor eax, eax
xor edi, edi
mov dword [esp + 0x14], ebx
mov ebp, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [edx + eax + 1]
cmp ebp, ebx
jle 0x5adde8
inc eax
mov dword [esp + 0x14], 1
jmp 0x5ade0e
mov ebp, dword [ecx + 0x4164]
mov ebx, esi
shl ebx, 0xf
add ebx, esi
mov dl, al
inc dl
lea ebx, [edi + ebx*2]
inc edi
mov byte [ebp + ebx*4 + 1], dl
mov edx, dword [esp + 0x14]
inc edx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x10]
cmp eax, 0x10
jl 0x5addcf
mov eax, esi
shl eax, 0xf
add eax, esi
lea edx, [edi + eax*2]
mov eax, dword [ecx + 0x4164]
mov byte [eax + edx*4 + 1], 0
mov edx, dword [ecx + 0x4164]
mov eax, esi
shl eax, 0xf
add eax, esi
shl eax, 3
mov dword [eax + edx + 0x40000], edi
mov esi, dword [ecx + 0x4164]
xor edx, edx
xor ebp, ebp
mov dl, byte [eax + esi + 1]
mov dword [esp + 0x14], edx
mov edx, eax
mov word [edx + esi + 2], bp
mov esi, dword [ecx + 0x4164]
add edx, 4
inc ebp
mov bl, byte [edx + esi + 1]
mov edi, ebx
mov byte [esp + 0x1c], bl
mov ebx, dword [esp + 0x14]
and edi, 0xff
cmp edi, ebx
je 0x5ade53
mov bl, byte [esp + 0x1c]
test bl, bl
je 0x5ade93
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, edi
jne 0x5ade86
mov dword [esp + 0x14], ebx
jmp 0x5ade53
mov esi, dword [ecx + 0x4164]
xor edi, edi
mov edx, dword [eax + esi + 0x40000]
test edx, edx
jle 0x5adfe3
mov edx, dword [esp + 0x10]
mov ebp, eax
mov bl, byte [edx + edi + 0x11]
inc edi
mov byte [esi + ebp], bl
mov esi, dword [ecx + 0x4164]
add ebp, 4
cmp edi, dword [eax + esi + 0x40000]
jl 0x5adeb0
jmp 0x5adfe7
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5ae036
xor eax, eax
xor ebp, ebp
mov dword [esp + 0x14], ebx
mov edi, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [edx + eax + 1]
cmp edi, ebx
jle 0x5adefd
inc eax
mov dword [esp + 0x14], 1
jmp 0x5adf24
mov ebx, dword [ecx + 0x4168]
mov edi, esi
shl edi, 0xf
add edi, esi
mov dl, al
inc dl
lea edi, [ebp + edi*2]
inc ebp
mov byte [ebx + edi*4 + 1], dl
mov edx, dword [esp + 0x14]
inc edx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x10]
cmp eax, 0x10
jl 0x5adee4
mov eax, esi
mov edi, esi
shl eax, 0xf
add eax, esi
shl edi, 0xf
lea edx, [ebp + eax*2]
mov eax, dword [ecx + 0x4168]
add edi, esi
mov byte [eax + edx*4 + 1], 0
mov eax, dword [esp + 0x18]
mov edx, dword [ecx + 0x4168]
add eax, 0xffffffef
shl edi, 3
cmp ebp, eax
mov dword [edx + edi + 0x40000], ebp
jne 0x5ae04d
mov esi, dword [ecx + 0x4168]
xor ebx, ebx
xor ebp, ebp
mov edx, edi
mov bl, byte [edi + esi + 1]
mov dword [esp + 0x14], ebx
mov word [edx + esi + 2], bp
mov esi, dword [ecx + 0x4168]
add edx, 4
inc ebp
mov al, byte [edx + esi + 1]
and eax, 0xff
cmp eax, ebx
je 0x5adf79
mov bl, byte [edx + esi + 1]
test bl, bl
je 0x5adfae
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, eax
jne 0x5adfa1
mov dword [esp + 0x14], ebx
jmp 0x5adf79
mov eax, dword [ecx + 0x4168]
xor esi, esi
mov edx, dword [edi + eax + 0x40000]
test edx, edx
jle 0x5adfe3
mov edx, dword [esp + 0x10]
mov ebp, edi
mov bl, byte [edx + esi + 0x11]
inc esi
mov byte [eax + ebp], bl
mov eax, dword [ecx + 0x4168]
add ebp, 4
cmp esi, dword [edi + eax + 0x40000]
jl 0x5adfc7
jmp 0x5adfe7
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add edx, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], edx
movzx si, byte [eax]
movzx di, byte [eax + 1]
shl esi, 8
add esi, edi
mov edi, edx
and esi, 0xffff
sub edi, eax
cmp edi, esi
jl 0x5add92
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
lea ecx, [esp + 0x24]
push 0x1ca9290
push ecx
mov dword [esp + 0x2c], 0x12
call fcn.004a9d22
lea edx, [esp + 0x24]
push 0x1ca9290
push edx
mov dword [esp + 0x2c], 0x13
call fcn.004a9d22
lea eax, [esp + 0x24]
push 0x1ca9290
push eax
mov dword [esp + 0x2c], 0x14
call fcn.004a9d22
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop