Function at 0x5b4390
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 0x5b4645
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 0x5b43ce
mov al, byte [edx]
mov dword [esp + 0x18], edi
test al, 0xf0
je 0x5b44ff
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5b464f
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 0x5b4418
inc eax
mov dword [esp + 0x14], 1
jmp 0x5b443e
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 0x5b43ff
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 0x5b4483
mov bl, byte [esp + 0x1c]
test bl, bl
je 0x5b44c3
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, edi
jne 0x5b44b6
mov dword [esp + 0x14], ebx
jmp 0x5b4483
mov esi, dword [ecx + 0x4164]
xor edi, edi
mov edx, dword [eax + esi + 0x40000]
test edx, edx
jle 0x5b4613
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 0x5b44e0
jmp 0x5b4617
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5b4666
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 0x5b452d
inc eax
mov dword [esp + 0x14], 1
jmp 0x5b4554
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 0x5b4514
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 0x5b467d
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 0x5b45a9
mov bl, byte [edx + esi + 1]
test bl, bl
je 0x5b45de
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, eax
jne 0x5b45d1
mov dword [esp + 0x14], ebx
jmp 0x5b45a9
mov eax, dword [ecx + 0x4168]
xor esi, esi
mov edx, dword [edi + eax + 0x40000]
test edx, edx
jle 0x5b4613
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 0x5b45f7
jmp 0x5b4617
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 0x5b43c2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
lea ecx, [esp + 0x24]
push 0x1db1c98
push ecx
mov dword [esp + 0x2c], 0x12
call fcn.004b0352
lea edx, [esp + 0x24]
push 0x1db1c98
push edx
mov dword [esp + 0x2c], 0x13
call fcn.004b0352
lea eax, [esp + 0x24]
push 0x1db1c98
push eax
mov dword [esp + 0x2c], 0x14
call fcn.004b0352
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop