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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov dword [ebp - 8], esi
mov dl, 0x10
mov dword [ebp - 0xc], edi
lea eax, [edi + 0x10]
mov dword [ebp - 0x1c], eax
lea ebx, [esi + 0x10]
mov eax, edi
mov dword [ebp - 0x34], ebx
sub eax, esi
mov ecx, ebx
mov dword [ebp - 0x10], eax
mov eax, edi
mov edi, dword [ebp - 0x10]
sub eax, esi
add eax, 0x50
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
sub eax, esi
mov dword [ebp - 0x1c], eax
mov esi, eax
mov al, byte [edi + ecx + 0x3f]
lea ecx, [ecx - 1]
mov byte [edi + ecx], al
xor byte [ecx], al
movzx eax, byte [ebx + ecx]
mov byte [esi + ecx], al
add dl, 0xff
jne 0x408724
mov esi, dword [ebp - 8]
mov dl, 0x10
mov edi, dword [ebp - 0xc]
mov cl, byte [esi + 1]
lea ebx, [esi + 0x10]
movzx eax, byte [esi + 0xd]
mov byte [esi + 1], al
movzx eax, byte [esi + 9]
mov byte [esi + 0xd], al
movzx eax, byte [esi + 5]
mov byte [esi + 9], al
movzx eax, byte [esi + 0xa]
mov byte [esi + 5], cl
mov cl, byte [esi + 2]
mov byte [esi + 2], al
movzx eax, byte [esi + 7]
mov byte [esi + 0xa], cl
mov cl, byte [esi + 3]
mov byte [esi + 3], al
movzx eax, byte [esi + 0xb]
mov byte [esi + 7], al
movzx eax, byte [esi + 0xf]
mov byte [esi + 0xf], cl
mov cl, byte [esi + 6]
mov byte [esi + 0xb], al
movzx eax, byte [esi + 0xe]
mov byte [esi + 0xe], cl
mov ecx, ebx
mov byte [esi + 6], al
nop dword [eax]
movzx eax, byte [ecx - 1]
lea ecx, [ecx - 1]
mov al, byte [eax + 0x445f80]
mov byte [ecx], al
add dl, 0xff
jne 0x4087a0
mov al, 0xd
mov byte [ebp - 1], 0x80
mov byte [ebp - 2], al
nop dword [eax]
test al, 1
je 0x408924
lea eax, [edi - 3]
mov dword [ebp - 0x14], 3
sub eax, edi
lea esi, [edi + 2]
mov dword [ebp - 0x18], eax
lea edx, [edi - 4]
lea eax, [edi - 2]
sub esi, edi
sub eax, edi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], eax
lea ebx, [edi + 1]
lea eax, [edi - 1]
sub ebx, edi
sub eax, edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], eax
lea ecx, [edi + 0x1c]
lea eax, [edi + 3]
sub edx, edi
sub eax, edi
mov esi, ebx
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
nop
movzx eax, byte [edx + ecx]
lea ecx, [ecx - 4]
xor byte [ecx + 4], al
movzx eax, byte [edi + ecx + 4]
xor byte [esi + ecx + 4], al
mov edi, dword [ebp - 0x28]
movzx eax, byte [ebx + ecx + 4]
xor byte [edi + ecx + 4], al
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
movzx eax, byte [eax + ecx + 4]
xor byte [edi + ecx + 4], al
sub dword [ebp - 0x14], 1
mov edi, dword [ebp - 0x18]
jne 0x408810
mov edi, dword [ebp - 0xc]
mov dl, 0xc
mov ebx, dword [ebp - 0x34]
movzx eax, byte [edi + 0xc]
movzx eax, byte [eax + 0x446080]
xor byte [edi + 0x10], al
movzx eax, byte [edi + 0xd]
movzx eax, byte [eax + 0x446080]
xor byte [edi + 0x11], al
movzx eax, byte [edi + 0xe]
movzx eax, byte [eax + 0x446080]
xor byte [edi + 0x12], al
movzx eax, byte [edi + 0xf]
movzx eax, byte [eax + 0x446080]
xor byte [edi + 0x13], al
nop word [eax + eax]
movzx ecx, dl
movzx eax, byte [ecx + edi - 4]
xor byte [ecx + edi], al
movzx eax, byte [ecx + edi - 3]
xor byte [ecx + edi + 1], al
movzx eax, byte [ecx + edi - 2]
xor byte [ecx + edi + 2], al
movzx eax, byte [ecx + edi - 1]
xor byte [ecx + edi + 3], al
add dl, 0xfc
jne 0x408890
mov cl, byte [ebp - 1]
mov dl, 0x10
mov al, cl
mov esi, dword [ebp - 0x1c]
and al, 1
neg al
sbb al, al
shr cl, 1
and al, 0x8d
xor cl, al
movzx eax, byte [edi + 0x1d]
mov byte [ebp - 1], cl
movzx eax, byte [eax + 0x446080]
xor al, byte [edi]
xor al, cl
mov ecx, ebx
mov byte [edi], al
movzx eax, byte [edi + 0x1e]
movzx eax, byte [eax + 0x446080]
xor byte [edi + 1], al
movzx eax, byte [edi + 0x1f]
movzx eax, byte [eax + 0x446080]
xor byte [edi + 2], al
movzx eax, byte [edi + 0x1c]
movzx eax, byte [eax + 0x446080]
xor byte [edi + 3], al
mov al, byte [ecx + esi - 1]
lea ecx, [ecx - 1]
xor byte [ecx], al
add dl, 0xff
jne 0x408911
mov esi, dword [ebp - 8]
jmp 0x408941
mov edi, dword [ebp - 0x10]
mov dl, 0x10
mov eax, ebx
nop dword [eax + eax]
mov cl, byte [eax + edi - 1]
lea eax, [eax - 1]
xor byte [eax], cl
add dl, 0xff
jne 0x408930
mov edi, dword [ebp - 0xc]
mov ecx, esi
call fcn.00408460
mov cl, byte [esi + 1]
mov dl, 0x10
movzx eax, byte [esi + 0xd]
mov byte [esi + 1], al
movzx eax, byte [esi + 9]
mov byte [esi + 0xd], al
movzx eax, byte [esi + 5]
mov byte [esi + 9], al
movzx eax, byte [esi + 0xa]
mov byte [esi + 5], cl
mov cl, byte [esi + 2]
mov byte [esi + 2], al
movzx eax, byte [esi + 7]
mov byte [esi + 0xa], cl
mov cl, byte [esi + 3]
mov byte [esi + 3], al
movzx eax, byte [esi + 0xb]
mov byte [esi + 7], al
movzx eax, byte [esi + 0xf]
mov byte [esi + 0xf], cl
mov cl, byte [esi + 6]
mov byte [esi + 0xb], al
movzx eax, byte [esi + 0xe]
mov byte [esi + 0xe], cl
mov ecx, ebx
mov byte [esi + 6], al
nop dword [eax]
movzx eax, byte [ecx - 1]
dec ecx
mov al, byte [eax + 0x445f80]
mov byte [ecx], al
add dl, 0xff
jne 0x4089a0
mov al, byte [ebp - 2]
add al, 0xff
mov byte [ebp - 2], al
jne 0x4087c0
mov cl, 0x10
mov eax, dword [ebp - 0x10]
lea ebx, [ebx - 1]
mov al, byte [ebx + eax]
xor byte [ebx], al
add cl, 0xff
jne 0x4089c2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret