Function at 0x568b54
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea esi, [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
movzx edx, word [edx + 0xe]
imul edx
call fcn.005686cc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
add eax, 0xd400
add eax, 0x4000
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
call fcn.0040b930
mov dword [ebp - 0x3c], eax
push ebp
push 0x568fa4
push dword fs:[0]
mov dword fs:[0], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
imul dword [edx + 8]
add eax, eax
call fcn.0040b930
mov dword [ebp - 0x40], eax
push ebp
push 0x568f87
push dword fs:[0]
mov dword fs:[0], esp
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x3c]
add eax, 0xc000
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x3c]
add eax, 0xc000
add eax, 0x1400
mov dword [ebp - 0x18], eax
xor ebx, ebx
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
shr ecx, 8
mov byte [edx + eax*4], cl
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
shr ecx, 4
and cl, 0xf
mov byte [edx + eax*4 + 1], cl
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
and cl, 0xf
mov byte [edx + eax*4 + 2], cl
mov edx, dword [ebp - 0x4c]
xor ecx, ecx
mov dword [edx + eax*4 + 4], ecx
inc ebx
cmp ebx, 0x1000
jne 0x568bfc
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x568cda
inc eax
mov dword [ebp - 0x54], eax
xor ebx, ebx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
dec eax
sub eax, ebx
imul eax, dword [ebp - 0x20]
add eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
call fcn.00402f44
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
dec eax
test eax, eax
jl 0x568cd0
inc eax
mov edx, dword [esi]
mov dl, byte [edx + 2]
and dl, 0xf0
and edx, 0xff
shl edx, 4
mov ecx, dword [esi]
mov cl, byte [ecx + 1]
and cl, 0xf0
and ecx, 0xff
add dx, cx
mov ecx, dword [esi]
mov cl, byte [ecx]
and cl, 0xf0
and ecx, 0xff
shr ecx, 4
add dx, cx
movzx ecx, dx
lea ecx, [ecx + ecx*2]
mov edi, dword [ebp - 0x4c]
inc dword [edi + ecx*4 + 4]
add dword [esi], 3
mov ecx, dword [ebp - 0x44]
mov word [ecx], dx
add dword [ebp - 0x44], 2
dec eax
jne 0x568c7e
inc ebx
dec dword [ebp - 0x54]
jne 0x568c52
xor ebx, ebx
lea eax, [ebx + ebx*4]
mov edx, dword [ebp - 0x48]
xor ecx, ecx
mov dword [edx + eax*4 + 0x10], ecx
mov edx, dword [ebp - 0x48]
xor ecx, ecx
mov dword [edx + eax*4 + 0xc], ecx
mov edx, dword [ebp - 0x48]
xor ecx, ecx
mov dword [edx + eax*4 + 8], ecx
xor ecx, ecx
lea eax, [ebx + ebx*4]
mov edx, dword [ebp - 0x48]
lea edx, [edx + eax*4]
mov byte [edx + ecx], 0
mov edx, dword [ebp - 0x48]
lea eax, [edx + eax*4]
mov byte [eax + ecx + 3], 0xff
inc ecx
cmp ecx, 3
jne 0x568cfc
inc ebx
cmp ebx, 0x100
jne 0x568cdc
xor ebx, ebx
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
cmp dword [edx + eax*4 + 4], 0
jg 0x568d3b
inc ebx
cmp ebx, 0x1000
jl 0x568d25
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
lea eax, [edx + eax*4]
mov dword [ebp - 0x50], eax
lea eax, [ebx + ebx*2]
mov edx, dword [ebp - 0x4c]
lea eax, [edx + eax*4]
mov edx, dword [ebp - 0x48]
mov dword [edx + 0x10], eax
mov edx, 1
inc ebx
cmp ebx, 0x1000
jge 0x568d90
lea eax, [ebx + ebx*2]
mov ecx, dword [ebp - 0x4c]
cmp dword [ecx + eax*4 + 4], 0
jle 0x568d87
mov ecx, dword [ebp - 0x4c]
lea ecx, [ecx + eax*4]
mov esi, dword [ebp - 0x50]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x4c]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x50], eax
inc edx
inc ebx
cmp ebx, 0x1000
jl 0x568d64
mov eax, dword [ebp - 0x50]
xor ecx, ecx
mov dword [eax + 8], ecx
mov eax, dword [ebp - 0x48]
mov dword [eax + 8], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
imul dword [edx + 8]
mov edx, dword [ebp - 0x48]
mov dword [edx + 0xc], eax
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x3c]
add eax, 0xc000
add eax, 0x1400
add eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp - 0x28]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov eax, dword [ebp - 0x48]
call fcn.0056885c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x28]
jle 0x568e0f
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
dec eax
sub eax, ebx
jl 0x568e0f
inc eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 8]
lea esi, [eax + ebx*4]
mov eax, esi
xor ecx, ecx
mov edx, 4
call fcn.00403774
add esi, 4
dec dword [ebp - 0x54]
jne 0x568df9
mov eax, dword [ebp - 0x28]
dec eax
test eax, eax
jl 0x568ee5
inc eax
mov dword [ebp - 0x54], eax
xor ebx, ebx
mov esi, dword [ebp + 8]
lea eax, [ebx + ebx*4]
mov edx, dword [ebp - 0x48]
mov ecx, dword [edx + eax*4 + 8]
test ecx, ecx
jle 0x568ed8
mov edx, dword [ebp - 0x48]
mov eax, dword [edx + eax*4 + 0x10]
mov dword [ebp - 0x50], eax
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x50], 0
je 0x568e87
mov eax, dword [ebp - 0x50]
mov byte [eax + 3], bl
mov eax, dword [ebp - 0x50]
movzx eax, byte [eax]
add dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x50]
movzx eax, byte [eax + 1]
add dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x50]
movzx eax, byte [eax + 2]
add dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 8]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x568e55
mov edi, esi
mov eax, dword [ebp - 0x30]
shl eax, 4
or eax, 0xf
cdq
idiv ecx
mov byte [edi + 2], al
mov eax, dword [ebp - 0x34]
shl eax, 4
or eax, 0xf
cdq
idiv ecx
mov byte [edi + 1], al
mov eax, dword [ebp - 0x38]
shl eax, 4
or eax, 0xf
cdq
idiv ecx
mov byte [edi], al
mov byte [edi + 3], 0
cmp byte [edi + 2], 0x10
ja 0x568ed8
cmp byte [edi + 1], 0x10
ja 0x568ed8
cmp byte [edi], 0x10
ja 0x568ed8
mov eax, esi
xor ecx, ecx
mov edx, 4
call fcn.00403774
inc ebx
add esi, 4
dec dword [ebp - 0x54]
jne 0x568e24
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
shl eax, 3
call fcn.005686cc
mov esi, eax
mov edx, dword [ebp - 4]
mov edx, dword [edx + 8]
imul edx, esi
mov eax, dword [ebp - 0xc]
xor ecx, ecx
call fcn.00403774
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x568f71
inc eax
mov dword [ebp - 0x54], eax
xor ebx, ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
dec eax
sub eax, ebx
imul dword [ebp - 0x24]
add eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
mov eax, ebx
imul esi
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
dec eax
test eax, eax
jl 0x568f6b
inc eax
mov edx, dword [ebp - 0x18]
movzx edx, word [edx]
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x4c]
mov dl, byte [ecx + edx*4 + 3]
mov ecx, dword [ebp - 0x1c]
mov byte [ecx], dl
add dword [ebp - 0x18], 2
inc dword [ebp - 0x1c]
dec eax
jne 0x568f4c
inc ebx
dec dword [ebp - 0x54]
jne 0x568f24
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x568f8e
mov eax, dword [ebp - 0x40]
call fcn.00402c24
ret