Function at 0x40362a
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xbc
mov dword [ebp - 0x70], 0x45e02c
mov dword [ebp - 0x6c], 0x4625e8
mov dword [ebp - 0x68], ebp
mov dword [ebp - 0x60], esp
mov dword [ebp - 0x68], 0x4035ec
lea esi, [ebp - 0x8c]
mov eax, esi
call fcn.0045ec95
test byte [ebp + 0xc], 0xf
je 0x403512
sub esp, 0xc
push 0x24
call fcn.0045ccb8
add esp, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x84], 1
lea eax, [ebp - 0xbd]
push 0x10
push 0x4625b1
push 0x15
push eax
call fcn.0044f9b0
add esp, 0x10
test eax, eax
mov dword [ebp - 0x90], 0xf
mov dword [ebp - 0x94], 0
mov byte [ebp - 0xa4], 0
jle 0x4034ab
mov dword [ebp - 0x84], 2
sub esp, 4
lea ecx, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xbd]
push eax
push ecx
call fcn.004041b8
add esp, 0x10
mov dword [ebp - 0x84], 3
lea eax, [ebp - 0xa8]
push 0x26
push str.Plaintext_length_must_be_divisible_by
push 0
push eax
call fcn.00404408
add esp, 0x10
mov esi, eax
mov dword [ebp - 0x30], 0xf
lea edx, [ebp - 0x44]
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x44], 0
mov ecx, dword [esi + 0x18]
cmp ecx, 0xf
ja 0x403526
mov ebx, dword [esi + 0x14]
mov edi, esi
add edi, 4
mov eax, ebx
inc eax
je 0x40353d
sub esp, 4
push eax
push edi
push edx
mov dword [ebp - 0x4c], ecx
call fcn.0044cf90
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x44]
add esp, 0x10
jmp 0x403542
sub esp, 0xc
push esi
call fcn.0045ecb6
add esp, 0xcc
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, esi
add edi, 4
mov eax, dword [esi + 4]
mov dword [ebp - 0x44], eax
mov dword [esi + 4], 0
mov ebx, dword [esi + 0x14]
jmp 0x403542
mov ebx, 0xffffffff
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ecx
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x14], 0
mov byte [edi], 0
cmp dword [ebp - 0x30], 0xf
jbe 0x403562
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], 0x4625dc
mov dword [eax], 0x40469c
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x20], 0xf
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0x1c], 0
mov byte [ecx + 0xc], 0
lea eax, [edx - 1]
nop dword [eax + eax]
cmp byte [eax + 1], 0
lea eax, [eax + 1]
jne 0x403598
mov ecx, dword [ebp - 0x10]
add ecx, 8
sub eax, edx
mov dword [ebp - 0x84], 4
sub esp, 4
push eax
push edx
push ecx
call fcn.004041b8
add esp, 0x10
mov eax, dword [ebp - 0x10]
mov dword [eax], 0x404688
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x84], 5
push 0
push 0x403dfc
push 0x46263c
push eax
call fcn.0045cd68
add esp, 0x10
mov eax, dword [ebp - 0x88]
cmp eax, 5
jbe 0x4035fb
ud2
sub eax, 1
jmp dword [eax*4 + 0x403714]
mov esi, dword [ebp - 0x80]
mov eax, dword [ebp - 0x7c]
jmp 0x4036ee
mov esi, dword [ebp - 0x80]
mov edi, dword [ebp - 0x7c]
sub esp, 0xc
push dword [ebp - 0x10]
call fcn.004410b8
add esp, 0x10
mov al, 1
jmp 0x40363c
mov eax, dword [ebp - 0x80]
mov cl, 1
mov edx, dword [ebp - 0x7c]
jmp 0x403694
mov esi, dword [ebp - 0x80]
mov edi, dword [ebp - 0x7c]
xor eax, eax
mov byte [ebp - 0x11], al
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x54], edi
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x403679
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
inc eax
cmp eax, 0x1000
mov eax, dword [ebp - 0x1c]
jb 0x40366d
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax - 4]
sub esp, 0xc
push eax
call fcn.00440ea4
add esp, 0x10
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x44], 0
mov cl, byte [ebp - 0x11]
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
and cl, 1
mov byte [ebp - 0x12], cl
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
cmp eax, 0x10
jb 0x4036da
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
inc eax
cmp eax, 0x1000
mov eax, dword [ebp - 0x2c]
jb 0x4036ce
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax - 4]
sub esp, 0xc
push eax
call fcn.00440ea4
add esp, 0x10
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x24]
mov cl, byte [ebp - 0x12]
cmp cl, 1
jne 0x4036fe
sub esp, 0xc
push dword [ebp - 0x10]
call fcn.0045cba0
add esp, 0x10
mov eax, esi
mov dword [ebp - 0x84], 0xffffffff
sub esp, 0xc
push eax
call fcn.0045ec34
add esp, 0xc
pop es
inc eax
add byte [edi], al
inc eax
add byte [edx], ch
inc eax
add byte [edx], dl
inc eax
add byte [esi + esi], dh
inc eax
add byte [ebp + 0x53], dl
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov ebp, dword [edi]
test ebp, 0x3fffffff
je 0x40375f
mov eax, dword [esp + 0x28]
xor edx, edx
nop
movzx ecx, byte [eax + edx]
mov byte [esi + edx], cl
inc edx
mov ebp, dword [edi]
lea ecx, [ebp*4]
cmp edx, ecx
jb 0x403748
jmp 0x403761
xor ecx, ecx
mov eax, dword [edi + 4]
shl eax, 4
add eax, 0x10
cmp ecx, eax
jb 0x40377a
jmp 0x4038b9
mov ebp, dword [edi]
mov bl, byte [esi + ecx - 4]
mov bh, byte [esi + ecx - 3]
mov al, byte [esi + ecx - 2]
mov byte [esp], al
mov al, byte [esi + ecx - 1]
mov byte [esp + 4], al
mov eax, ecx
shr eax, 2
xor edx, edx
div ebp
test edx, edx
je 0x4037d8
cmp ebp, 7
jb 0x403855
cmp edx, 4
jne 0x403855
movzx eax, bl
mov bl, byte [eax + str.cw]
movzx eax, bh
mov bh, byte [eax + str.cw]
movzx eax, byte [esp]
mov al, byte [eax + str.cw]
mov byte [esp], al
movzx eax, byte [esp + 4]
jmp 0x40384b
movzx eax, bh
mov al, byte [eax + str.cw]
mov byte [esp + 0xb], al
movzx eax, byte [esp]
mov dword [esp], eax
movzx eax, byte [esp + 4]
mov dword [esp + 4], eax
movzx eax, bl
mov dword [esp + 0xc], eax
lea ebx, [ebp*4]
xor edx, edx
mov eax, ecx
div ebx
dec eax
je 0x40382b
xor edx, edx
mov bl, 1
nop dword [eax + eax]
mov bh, bl
add bh, bh
sar bl, 7
and bl, 0x1b
xor bl, bh
inc edx
cmp edx, eax
jne 0x403818
jmp 0x40382d
mov bl, 1
xor bl, byte [esp + 0xb]
mov eax, dword [esp]
mov bh, byte [eax + str.cw]
mov eax, dword [esp + 4]
mov al, byte [eax + str.cw]
mov byte [esp], al
mov eax, dword [esp + 0xc]
mov al, byte [eax + str.cw]
mov byte [esp + 4], al
shl ebp, 2
mov eax, ecx
sub eax, ebp
xor bl, byte [esi + eax]
mov byte [esi + ecx], bl
mov eax, ecx
or eax, 1
mov edx, dword [edi]
shl edx, 2
mov ebp, eax
sub ebp, edx
xor bh, byte [esi + ebp]
mov byte [esi + eax], bh
mov eax, ecx
or eax, 2
mov edx, dword [edi]
shl edx, 2
mov ebx, eax
sub ebx, edx
mov dl, byte [esp]
xor dl, byte [esi + ebx]
mov byte [esi + eax], dl
mov eax, ecx
or eax, 3
mov edx, dword [edi]
shl edx, 2
mov ebx, eax
sub ebx, edx
mov dl, byte [esp + 4]
xor dl, byte [esi + ebx]
mov byte [esi + eax], dl
add ecx, 4
mov eax, dword [edi + 4]
shl eax, 4
add eax, 0x10
cmp ecx, eax
jb 0x403778
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret