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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x406004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
push ebx
push esi
mov dword [ebp - 0x28], eax
mov ebx, edx
mov eax, dword [ebp + 8]
mov esi, eax
shr esi, 4
test al, 0xf
movups xmmword [ebp - 0x14], xmm0
lea edx, [esi + 1]
cmove edx, esi
mov dword [ebp - 0x40], edx
test edx, edx
je 0x4012ce
mov eax, ecx
mov dword [ebp - 0x2c], edx
lea esi, [ebp - 0x14]
sub eax, esi
mov dword [ebp - 0x30], eax
lea eax, [ecx + 0x10]
mov dword [ebp - 0x34], eax
lea eax, [ecx + 0xa0]
mov dword [ebp - 0x38], eax
push edi
nop dword [eax]
lea esi, [ebp - 0x14]
mov edi, 4
nop dword [eax + eax]
mov ecx, esi
mov edx, 4
mov al, byte [ebx]
lea ecx, [ecx + 4]
xor byte [ecx - 4], al
inc ebx
sub edx, 1
jne 0x4010f7
inc esi
mov dword [ebp - 0x3c], ebx
sub edi, 1
jne 0x4010f0
lea ecx, [ebp - 0x14]
lea edx, [edi + 0x10]
mov eax, dword [ebp - 0x30]
lea ecx, [ecx + 1]
mov al, byte [eax + ecx - 1]
xor byte [ecx - 1], al
sub edx, 1
jne 0x401114
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 9
lea ecx, [ebp - 0x14]
mov edx, 0x10
nop dword [eax + eax]
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
mov al, byte [eax + str.cw]
mov byte [ecx - 1], al
sub edx, 1
jne 0x401140
xor dl, dl
lea ecx, [ebp - 0x14]
call fcn.00401000
xor esi, esi
mov dword [ebp - 0x1c], 4
nop word [eax + eax]
mov edx, 3
mov dword [ebp - 0x18], 4
mov edi, esi
nop
mov al, byte [ebp + edi - 0x14]
test al, al
je 0x4011ab
movzx eax, al
movzx eax, byte [eax + 0x4042e0]
add eax, 0x19
cmp eax, 0xff
lea ecx, [eax - 0xff]
cmovb ecx, eax
mov bh, byte [ecx + 0x4041e0]
jmp 0x4011ad
xor bh, bh
lea eax, [edx - 2]
and eax, 3
lea eax, [esi + eax*4]
mov al, byte [ebp + eax - 0x14]
test al, al
je 0x4011df
movzx eax, al
movzx eax, byte [eax + 0x4042e0]
inc eax
cmp eax, 0xff
lea ecx, [eax - 0xff]
cmovb ecx, eax
mov bl, byte [ecx + 0x4041e0]
jmp 0x4011e1
xor bl, bl
lea eax, [edx - 1]
and eax, 3
lea ecx, [esi + eax*4]
mov eax, edx
mov cl, byte [ebp + ecx - 0x14]
and eax, 3
inc edx
lea eax, [esi + eax*4]
xor cl, byte [ebp + eax - 0x14]
xor cl, bl
xor cl, bh
mov byte [ebp + edi - 0x50], cl
add edi, 4
sub dword [ebp - 0x18], 1
jne 0x401180
inc esi
sub dword [ebp - 0x1c], 1
jne 0x401170
movups xmm0, xmmword [ebp - 0x50]
mov ebx, dword [ebp - 0x20]
lea ecx, [ebp - 0x14]
mov edx, 0x10
movups xmmword [ebp - 0x14], xmm0
nop
mov al, byte [ebx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
inc ebx
sub edx, 1
jne 0x401230
sub dword [ebp - 0x24], 1
mov dword [ebp - 0x20], ebx
jne 0x401133
lea ecx, [ebp - 0x14]
mov edx, 0x10
movzx eax, byte [ecx]
lea ecx, [ecx + 1]
mov al, byte [eax + str.cw]
mov byte [ecx - 1], al
sub edx, 1
jne 0x401253
xor dl, dl
lea ecx, [ebp - 0x14]
call fcn.00401000
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x14]
mov esi, 0x10
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub esi, 1
jne 0x401280
mov ebx, dword [ebp - 0x28]
lea esi, [ebp - 0x14]
mov edi, 4
nop word [eax + eax]
mov ecx, esi
mov edx, 4
mov al, byte [ecx]
lea ecx, [ecx + 4]
mov byte [ebx], al
inc ebx
sub edx, 1
jne 0x4012a7
inc esi
mov dword [ebp - 0x28], ebx
sub edi, 1
jne 0x4012a0
sub dword [ebp - 0x2c], 1
mov ebx, dword [ebp - 0x3c]
jne 0x4010e0
mov edx, dword [ebp - 0x40]
pop edi
mov ecx, dword [ebp - 4]
shl edx, 4
xor ecx, ebp
pop esi
mov eax, edx
pop ebx
call fcn.00402a06
mov esp, ebp
pop ebp
ret