Function at 0x5b4dc0
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 0x5b5075
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 0x5b4dfe
mov al, byte [edx]
mov dword [esp + 0x18], edi
test al, 0xf0
je 0x5b4f2f
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5b507f
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 0x5b4e48
inc eax
mov dword [esp + 0x14], 1
jmp 0x5b4e6e
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 0x5b4e2f
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 0x5b4eb3
mov bl, byte [esp + 0x1c]
test bl, bl
je 0x5b4ef3
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, edi
jne 0x5b4ee6
mov dword [esp + 0x14], ebx
jmp 0x5b4eb3
mov esi, dword [ecx + 0x4164]
xor edi, edi
mov edx, dword [eax + esi + 0x40000]
test edx, edx
jle 0x5b5043
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 0x5b4f10
jmp 0x5b5047
and eax, 0xf
mov esi, eax
cmp esi, ebx
jg 0x5b5096
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 0x5b4f5d
inc eax
mov dword [esp + 0x14], 1
jmp 0x5b4f84
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 0x5b4f44
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 0x5b50ad
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 0x5b4fd9
mov bl, byte [edx + esi + 1]
test bl, bl
je 0x5b500e
mov ebx, dword [esp + 0x14]
shl ebp, 1
inc ebx
cmp ebx, eax
jne 0x5b5001
mov dword [esp + 0x14], ebx
jmp 0x5b4fd9
mov eax, dword [ecx + 0x4168]
xor esi, esi
mov edx, dword [edi + eax + 0x40000]
test edx, edx
jle 0x5b5043
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 0x5b5027
jmp 0x5b5047
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 0x5b4df2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
lea ecx, [esp + 0x24]
push 0x1a6a288
push ecx
mov dword [esp + 0x2c], 0x12
call fcn.004b0d82
lea edx, [esp + 0x24]
push 0x1a6a288
push edx
mov dword [esp + 0x2c], 0x13
call fcn.004b0d82
lea eax, [esp + 0x24]
push 0x1a6a288
push eax
mov dword [esp + 0x2c], 0x14
call fcn.004b0d82
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop