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

Disassembly:
sub esp, 0x4c
mov eax, dword [0x46c054]
xor eax, esp
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x50]
cmp eax, 1
push ebp
mov ebp, ecx
mov dword [ebp], 1
je 0x40104f
test eax, eax
je 0x40104f
cmp eax, 2
je 0x40104f
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00425c6b
add esp, 0x4c
ret 0x14
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x58]
test eax, eax
je 0x401076
cmp eax, 1
je 0x401076
mov eax, 0xfffffffe
pop ebp
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00425c6b
add esp, 0x4c
ret 0x14
mov ecx, dword [esp + 0x64]
mov dword [ebp + 8], eax
xor eax, eax
test ecx, ecx
je 0x401094
mov dl, byte [eax + ecx]
mov byte [eax + ebp + 0xc], dl
add eax, 1
cmp eax, 0x10
jl 0x401083
jmp 0x4010a0
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], eax
mov eax, dword [esp + 0x60]
sub eax, 0
je 0x4010e6
sub eax, 1
je 0x4010d8
sub eax, 1
je 0x4010ca
mov eax, 0xfffffffd
pop ebp
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00425c6b
add esp, 0x4c
ret 0x14
mov ecx, 0x20
mov dword [ebp + 0x1c], 0xe
jmp 0x4010f2
mov ecx, 0x18
mov dword [ebp + 0x1c], 0xc
jmp 0x4010f2
mov ecx, 0x10
mov dword [ebp + 0x1c], 0xa
push esi
mov esi, dword [esp + 0x60]
test esi, esi
jne 0x401113
pop esi
mov eax, 0xfffffffc
pop ebp
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00425c6b
add esp, 0x4c
ret 0x14
push ebx
xor eax, eax
test ecx, ecx
push edi
jbe 0x40113b
jmp 0x401120
mov bl, byte [eax + esi]
mov edi, eax
mov edx, eax
and edi, 3
shr edx, 2
add eax, 1
cmp eax, ecx
lea edi, [esp + edi + 0x38]
mov byte [edi + edx*4], bl
jb 0x401120
mov edx, dword [ebp + 0x1c]
sub edx, 6
xor eax, eax
cmp edx, eax
jle 0x401153
mov ecx, edx
lea esi, [esp + 0x38]
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
cmp edx, eax
mov dword [esp + 0x10], eax
jle 0x40119d
mov esi, 8
mov edi, dword [esp + 0x10]
cmp edi, dword [ebp + 0x1c]
ja 0x40119d
cmp eax, edx
jge 0x40118a
nop
cmp ecx, 4
jge 0x40118d
mov ebx, dword [esp + eax*4 + 0x18]
lea edi, [esi + ecx]
add eax, 1
add ecx, 1
cmp eax, edx
mov dword [ebp + edi*4], ebx
jl 0x401170
cmp ecx, 4
jne 0x401199
add dword [esp + 0x10], 1
add esi, 4
xor ecx, ecx
cmp eax, edx
jl 0x401162
mov eax, dword [esp + 0x10]
cmp eax, dword [ebp + 0x1c]
ja 0x4012fa
mov esi, 0x45b200
jmp 0x4011b5
mov esi, dword [esp + 0x14]
movzx edi, byte [esp + edx*4 + 0x15]
mov al, byte [esp + 0x18]
xor al, byte [edi + section..data]
add esi, 4
mov byte [esp + 0x18], al
movzx edi, byte [esp + edx*4 + 0x16]
movzx ebx, byte [edi + section..data]
xor byte [esp + 0x19], bl
movzx edi, byte [esp + edx*4 + 0x17]
movzx ebx, byte [edi + section..data]
xor byte [esp + 0x1a], bl
movzx edi, byte [esp + edx*4 + 0x14]
xor al, byte [esi - 4]
movzx ebx, byte [edi + section..data]
xor byte [esp + 0x1b], bl
cmp edx, 8
mov byte [esp + 0x18], al
mov dword [esp + 0x14], esi
mov eax, 1
je 0x401231
cmp edx, eax
jle 0x4012a0
jmp 0x401220
mov esi, dword [esp + eax*4 + 0x14]
xor dword [esp + eax*4 + 0x18], esi
add eax, 1
cmp eax, edx
jl 0x401220
jmp 0x4012a0
mov esi, dword [esp + eax*4 + 0x14]
xor dword [esp + eax*4 + 0x18], esi
add eax, 1
cmp eax, 4
jl 0x401231
movzx eax, byte [esp + 0x24]
movzx eax, byte [eax + section..data]
xor byte [esp + 0x28], al
movzx eax, byte [esp + 0x25]
movzx eax, byte [eax + section..data]
xor byte [esp + 0x29], al
movzx eax, byte [esp + 0x26]
movzx eax, byte [eax + section..data]
xor byte [esp + 0x2a], al
movzx eax, byte [esp + 0x27]
movzx eax, byte [eax + section..data]
xor byte [esp + 0x2b], al
mov eax, 5
jmp 0x401290
mov esi, dword [esp + eax*4 + 0x14]
xor dword [esp + eax*4 + 0x18], esi
add eax, 1
cmp eax, 8
jl 0x401290
xor eax, eax
test edx, edx
jle 0x4012ed
mov esi, dword [esp + 0x10]
lea esi, [esi*4 + 8]
mov edi, dword [esp + 0x10]
cmp edi, dword [ebp + 0x1c]
ja 0x4012ed
cmp eax, edx
jge 0x4012da
mov edi, edi
cmp ecx, 4
jge 0x4012dd
mov ebx, dword [esp + eax*4 + 0x18]
lea edi, [esi + ecx]
add eax, 1
add ecx, 1
cmp eax, edx
mov dword [ebp + edi*4], ebx
jl 0x4012c0
cmp ecx, 4
jne 0x4012e9
add dword [esp + 0x10], 1
add esi, 4
xor ecx, ecx
cmp eax, edx
jl 0x4012b1
mov eax, dword [esp + 0x10]
cmp eax, dword [ebp + 0x1c]
jbe 0x4011b1
cmp dword [ebp + 8], 1
pop edi
pop ebx
jne 0x4013ea
mov ecx, 1
cmp dword [ebp + 0x1c], ecx
jbe 0x4013ea
lea eax, [ebp + 0x32]
jmp 0x401320
movzx edx, byte [eax + 1]
mov edx, dword [edx*4 + 0x45ae00]
movzx esi, byte [eax - 1]
xor edx, dword [esi*4 + 0x45a600]
movzx esi, byte [eax]
xor edx, dword [esi*4 + 0x45aa00]
movzx esi, byte [eax - 2]
xor edx, dword [esi*4 + 0x45a200]
add ecx, 1
mov dword [eax - 2], edx
movzx edx, byte [eax + 5]
mov edx, dword [edx*4 + 0x45ae00]
movzx esi, byte [eax + 4]
xor edx, dword [esi*4 + 0x45aa00]
movzx esi, byte [eax + 3]
xor edx, dword [esi*4 + 0x45a600]
movzx esi, byte [eax + 2]
xor edx, dword [esi*4 + 0x45a200]
add eax, 0x10
mov dword [eax - 0xe], edx
movzx edx, byte [eax - 7]
mov edx, dword [edx*4 + 0x45ae00]
movzx esi, byte [eax - 8]
xor edx, dword [esi*4 + 0x45aa00]
movzx esi, byte [eax - 9]
xor edx, dword [esi*4 + 0x45a600]
movzx esi, byte [eax - 0xa]
xor edx, dword [esi*4 + 0x45a200]
mov dword [eax - 0xa], edx
movzx edx, byte [eax - 3]
movzx esi, byte [eax - 4]
mov edx, dword [edx*4 + 0x45ae00]
xor edx, dword [esi*4 + 0x45aa00]
movzx esi, byte [eax - 5]
xor edx, dword [esi*4 + 0x45a600]
movzx esi, byte [eax - 6]
xor edx, dword [esi*4 + 0x45a200]
mov dword [eax - 6], edx
cmp ecx, dword [ebp + 0x1c]
jb 0x401320
mov ecx, dword [esp + 0x50]
pop esi
mov dword [ebp], 0
pop ebp
xor ecx, esp
xor eax, eax
call fcn.00425c6b
add esp, 0x4c
ret 0x14