Function at 0x4016d0
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
xor eax, eax
sub esp, 0x18
cmp eax, str.rY_a4Y_h.E_yK_0z
je 0x401acb
push ebx
push edi
mov edi, 0x10
mov dword [esi + 0x3cc], edi
mov dword [esi + 0x3c8], edi
mov ecx, dword [str.5i6I7_jrT_iqx]
mov dword [esi + 0x3d4], ecx
mov edx, dword [0x420418]
mov dword [esi + 0x3d8], edx
mov eax, dword [0x42041c]
mov dword [esi + 0x3dc], eax
mov ecx, dword [0x420420]
mov dword [esi + 0x3e0], ecx
mov edx, dword [esi + 0x3cc]
push edx
lea eax, [esi + 0x3f4]
push str.5i6I7_jrT_iqx
push eax
call fcn.00406a20
mov eax, dword [esi + 0x3c8]
add esp, 0xc
cmp eax, edi
je 0x401773
cmp eax, 0x18
je 0x40175b
mov dword [esi + 0x3d0], 0xe
jmp 0x401796
xor ecx, ecx
cmp dword [esi + 0x3cc], 0x20
sete cl
lea ecx, [ecx + ecx + 0xc]
mov dword [esi + 0x3d0], ecx
jmp 0x401796
mov eax, dword [esi + 0x3cc]
cmp eax, edi
jne 0x401784
mov eax, 0xa
jmp 0x401790
xor edx, edx
cmp eax, 0x18
setne dl
lea eax, [edx + edx + 0xc]
mov dword [esi + 0x3d0], eax
mov eax, dword [esi + 0x3cc]
cdq
and edx, 3
add edx, eax
sar edx, 2
xor ebx, ebx
mov dword [ebp - 0x10], edx
cmp dword [esi + 0x3d0], ebx
jl 0x4017d4
lea edi, [esi + 8]
mov dword [ebp - 0xc], edi
test edx, edx
jle 0x4017c2
mov ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0xc]
inc ebx
add edi, 0x20
mov dword [ebp - 0xc], edi
cmp ebx, dword [esi + 0x3d0]
jle 0x4017b8
xor ebx, ebx
cmp dword [esi + 0x3d0], ebx
jl 0x401803
lea edi, [esi + 0x1e8]
mov dword [ebp - 0xc], edi
test edx, edx
jle 0x4017f1
mov ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0xc]
inc ebx
add edi, 0x20
mov dword [ebp - 0xc], edi
cmp ebx, dword [esi + 0x3d0]
jle 0x4017e7
mov eax, dword [esi + 0x3d0]
inc eax
imul eax, edx
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x3c8]
cdq
and edx, 3
lea edi, [edx + eax]
sar edi, 2
mov dword [ebp - 0x18], edi
lea ecx, [esi + 0x414]
mov eax, str.rY_a4Y_h.E_yK_0z
test edi, edi
jle 0x40185d
mov edx, edi
movzx ebx, byte [eax]
shl ebx, 0x18
mov dword [ecx], ebx
movzx ebx, byte [eax + 1]
shl ebx, 0x10
or dword [ecx], ebx
movzx ebx, byte [eax + 2]
shl ebx, 8
or dword [ecx], ebx
movzx ebx, byte [eax + 3]
or dword [ecx], ebx
add eax, 4
add ecx, 4
dec edx
jne 0x401834
xor ebx, ebx
mov dword [ebp - 4], ebx
test edi, edi
jle 0x4018b0
lea eax, [esi + 0x414]
mov dword [ebp - 4], eax
nop
cmp ebx, dword [ebp - 8]
jge 0x4018ad
mov eax, ebx
cdq
idiv dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
inc ebx
mov dword [ebp - 0x14], eax
lea eax, [edx + eax*8]
mov dword [esi + eax*4 + 8], ecx
mov eax, dword [esi + 0x3d0]
sub eax, dword [ebp - 0x14]
lea ecx, [edx + eax*8]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
add eax, 4
mov dword [esi + ecx*4 + 0x1e8], edx
mov dword [ebp - 4], eax
cmp ebx, edi
jl 0x401870
mov dword [ebp - 4], ebx
cmp ebx, dword [ebp - 8]
jge 0x401a3a
mov dword [ebp - 0xc], 0x41c940
mov eax, dword [esi + edi*4 + 0x410]
mov ecx, eax
sar ecx, 0x10
and ecx, 0xff
movsx edx, byte [ecx + str.cw]
mov ecx, dword [ebp - 0xc]
movsx ecx, byte [ecx]
xor edx, ecx
inc dword [ebp - 0xc]
mov ecx, eax
sar ecx, 8
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
shl edx, 8
xor edx, ecx
mov ecx, eax
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
sar eax, 0x18
shl edx, 8
and eax, 0xff
movzx eax, byte [eax + str.cw]
xor edx, ecx
shl edx, 8
xor edx, eax
xor dword [esi + 0x414], edx
cmp edi, 8
je 0x401950
cmp edi, 1
jle 0x4019de
lea eax, [esi + 0x418]
lea ecx, [edi - 1]
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x401940
jmp 0x4019de
lea eax, [esi + 0x418]
mov ecx, 3
jmp 0x401960
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x401960
mov eax, dword [esi + 0x420]
mov ecx, eax
sar ecx, 0x18
and ecx, 0xff
movsx edx, byte [ecx + str.cw]
mov ecx, eax
sar ecx, 0x10
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
shl edx, 8
xor edx, ecx
mov ecx, eax
sar ecx, 8
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
shl edx, 8
and eax, 0xff
movzx eax, byte [eax + str.cw]
xor edx, ecx
shl edx, 8
xor edx, eax
xor dword [esi + 0x424], edx
lea eax, [esi + 0x428]
mov ecx, 3
mov edx, dword [eax - 4]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x4019d3
mov dword [ebp - 0x14], 0
test edi, edi
jle 0x401a31
lea ecx, [esi + 0x414]
nop
cmp ebx, dword [ebp - 8]
jge 0x401a3a
mov eax, ebx
cdq
idiv dword [ebp - 0x10]
mov ebx, dword [ecx]
add ecx, 4
lea edi, [edx + eax*8]
mov dword [esi + edi*4 + 8], ebx
mov edi, dword [esi + 0x3d0]
mov ebx, dword [ebp - 4]
sub edi, eax
lea eax, [edx + edi*8]
mov edx, dword [ecx - 4]
mov edi, dword [ebp - 0x18]
mov dword [esi + eax*4 + 0x1e8], edx
mov eax, dword [ebp - 0x14]
inc eax
inc ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], ebx
cmp eax, edi
jl 0x4019f0
cmp ebx, dword [ebp - 8]
jl 0x4018c0
mov eax, 1
mov dword [ebp - 0x14], eax
cmp dword [esi + 0x3d0], eax
jle 0x401ac5
lea ecx, [esi + 0x208]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x10]
test edx, edx
jle 0x401aad
mov edi, edi
mov eax, dword [ecx]
mov edi, eax
sar edi, 0x18
and edi, 0xff
mov edi, dword [edi*4 + 0x41b940]
mov ebx, eax
sar ebx, 0x10
and ebx, 0xff
xor edi, dword [ebx*4 + 0x41bd40]
mov ebx, eax
sar ebx, 8
and ebx, 0xff
xor edi, dword [ebx*4 + 0x41c140]
and eax, 0xff
xor edi, dword [eax*4 + 0x41c540]
add ecx, 4
dec edx
mov dword [ecx - 4], edi
jne 0x401a60
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
inc eax
add ecx, 0x20
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], ecx
cmp eax, dword [esi + 0x3d0]
jl 0x401a57
pop edi
mov byte [esi + 4], 1
pop ebx
mov esp, ebp
pop ebp
ret