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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x406004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
push esi
mov esi, eax
mov dword [ebp - 0x34], edx
shr esi, 4
test al, 0xf
movups xmmword [ebp - 0x24], xmm0
lea eax, [esi + 1]
cmove eax, esi
mov dword [ebp - 0x54], eax
test eax, eax
je 0x4015d8
push ebx
lea ebx, [ecx + 0xa0]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ebx
lea esi, [ebp - 0x14]
lea ebx, [ecx + 0x90]
sub ecx, esi
push edi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], ecx
nop dword [eax + eax]
lea esi, [ebp - 0x14]
mov ebx, edx
mov edi, 4
nop word [eax + eax]
mov ecx, esi
mov edx, 4
mov al, byte [ebx]
lea ecx, [ecx + 4]
inc ebx
mov byte [ecx - 4], al
sub edx, 1
jne 0x401367
inc esi
mov dword [ebp - 0x50], ebx
sub edi, 1
jne 0x401360
mov edx, dword [ebp - 0x44]
lea ecx, [ebp - 0x14]
lea esi, [edi + 0x10]
mov al, byte [edx]
lea edx, [edx + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub esi, 1
jne 0x401387
lea ecx, [ebp - 0x14]
lea edx, [esi + 0x10]
nop dword [eax]
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
mov al, byte [eax + 0x406120]
mov byte [ecx - 1], al
sub edx, 1
jne 0x4013a0
mov dl, 1
lea ecx, [ebp - 0x14]
call fcn.00401000
mov eax, dword [ebp - 0x48]
mov byte [ebp - 0x26], 9
mov dword [ebp - 0x30], eax
nop dword [eax + eax]
lea ecx, [ebp - 0x14]
mov edx, eax
mov esi, 0x10
nop word [eax + eax]
mov al, byte [edx]
lea edx, [edx + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub esi, 1
jne 0x4013e0
mov dword [ebp - 0x2c], 4
nop word [eax + eax]
mov edx, 2
mov dword [ebp - 0x38], 4
mov edi, esi
nop
mov al, byte [ebp + edi - 0x14]
test al, al
je 0x401440
movzx eax, al
movzx eax, byte [eax + 0x4042e0]
add eax, 0xdf
cmp eax, 0xff
lea ecx, [eax - 0xff]
cmovb ecx, eax
mov cl, byte [ecx + 0x4041e0]
mov byte [ebp - 0x25], cl
jmp 0x401444
mov byte [ebp - 0x25], 0
lea eax, [edx - 1]
and eax, 3
lea eax, [esi + eax*4]
mov al, byte [ebp + eax - 0x14]
test al, al
je 0x401478
movzx eax, al
movzx eax, byte [eax + 0x4042e0]
add eax, 0x68
cmp eax, 0xff
lea ecx, [eax - 0xff]
cmovb ecx, eax
mov bh, byte [ecx + 0x4041e0]
jmp 0x40147a
xor bh, bh
mov eax, edx
and eax, 3
lea eax, [esi + eax*4]
mov al, byte [ebp + eax - 0x14]
test al, al
je 0x4014af
movzx eax, al
movzx eax, byte [eax + 0x4042e0]
add eax, 0xee
cmp eax, 0xff
lea ecx, [eax - 0xff]
cmovb ecx, eax
mov bl, byte [ecx + 0x4041e0]
jmp 0x4014b1
xor bl, bl
inc edx
mov eax, edx
and eax, 3
lea eax, [esi + eax*4]
mov al, byte [ebp + eax - 0x14]
test al, al
je 0x4014e7
movzx eax, al
movzx eax, byte [eax + 0x4042e0]
add eax, 0xc7
cmp eax, 0xff
lea ecx, [eax - 0xff]
cmovb ecx, eax
mov al, byte [ecx + 0x4041e0]
jmp 0x4014e9
xor al, al
xor al, bl
xor al, bh
xor al, byte [ebp - 0x25]
mov byte [ebp + edi - 0x64], al
add edi, 4
sub dword [ebp - 0x38], 1
jne 0x401410
inc esi
sub dword [ebp - 0x2c], 1
jne 0x401400
movups xmm0, xmmword [ebp - 0x64]
lea ecx, [ebp - 0x14]
mov edx, 0x10
movups xmmword [ebp - 0x14], xmm0
nop dword [eax]
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
mov al, byte [eax + 0x406120]
mov byte [ecx - 1], al
sub edx, 1
jne 0x401520
mov dl, 1
lea ecx, [ebp - 0x14]
call fcn.00401000
mov bl, byte [ebp - 0x26]
mov eax, dword [ebp - 0x30]
dec bl
sub eax, 0x10
mov byte [ebp - 0x26], bl
mov dword [ebp - 0x30], eax
test bl, bl
jne 0x4013d0
lea ecx, [ebp - 0x14]
mov edx, 0x10
nop
mov eax, dword [ebp - 0x4c]
lea ecx, [ecx + 1]
mov al, byte [eax + ecx - 1]
xor byte [ecx - 1], al
sub edx, 1
jne 0x401560
xor edi, edi
mov dword [ebp - 0x2c], 4
mov dword [ebp - 0x30], edi
nop
mov ebx, dword [ebp - 0x34]
mov edx, edi
mov edi, dword [ebp - 0x3c]
mov esi, 4
nop dword [eax]
movzx eax, byte [ebp + edx - 0x24]
lea edx, [edx + 4]
xor byte [ebp + edx - 0x18], al
mov cl, byte [ebp + edx - 0x18]
movzx eax, byte [ebx]
inc ebx
mov byte [edi], cl
inc edi
mov byte [ebp + edx - 0x28], al
sub esi, 1
jne 0x401590
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x30]
inc edi
mov dword [ebp - 0x34], ebx
sub dword [ebp - 0x2c], 1
mov dword [ebp - 0x30], edi
jne 0x401580
sub dword [ebp - 0x40], 1
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x34], edx
jne 0x401350
mov eax, dword [ebp - 0x54]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
shl eax, 4
pop esi
call fcn.00402a06
mov esp, ebp
pop ebp
ret