Function at 0x4b18f8
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffff40
mov edi, ecx
mov dword [esp], edx
xor edx, edx
cmp dword [eax + 4], 0
je 0x4b1d32
lea eax, [esp + 0xa0]
mov edx, 0x20
call fcn.00407378
mov dword [esp + 0xa0], 0x20
lea eax, [esp + 0xa0]
push eax
mov eax, dword [esp + 4]
mov eax, dword [eax]
push eax
mov eax, dword [eax]
call dword [eax + 0x54]
lea eax, [esp + 0x24]
mov edx, 0x7c
call fcn.00407378
mov dword [esp + 0x24], 0x7c
push 0
push 1
lea eax, [esp + 0x2c]
push eax
push 0
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
push eax
mov eax, dword [eax]
call dword [eax + 0x64]
mov eax, dword [esp + 0xac]
sub eax, 0x10
je 0x4b1bd9
sub eax, 8
je 0x4b1ab6
sub eax, 8
jne 0x4b1d1c
mov eax, dword [esp + 0x48]
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov dword [esp + 0xc], eax
mov eax, edi
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x4b1d1c
inc eax
mov dword [esp + 0x1c], eax
mov dword [esp + 4], 0
mov eax, edi
mov edx, dword [eax]
call dword [edx + 0x2c]
dec eax
test eax, eax
jl 0x4b1a86
inc eax
mov dword [esp + 0x20], eax
xor esi, esi
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
mov bl, byte [eax + edx + 2]
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
mov al, byte [eax + edx + 1]
mov byte [esp + 0x18], al
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
mov al, byte [eax + edx]
xor edx, edx
mov dl, bl
shl edx, 0x10
xor ecx, ecx
mov cl, bl
shl ecx, 8
add edx, ecx
xor ecx, ecx
mov cl, bl
add edx, ecx
and edx, dword [esp + 0xb0]
xor ecx, ecx
mov cl, al
shl ecx, 0x10
xor ebx, ebx
mov bl, al
shl ebx, 8
add ecx, ebx
and eax, 0xff
add ecx, eax
and ecx, dword [esp + 0xb8]
add edx, ecx
xor eax, eax
mov al, byte [esp + 0x18]
shl eax, 0x10
xor ecx, ecx
mov cl, byte [esp + 0x18]
shl ecx, 8
add eax, ecx
xor ecx, ecx
mov cl, byte [esp + 0x18]
add eax, ecx
and eax, dword [esp + 0xb4]
add edx, eax
mov eax, dword [esp + 8]
mov dword [eax], edx
add dword [esp + 8], 4
inc esi
dec dword [esp + 0x20]
jne 0x4b19d5
mov eax, dword [esp + 0x34]
test eax, eax
jns 0x4b1a91
add eax, 3
sar eax, 2
shl eax, 2
add dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 8], eax
inc dword [esp + 4]
dec dword [esp + 0x1c]
jne 0x4b19be
jmp 0x4b1d1c
mov eax, dword [esp + 0x48]
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov dword [esp + 0xc], eax
mov eax, edi
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x4b1d1c
inc eax
mov dword [esp + 0x1c], eax
mov dword [esp + 4], 0
mov eax, edi
mov edx, dword [eax]
call dword [edx + 0x2c]
dec eax
test eax, eax
jl 0x4b1bab
inc eax
mov dword [esp + 0x20], eax
xor esi, esi
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
mov bl, byte [eax + edx + 2]
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
mov al, byte [eax + edx + 1]
mov byte [esp + 0x18], al
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
mov al, byte [eax + edx]
xor edx, edx
mov dl, bl
shl edx, 0x10
xor ecx, ecx
mov cl, bl
shl ecx, 8
add edx, ecx
xor ecx, ecx
mov cl, bl
add edx, ecx
and edx, dword [esp + 0xb0]
xor ecx, ecx
mov cl, al
shl ecx, 0x10
xor ebx, ebx
mov bl, al
shl ebx, 8
add ecx, ebx
and eax, 0xff
add ecx, eax
and ecx, dword [esp + 0xb8]
add edx, ecx
xor eax, eax
mov al, byte [esp + 0x18]
shl eax, 0x10
xor ecx, ecx
mov cl, byte [esp + 0x18]
shl ecx, 8
add eax, ecx
xor ecx, ecx
mov cl, byte [esp + 0x18]
add eax, ecx
and eax, dword [esp + 0xb4]
add edx, eax
mov eax, dword [esp + 8]
mov dword [eax], edx
add dword [esp + 8], 3
inc esi
dec dword [esp + 0x20]
jne 0x4b1afa
mov eax, dword [esp + 0x34]
mov ecx, 3
cdq
idiv ecx
shl eax, 2
add dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 8], eax
inc dword [esp + 4]
dec dword [esp + 0x1c]
jne 0x4b1ae3
jmp 0x4b1d1c
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, edi
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x4b1d1c
inc eax
mov dword [esp + 0x1c], eax
mov dword [esp + 4], 0
mov eax, edi
mov edx, dword [eax]
call dword [edx + 0x2c]
dec eax
test eax, eax
jl 0x4b1cfe
inc eax
mov dword [esp + 0x20], eax
xor esi, esi
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
xor ebx, ebx
mov bl, byte [eax + edx + 2]
shr ebx, 3
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
movzx eax, byte [eax + edx + 1]
shr eax, 3
mov byte [esp + 0x18], al
mov edx, dword [esp + 4]
mov eax, edi
call fcn.00459b30
lea edx, [esi + esi*2]
movzx eax, byte [eax + edx]
shr eax, 3
test bl, bl
jne 0x4b1c69
mov bl, 1
cmp byte [esp + 0x18], 0
jne 0x4b1c72
mov bl, 1
test al, al
jne 0x4b1c78
mov al, 1
xor edx, edx
mov dl, bl
shl edx, 0xb
xor ecx, ecx
mov cl, bl
shl ecx, 6
add dx, cx
xor ecx, ecx
mov cl, bl
add ecx, ecx
add dx, cx
and dx, word [esp + 0xb0]
xor ecx, ecx
mov cl, byte [esp + 0x18]
shl ecx, 0xb
xor ebx, ebx
mov bl, byte [esp + 0x18]
shl ebx, 6
add cx, bx
xor ebx, ebx
mov bl, byte [esp + 0x18]
add cx, bx
and cx, word [esp + 0xb4]
add dx, cx
xor ecx, ecx
mov cl, al
shl ecx, 0xb
xor ebx, ebx
mov bl, al
shl ebx, 6
add cx, bx
and eax, 0xff
add cx, ax
and cx, word [esp + 0xb8]
add dx, cx
mov eax, dword [esp + 0x10]
mov word [eax], dx
add dword [esp + 0x10], 2
inc esi
dec dword [esp + 0x20]
jne 0x4b1c1d
mov eax, dword [esp + 0x34]
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
inc dword [esp + 4]
dec dword [esp + 0x1c]
jne 0x4b1c06
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 4]
mov eax, dword [eax]
push eax
mov eax, dword [eax]
call dword [eax + 0x80]
mov dl, 1
mov eax, edx
add esp, 0xc0
pop edi
pop esi
pop ebx
ret