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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 4], edi
test esi, esi
je 0x409037
mov ecx, dword [ebp + 0x10]
push 0x18
pop ebx
cmp ecx, 0x10
je 0x408c73
cmp ecx, ebx
je 0x408c73
cmp ecx, 0x20
je 0x408c73
push str.Incorrect_key_length
jmp 0x40903c
mov eax, dword [ebp + 0x14]
cmp eax, 0x10
je 0x408c8e
cmp eax, ebx
je 0x408c8e
cmp eax, 0x20
je 0x408c8e
push str.Incorrect_block_length
jmp 0x40903c
push eax
push dword [ebp + 0xc]
mov dword [edi + 0x3c8], eax
lea eax, [edi + 0x3d0]
push eax
mov dword [edi + 0x3c4], ecx
call fcn.00411870
push dword [edi + 0x3c8]
lea eax, [edi + 0x3f0]
push dword [ebp + 0xc]
push eax
call fcn.00411870
mov eax, dword [edi + 0x3c4]
add esp, 0x18
mov ecx, dword [edi + 0x3c8]
cmp eax, 0x10
je 0x408ce5
push 0xe
cmp eax, ebx
pop eax
jne 0x408cfa
push 0xc
cmp ecx, 0x20
pop edx
cmovne eax, edx
jmp 0x408cfa
cmp ecx, 0x10
jne 0x408cef
push 0xa
pop eax
jmp 0x408cfa
push 0xe
pop eax
push 0xc
cmp ecx, ebx
pop edx
cmove eax, edx
mov dword [edi + 0x3cc], eax
mov eax, ecx
cdq
lea ecx, [edi + 4]
and edx, 3
mov dword [ebp + 0xc], ecx
lea ebx, [edx + eax]
sar ebx, 2
xor edx, edx
mov dword [ebp + 0x10], ebx
test ebx, ebx
jle 0x408d2a
mov edi, dword [ebp + 0xc]
mov ecx, ebx
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 0x3cc]
inc edx
add ecx, 0x20
mov dword [ebp + 0xc], ecx
cmp edx, eax
jle 0x408d17
xor ecx, ecx
mov dword [ebp + 0xc], ecx
test eax, eax
js 0x408d6d
lea edx, [edi + 0x1e4]
test ebx, ebx
jle 0x408d5c
mov ecx, ebx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 0x3cc]
inc ecx
add edx, 0x20
mov dword [ebp + 0xc], ecx
cmp ecx, eax
jle 0x408d4a
inc eax
imul eax, ebx
mov dword [ebp + 8], eax
mov eax, dword [edi + 0x3c4]
cdq
and edx, 3
add edx, eax
lea eax, [edi + 0x410]
sar edx, 2
mov dword [ebp - 8], edx
mov dword [ebp + 0x14], eax
mov dword [ebp + 0xc], eax
test edx, edx
jle 0x408e27
mov edi, edx
mov ebx, eax
movzx eax, byte [esi]
lea esi, [esi + 4]
shl eax, 0x18
mov dword [ebx], eax
movzx edx, byte [esi - 3]
shl edx, 0x10
or edx, eax
mov dword [ebx], edx
movzx ecx, byte [esi - 2]
shl ecx, 8
or ecx, edx
mov dword [ebx], ecx
movzx eax, byte [esi - 1]
or eax, ecx
mov dword [ebx], eax
lea ebx, [ebx + 4]
sub edi, 1
jne 0x408d9e
mov ecx, dword [ebp + 0x14]
xor esi, esi
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 0x14], ecx
mov dword [ebp + 0xc], esi
cmp esi, dword [ebp + 8]
jge 0x408eda
mov eax, esi
mov ecx, dword [ecx]
cdq
idiv ebx
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 4], ecx
mov ecx, dword [edi + 0x3cc]
mov esi, dword [ebp + 0xc]
sub ecx, eax
mov eax, dword [ebp + 0x14]
inc esi
mov dword [ebp + 0xc], esi
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 8]
mov eax, dword [eax]
mov dword [edi + ecx*4 + 0x1e4], eax
mov ecx, dword [ebp + 0x14]
add ecx, 4
mov dword [ebp + 0x14], ecx
cmp esi, edx
jl 0x408de0
jmp 0x408e2c
xor esi, esi
mov dword [ebp + 0xc], esi
cmp esi, dword [ebp + 8]
jge 0x408eda
mov eax, 0x43c7a8
movzx ecx, byte [eax]
inc eax
mov ebx, dword [edi + edx*4 + 0x40c]
mov dword [ebp - 0x10], eax
mov eax, ebx
sar eax, 0x10
movzx eax, al
movsx edx, byte [eax + str.cw]
mov eax, ebx
sar eax, 8
xor edx, ecx
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
shl edx, 8
sar ebx, 0x18
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
shl edx, 8
lea ebx, [edi + 0x410]
movzx eax, byte [eax + str.cw]
xor edx, eax
xor dword [ebx], edx
mov edx, dword [ebp - 8]
cmp edx, 8
je 0x408f5c
cmp edx, 1
jle 0x408ec3
lea ecx, [edi + 0x414]
lea ebx, [edx - 1]
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub ebx, 1
jne 0x408eb0
lea ebx, [edi + 0x410]
test edx, edx
jg 0x408fda
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
cmp esi, dword [ebp + 8]
jl 0x408e3a
xor esi, esi
inc esi
cmp dword [edi + 0x3cc], esi
jle 0x408f52
lea eax, [edi + 0x204]
mov dword [ebp + 0xc], eax
test ebx, ebx
jle 0x408f43
mov edi, eax
mov dword [ebp + 8], ebx
mov edx, dword [edi]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x43b7a8]
xor ecx, dword [eax*4 + 0x43bba8]
mov eax, edx
sar eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x43bfa8]
movzx eax, dl
xor ecx, dword [eax*4 + 0x43c3a8]
mov dword [edi], ecx
lea edi, [edi + 4]
sub ebx, 1
jne 0x408ef7
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
inc esi
add eax, 0x20
mov dword [ebp + 0xc], eax
cmp esi, dword [edi + 0x3cc]
jl 0x408eee
mov byte [edi], 1
pop edi
pop esi
pop ebx
leave
ret 0x10
push 3
lea ecx, [edi + 0x414]
pop edx
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x408f65
mov edx, dword [edi + 0x41c]
mov eax, edx
sar eax, 0x18
movzx eax, al
push 3
movsx ecx, byte [eax + str.cw]
mov eax, edx
sar eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
movzx eax, dl
shl ecx, 8
pop edx
movzx eax, byte [eax + str.cw]
xor ecx, eax
xor dword [edi + 0x420], ecx
lea ecx, [edi + 0x424]
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x408fcd
and dword [ebp - 0xc], 0
mov ecx, ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 0x14], ecx
cmp esi, dword [ebp + 8]
jge 0x408eda
mov eax, esi
mov ecx, dword [ecx]
cdq
idiv ebx
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 4], ecx
mov ecx, dword [edi + 0x3cc]
mov esi, dword [ebp + 0xc]
sub ecx, eax
mov eax, dword [ebp + 0x14]
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 8]
mov eax, dword [eax]
mov dword [edi + ecx*4 + 0x1e4], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x14]
inc eax
add ecx, 4
mov dword [ebp - 0xc], eax
inc esi
mov dword [ebp + 0x14], ecx
mov dword [ebp + 0xc], esi
cmp eax, edx
jl 0x408fe6
jmp 0x408ece
push str.Empty_key
lea ecx, [ebp - 0x1c]
call fcn.00407c3c
push 0x44aad0
lea eax, [ebp - 0x1c]
push eax
call fcn.0041145d
int3