Function at 0x401290
Capabilities:
Encode data using xor
Manually build aes constants

Disassembly:
push ebp
xor ecx, ecx
mov ebp, esp
push edi
mov dl, 1
push esi
push ebx
sub esp, 0x23c
jmp 0x4012ae
xor al, dl
cmp ecx, 0xff
mov dl, al
jg 0x4012d5
mov byte [ecx + ebp - 0x118], dl
movzx eax, dl
mov byte [eax + ebp - 0x218], cl
inc ecx
add eax, eax
test dl, dl
jns 0x4012a2
xor eax, 0x1b
xor al, dl
cmp ecx, 0xff
mov dl, al
jle 0x4012ae
xor ebx, ebx
mov cl, 1
jmp 0x4012e2
cmp ebx, 9
mov cl, al
jg 0x401303
movzx edx, cl
mov eax, edx
shl eax, 0x18
mov dword [ebx*4 + 0x4082b0], eax
inc ebx
test cl, cl
lea eax, [edx + edx]
jns 0x4012db
xor eax, 0x1b
cmp ebx, 9
mov cl, al
jle 0x4012e2
mov ebx, 0x63
xor ecx, ecx
mov dword [0x40a6f0], ebx
mov ebx, 1
mov dword [0x40947c], ecx
nop
lea esi, [esi]
movzx esi, byte [ebx + ebp - 0x218]
mov edi, 0xff
sub edi, esi
movzx ecx, byte [edi + ebp - 0x118]
movzx edx, cl
mov al, cl
add edx, edx
shr al, 7
or al, dl
movzx edx, al
xor cl, al
add edx, edx
shr al, 7
or al, dl
movzx edx, al
xor cl, al
add edx, edx
shr al, 7
or al, dl
movzx edx, al
xor cl, al
add edx, edx
shr al, 7
or al, dl
xor al, cl
xor al, 0x63
movzx esi, al
mov dword [ebx*4 + 0x40a6f0], esi
mov dword [esi*4 + 0x4092f0], ebx
inc ebx
cmp ebx, 0xff
jle 0x401320
movzx edx, byte [ebp - 0x20d]
xor esi, esi
mov edi, 0x80808081
movzx ecx, byte [ebp - 0x20b]
movzx eax, byte [ebp - 0x20f]
movzx ebx, byte [ebp - 0x20a]
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x228], ebx
jmp 0x401585
movzx eax, byte [esi*4 + 0x4092f0]
movzx edx, dl
mov ebx, ecx
xor ebx, edx
shl ecx, 8
xor ebx, ecx
mov byte [ebp - 0x229], al
shl ecx, 8
xor eax, eax
xor ebx, ecx
shl edx, 0x18
xor ebx, edx
mov dword [esi*4 + 0x40a2f0], ebx
rol ebx, 0x18
mov dword [esi*4 + 0x409ef0], ebx
rol ebx, 0x18
mov dword [esi*4 + 0x409af0], ebx
rol ebx, 0x18
cmp byte [ebp - 0x229], 0
mov dword [esi*4 + 0x4096f0], ebx
je 0x40145d
movzx edx, byte [ebp - 0x229]
mov ebx, dword [ebp - 0x21c]
movzx ecx, byte [edx + ebp - 0x218]
add ecx, ebx
mov eax, ecx
imul edi
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x23c]
lea edx, [ecx + eax]
sar edx, 7
mov ebx, edx
shl ebx, 8
sub ebx, edx
sub ecx, ebx
movzx eax, byte [ecx + ebp - 0x118]
cmp byte [ebp - 0x229], 0
mov ebx, eax
je 0x4014b1
movzx eax, byte [ebp - 0x229]
mov edx, dword [ebp - 0x220]
movzx ecx, byte [eax + ebp - 0x218]
add ecx, edx
mov eax, ecx
imul edi
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x23c]
lea edx, [ecx + eax]
sar edx, 7
mov eax, edx
shl eax, 8
sub eax, edx
sub ecx, eax
movzx eax, byte [ecx + ebp - 0x118]
shl eax, 8
xor ebx, eax
cmp byte [ebp - 0x229], 0
je 0x401503
movzx eax, byte [ebp - 0x229]
mov edx, dword [ebp - 0x224]
movzx ecx, byte [eax + ebp - 0x218]
add ecx, edx
mov eax, ecx
imul edi
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x23c]
lea edx, [ecx + eax]
sar edx, 7
mov eax, edx
shl eax, 8
sub eax, edx
sub ecx, eax
movzx edx, byte [ecx + ebp - 0x118]
shl edx, 0x10
xor ebx, edx
cmp byte [ebp - 0x229], 0
je 0x401555
movzx eax, byte [ebp - 0x229]
mov edx, dword [ebp - 0x228]
movzx ecx, byte [eax + ebp - 0x218]
add ecx, edx
mov eax, ecx
imul edi
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x23c]
lea edx, [ecx + eax]
sar edx, 7
mov eax, edx
shl eax, 8
sub eax, edx
sub ecx, eax
movzx edx, byte [ecx + ebp - 0x118]
shl edx, 0x18
xor ebx, edx
mov dword [esi*4 + 0x408ef0], ebx
mov ecx, ebx
rol ecx, 0x18
mov dword [esi*4 + 0x408af0], ecx
rol ecx, 0x18
mov dword [esi*4 + 0x4086f0], ecx
rol ecx, 0x18
mov dword [esi*4 + 0x4082f0], ecx
inc esi
cmp esi, 0xff
jg 0x4015a3
movzx ebx, byte [esi*4 + 0x40a6f0]
movzx ecx, bl
test bl, bl
lea edx, [ecx + ecx]
jns 0x4013c5
xor edx, 0x1b
jmp 0x4013c5
add esp, 0x23c
pop ebx
pop esi
pop edi
pop ebp
ret