Function at 0x4015c2
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
lea ecx, [eax + 0x80]
lea edi, [eax + 0x8080]
lea ebx, [eax + 0x10080]
xor esi, esi
add eax, 0x18080
cmp dword [0x413af8], esi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], eax
jne 0x40187f
push 0x2000
push esi
push 0x410af8
call fcn.00402320
add esp, 0xc
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], str.91__
mov eax, dword [ebp - 0xc]
push 8
pop esi
mov ecx, dword [eax]
push 0x1c
dec ecx
mov eax, ecx
cdq
idiv esi
pop esi
movzx eax, byte [edx + 0x408e31]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
cdq
idiv esi
and dword [ebp - 4], 0
mov esi, dword [edx*4 + 0x408e48]
mov eax, dword [ebp - 4]
test dword [ebp - 0x10], eax
je 0x401689
mov eax, dword [ebp - 8]
push 0x1c
cdq
pop edi
idiv edi
push 8
pop ebx
mov edi, eax
mov eax, ecx
cdq
idiv ebx
lea eax, [edi + eax*2]
shl eax, 7
add eax, dword [ebp - 4]
or dword [eax*4 + 0x410af8], esi
lea eax, [eax*4 + 0x410af8]
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x80
jb 0x401657
add dword [ebp - 0xc], 4
inc dword [ebp - 8]
cmp dword [ebp - 0xc], 0x408190
jl 0x40162b
push 0x1000
push 0
push 0x412af8
call fcn.00402320
add esp, 0xc
and dword [ebp - 8], 0
mov edi, 0x4081d0
mov ecx, dword [edi]
push 7
dec ecx
pop esi
mov eax, ecx
push 0x18
cdq
idiv esi
pop esi
movzx eax, byte [edx + 0x408e31]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
cdq
idiv esi
and dword [ebp - 4], 0
mov esi, dword [edx*4 + 0x408dd0]
mov eax, dword [ebp - 4]
test dword [ebp - 0x10], eax
je 0x40170f
mov eax, ecx
push 7
cdq
pop ebx
idiv ebx
shl eax, 7
add eax, dword [ebp - 4]
or dword [eax*4 + 0x412af8], esi
lea eax, [eax*4 + 0x412af8]
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x80
jb 0x4016eb
inc dword [ebp - 8]
add edi, 4
cmp edi, 0x408290
jl 0x4016c2
push 0x2000
push 0
push 0x40eaf8
call fcn.00402320
add esp, 0xc
and dword [ebp - 8], 0
mov edi, 0x408290
mov eax, dword [edi]
mov dword [ebp - 4], 0xff
mov ecx, dword [eax*4 + 0x40834c]
dec ecx
mov eax, ecx
and eax, 7
movzx eax, byte [eax + 0x408e30]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
test dword [ebp - 0x14], eax
je 0x40179a
mov esi, ecx
push 0x18
shr esi, 3
shl esi, 8
add esi, eax
mov eax, dword [ebp - 8]
cdq
pop ebx
idiv ebx
lea eax, [eax + esi*2]
lea esi, [eax*4 + 0x40eaf8]
mov eax, dword [ebp - 8]
cdq
idiv ebx
mov eax, dword [edx*4 + 0x408dd0]
or dword [esi], eax
mov eax, dword [ebp - 4]
dec dword [ebp - 4]
test eax, eax
jne 0x401766
inc dword [ebp - 8]
add edi, 4
cmp edi, 0x408350
jl 0x401746
push 0x2f
mov edx, 0x40834c
pop ecx
mov eax, dword [edx]
lea esi, [ecx + 0x30]
shl eax, 2
mov dword [ebp + eax - 0x138], ecx
mov dword [ebp + eax - 0xb8], esi
mov eax, edx
dec ecx
sub edx, 4
cmp eax, 0x408290
jne 0x4017ba
push 0x2000
push 0
push 0x40caf8
call fcn.00402320
add esp, 0xc
and dword [ebp - 8], 0
mov esi, 0x408cd0
mov eax, dword [ebp - 8]
push 0x20
cdq
pop ecx
idiv ecx
push 6
pop edi
push edi
mov ebx, eax
mov eax, dword [esi]
mov ecx, dword [ebp + eax*4 - 0x138]
mov eax, ecx
cdq
idiv edi
mov dword [ebp - 0x14], eax
mov eax, ecx
cdq
pop ecx
idiv ecx
mov eax, dword [ebp - 8]
push 0x20
pop edi
push 0x3f
mov ecx, dword [edx*4 + 0x408ea0]
cdq
idiv edi
pop edi
mov edx, dword [edx*4 + 0x408e38]
test edi, ecx
je 0x401857
mov eax, dword [ebp - 0x14]
shl eax, 6
add eax, edi
lea eax, [ebx + eax*2]
or dword [eax*4 + 0x40caf8], edx
lea eax, [eax*4 + 0x40caf8]
mov eax, edi
dec edi
test eax, eax
jne 0x40183a
inc dword [ebp - 8]
add esi, 4
cmp esi, 0x408dd0
jl 0x4017fa
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x1c]
mov dword [0x413af8], 1
mov esi, 0x8000
push esi
push 0
push ecx
call fcn.00402320
add esp, 0xc
push esi
push 0
push edi
call fcn.00402320
add esp, 0xc
xor edi, edi
push esi
push edi
push ebx
call fcn.00402320
add esp, 0xc
push esi
push edi
push dword [ebp - 0x20]
call fcn.00402320
lea eax, [ebp - 0x34]
add esp, 0xc
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], eax
and dword [ebp - 0xc], 0
push 0x18
pop eax
sub eax, dword [ebp - 4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
xor ebx, ebx
mov edx, ecx
mov eax, ecx
sar edx, 4
and eax, 1
and edx, 2
or eax, edx
mov edx, ecx
add eax, dword [ebp - 4]
mov dword [ebp - 8], ecx
sar edx, 1
shl eax, 4
and edx, 0xf
add eax, edx
mov eax, dword [eax*4 + 0x4083d0]
mov dword [ebp - 0x10], eax
shl dword [ebp - 0x10], 4
shl dword [ebp - 8], 6
mov ecx, ebx
mov eax, ebx
sar ecx, 4
and eax, 1
and ecx, 2
or eax, ecx
mov ecx, ebx
add eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
sar ecx, 1
shl eax, 4
and ecx, 0xf
or esi, ebx
add eax, ecx
mov ecx, dword [ebp - 0x20]
shl esi, 1
mov edx, dword [eax*4 + 0x4084d0]
mov eax, dword [ebp - 0x14]
or edx, dword [ebp - 0x10]
lea eax, [eax + esi*4]
shl edx, cl
mov edi, edx
mov dword [ebp - 0x1c], edx
shr edi, 0x18
shl edi, 3
mov ecx, dword [edi + 0x40eaf8]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x14]
lea esi, [ecx + esi*4 + 4]
mov ecx, dword [edi + 0x40eafc]
mov dword [esi], ecx
xor ecx, ecx
mov cl, byte [ebp - 0x1a]
shl ecx, 3
mov edi, ecx
mov ecx, dword [edi + 0x40f2f8]
or dword [eax], ecx
mov ecx, dword [edi + 0x40f2fc]
or dword [esi], ecx
xor ecx, ecx
mov cl, dh
and edx, 0xff
shl ecx, 3
mov edi, ecx
shl edx, 3
mov ecx, dword [edi + 0x40faf8]
or dword [eax], ecx
mov ecx, dword [edi + 0x40fafc]
or dword [esi], ecx
mov ecx, dword [edx + 0x4102f8]
or dword [eax], ecx
mov eax, dword [edx + 0x4102fc]
or dword [esi], eax
inc ebx
cmp ebx, 0x40
jl 0x40190c
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x40
jl 0x4018d4
add dword [ebp - 4], 8
add dword [ebp - 0x18], 4
cmp dword [ebp - 4], 0x20
jl 0x4018bf
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
inc dword [eax + 0x20098]
leave
ret