Function at 0x1006a4e0
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [ebp + 8], 0
push edi
mov edi, ecx
mov dword [ebp - 4], edi
je 0x1006a90b
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x10
je 0x1006a50c
cmp ecx, 0x18
je 0x1006a50c
cmp ecx, 0x20
jne 0x1006a90b
mov eax, dword [ebp + 0x14]
cmp eax, 0x10
je 0x1006a522
cmp eax, 0x18
je 0x1006a522
cmp eax, 0x20
jne 0x1006a90b
push ebx
push esi
mov esi, dword [ebp + 0xc]
push eax
mov dword [edi + 0x3cc], eax
lea eax, [edi + 0x3d4]
push esi
push eax
mov dword [edi + 0x3c8], ecx
call sub.VCRUNTIME140.dll_memcpy
push dword [edi + 0x3cc]
lea eax, [edi + 0x3f4]
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [edi + 0x3c8]
add esp, 0x18
cmp eax, 0x10
je 0x1006a57c
cmp eax, 0x18
je 0x1006a56e
mov eax, 0xe
jmp 0x1006a59b
xor eax, eax
cmp dword [edi + 0x3cc], 0x20
sete al
jmp 0x1006a594
mov ecx, dword [edi + 0x3cc]
cmp ecx, 0x10
jne 0x1006a58c
lea eax, [ecx - 6]
jmp 0x1006a59b
xor eax, eax
cmp ecx, 0x18
setne al
lea eax, [eax*2 + 0xc]
mov dword [edi + 0x3d0], eax
mov eax, dword [edi + 0x3cc]
cdq
and edx, 3
lea ebx, [edx + eax]
sar ebx, 2
lea edx, [edi + 8]
mov dword [ebp + 0xc], ebx
xor esi, esi
nop dword [eax]
test ebx, ebx
jle 0x1006a5cf
mov ecx, ebx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov eax, dword [edi + 0x3d0]
inc esi
add edx, 0x20
cmp esi, eax
jle 0x1006a5c0
xor edx, edx
test eax, eax
js 0x1006a60d
lea esi, [edi + 0x1e8]
nop dword [eax]
test ebx, ebx
jle 0x1006a5ff
mov ecx, ebx
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov eax, dword [edi + 0x3d0]
inc edx
add esi, 0x20
cmp edx, eax
jle 0x1006a5f0
inc eax
imul eax, ebx
mov dword [ebp + 0x10], eax
mov eax, dword [edi + 0x3c8]
cdq
and edx, 3
lea ecx, [edx + eax]
sar ecx, 2
mov dword [ebp + 0x14], ecx
test ecx, ecx
jle 0x1006a6d9
mov esi, dword [ebp + 8]
lea ebx, [edi + 0x414]
mov dword [ebp - 4], ecx
nop dword [eax + eax]
movzx eax, byte [esi]
lea esi, [esi + 4]
shl eax, 0x18
lea ebx, [ebx + 4]
mov dword [ebx - 4], eax
movzx edx, byte [esi - 3]
shl edx, 0x10
or edx, eax
mov dword [ebx - 4], edx
movzx ecx, byte [esi - 2]
shl ecx, 8
or ecx, edx
mov dword [ebx - 4], ecx
movzx eax, byte [esi - 1]
or eax, ecx
sub dword [ebp - 4], 1
mov dword [ebx - 4], eax
jne 0x1006a640
mov ebx, dword [ebp + 0xc]
lea eax, [edi + 0x414]
mov ecx, dword [ebp + 0x14]
xor esi, esi
mov dword [ebp - 4], eax
mov dword [ebp + 8], esi
nop word [eax + eax]
mov eax, dword [ebp + 0x10]
cmp esi, eax
jge 0x1006a883
mov eax, esi
mov ecx, dword [ebp - 4]
cdq
idiv ebx
mov ecx, dword [ecx]
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 8], ecx
mov ecx, dword [edi + 0x3d0]
mov esi, dword [ebp + 8]
sub ecx, eax
inc esi
mov dword [ebp + 8], esi
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add edx, 4
mov dword [edi + ecx*4 + 0x1e8], eax
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 4], edx
cmp esi, ecx
jl 0x1006a690
jmp 0x1006a6de
xor esi, esi
mov dword [ebp + 8], esi
mov eax, dword [ebp + 0x10]
cmp esi, eax
jge 0x1006a883
lea edx, [ecx + 0x104]
mov eax, 0x101c8e88
lea edx, [edi + edx*4]
mov dword [ebp - 0xc], edx
nop word [eax + eax]
movzx ecx, byte [eax]
inc eax
mov ebx, dword [edx]
mov dword [ebp - 8], eax
mov eax, ebx
sar eax, 0x10
movzx eax, al
movsx edx, byte [eax + str.cw]
mov eax, ebx
sar eax, 8
xor edx, ecx
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
shl edx, 8
sar ebx, 0x18
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
mov eax, dword [ebp + 0x14]
xor dword [edi + 0x414], edx
cmp eax, 8
je 0x1006a792
cmp eax, 1
jle 0x1006a783
lea ecx, [edi + 0x418]
lea edx, [eax - 1]
nop dword [eax + eax]
mov eax, dword [ecx - 4]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
sub edx, 1
jne 0x1006a770
jmp 0x1006a81e
xor ebx, ebx
test eax, eax
jle 0x1006a871
jmp 0x1006a820
lea eax, [edi + 0x418]
mov edx, 3
nop dword [eax]
mov ecx, dword [eax - 4]
lea eax, [eax + 4]
xor dword [eax - 4], ecx
sub edx, 1
jne 0x1006a7a0
mov edx, dword [edi + 0x420]
mov eax, edx
sar eax, 0x18
movzx eax, al
movsx ecx, byte [eax + str.cw]
mov eax, edx
sar eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
movzx eax, dl
shl ecx, 8
mov edx, 3
movzx eax, byte [eax + str.cw]
xor ecx, eax
xor dword [edi + 0x424], ecx
lea ecx, [edi + 0x428]
nop dword [eax + eax]
mov eax, dword [ecx - 4]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
sub edx, 1
jne 0x1006a810
xor ebx, ebx
lea ecx, [edi + 0x414]
mov dword [ebp - 4], ecx
nop dword [eax]
cmp esi, dword [ebp + 0x10]
jge 0x1006a880
mov eax, esi
mov ecx, dword [ecx]
cdq
inc ebx
idiv dword [ebp + 0xc]
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 8], ecx
mov ecx, dword [edi + 0x3d0]
mov esi, dword [ebp + 8]
sub ecx, eax
mov eax, dword [ebp - 4]
inc esi
mov dword [ebp + 8], esi
lea ecx, [edx + ecx*8]
mov eax, dword [eax]
mov dword [edi + ecx*4 + 0x1e8], eax
mov ecx, dword [ebp - 4]
add ecx, 4
mov dword [ebp - 4], ecx
cmp ebx, dword [ebp + 0x14]
jl 0x1006a830
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
cmp esi, dword [ebp + 0x10]
jl 0x1006a700
mov ebx, dword [ebp + 0xc]
mov eax, 1
mov dword [ebp + 8], eax
cmp dword [edi + 0x3d0], eax
jle 0x1006a905
lea ecx, [edi + 0x208]
mov dword [ebp + 0x10], ecx
nop dword [eax]
test ebx, ebx
jle 0x1006a8f3
mov esi, ecx
mov edx, dword [esi]
lea esi, [esi + 4]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x101c7e88]
xor ecx, dword [eax*4 + 0x101c8288]
mov eax, edx
sar eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x101c8688]
movzx eax, dl
xor ecx, dword [eax*4 + 0x101c8a88]
mov dword [esi - 4], ecx
sub ebx, 1
jne 0x1006a8a6
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
inc eax
add ecx, 0x20
mov dword [ebp + 8], eax
mov dword [ebp + 0x10], ecx
cmp eax, dword [edi + 0x3d0]
jl 0x1006a8a0
pop esi
mov byte [edi + 4], 1
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0x10