Function at 0x5b4490
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 0x5b4745
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 0x5b44ce
mov al, byte [edx]
mov dword [esp + 0x18], edi
test al, 0xf0
je 0x5b45ff
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5b474f
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 0x5b4518
inc eax
mov dword [esp + 0x14], 1
jmp 0x5b453e
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 0x5b44ff
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 0x5b4583
mov bl, byte [esp + 0x1c]
test bl, bl
je 0x5b45c3
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, edi
jne 0x5b45b6
mov dword [esp + 0x14], ebx
jmp 0x5b4583
mov esi, dword [ecx + 0x4164]
xor edi, edi
mov edx, dword [eax + esi + 0x40000]
test edx, edx
jle 0x5b4713
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 0x5b45e0
jmp 0x5b4717
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5b4766
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 0x5b462d
inc eax
mov dword [esp + 0x14], 1
jmp 0x5b4654
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 0x5b4614
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 0x5b477d
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 0x5b46a9
mov bl, byte [edx + esi + 1]
test bl, bl
je 0x5b46de
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, eax
jne 0x5b46d1
mov dword [esp + 0x14], ebx
jmp 0x5b46a9
mov eax, dword [ecx + 0x4168]
xor esi, esi
mov edx, dword [edi + eax + 0x40000]
test edx, edx
jle 0x5b4713
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 0x5b46f7
jmp 0x5b4717
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 0x5b44c2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
lea ecx, [esp + 0x24]
push 0x1b04b00
push ecx
mov dword [esp + 0x2c], 0x12
call fcn.004af2d1
lea edx, [esp + 0x24]
push 0x1b04b00
push edx
mov dword [esp + 0x2c], 0x13
call fcn.004af2d1
lea eax, [esp + 0x24]
push 0x1b04b00
push eax
mov dword [esp + 0x2c], 0x14
call fcn.004af2d1
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop