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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x9c
lea esi, [ebp - 0x4c]
mov dword [esi + 0x1c], 0x51dfc0
mov dword [esi + 0x20], 0x5246c4
mov dword [esi + 0x24], ebp
mov dword [esi + 0x2c], esp
mov dword [esi + 0x24], 0x404881
mov eax, esi
call fcn.0051ec29
test byte [ebp + 0xc], 0xf
jne 0x40479b
sub esp, 0xc
push esi
call fcn.0051ec4a
add esp, 0xac
pop esi
pop edi
pop ebx
pop ebp
ret
sub esp, 0xc
push 0x24
call fcn.0051cc4c
add esp, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x44], 1
lea eax, [ebp - 0x99]
push 0x10
push 0x52468d
push 0x15
push eax
call fcn.005107f0
add esp, 0x10
xor ecx, ecx
test eax, eax
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], ecx
mov byte [ebp - 0x64], 0
jle 0x4047fc
mov dword [ebp - 0x44], 2
sub esp, 4
lea ecx, [ebp - 0x68]
push eax
lea eax, [ebp - 0x99]
push eax
push ecx
call fcn.00403518
add esp, 0x10
mov dword [ebp - 0x44], 3
lea eax, [ebp - 0x68]
push 0x26
push str.Plaintext_length_must_be_divisible_by
push 0
push eax
call fcn.00405014
add esp, 0x10
sub esp, 8
lea esi, [ebp - 0x84]
push eax
push esi
call fcn.00405288
add esp, 0x10
mov eax, dword [ebp - 0x14]
cmp dword [esi + 0x18], 0xf
ja 0x404839
lea ecx, [ebp - 0x80]
jmp 0x40483c
mov ecx, dword [ebp - 0x80]
mov byte [ebp - 0xd], 1
mov edx, 4
mov dword [ebp - 0x44], edx
sub esp, 8
push ecx
push eax
call fcn.00404eac
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [eax], 0x405388
mov eax, dword [ebp - 0x14]
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x44], 5
push 0
push 0x404cf8
push 0x52473c
push eax
call fcn.0051ccfc
add esp, 0x10
mov eax, dword [ebp - 0x48]
cmp eax, 5
jbe 0x40488d
ud2
sub eax, 1
jmp dword [eax*4 + 0x4048fc]
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
jmp 0x4048da
mov esi, dword [ebp - 0x40]
mov bl, 1
mov eax, dword [ebp - 0x3c]
jmp 0x4048c6
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
mov bl, byte [ebp - 0xd]
sub esp, 0xc
lea eax, [ebp - 0x84]
push eax
call fcn.00403adc
add esp, 0x10
sub esp, 0xc
lea eax, [ebp - 0x68]
push eax
call fcn.00403adc
add esp, 0x10
test bl, 1
je 0x4048e8
sub esp, 0xc
push dword [ebp - 0x14]
call fcn.0051cb34
add esp, 0x10
mov dword [ebp - 0x44], 0xffffffff
sub esp, 0xc
push esi
call fcn.0051ebc8
add esp, 0xc
nop
cdq
dec eax
inc eax
add byte [ecx - 0x5effbfb8], bl
dec eax
inc eax
add byte [ebx - 0x54ffbfb8], ch
dec eax
inc eax
add byte [ebp + 0x53], dl
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
mov ebp, dword [edi]
test ebp, 0x3fffffff
je 0x404945
mov eax, dword [esp + 0x24]
xor edx, edx
mov cl, byte [eax + edx]
mov byte [esi + edx], cl
inc edx
mov ebp, dword [edi]
lea ecx, [ebp*4]
cmp edx, ecx
jb 0x40492f
jmp 0x404947
xor ecx, ecx
mov eax, dword [edi + 4]
shl eax, 4
add eax, 0x10
cmp ecx, eax
jb 0x40495b
jmp 0x404abe
mov ebp, dword [edi]
mov bl, byte [esi + ecx - 4]
mov byte [esp + 2], bl
mov al, byte [esi + ecx - 3]
mov byte [esp + 7], al
mov byte [esp + 3], al
mov al, byte [esi + ecx - 2]
mov byte [esp + 6], al
mov byte [esp + 4], al
mov bh, byte [esi + ecx - 1]
mov byte [esp + 5], bh
mov eax, ecx
shr eax, 2
xor edx, edx
div ebp
test edx, edx
je 0x4049cc
cmp ebp, 7
jb 0x404a51
cmp edx, 4
jne 0x404a51
movzx eax, bl
mov al, byte [eax + str.cw]
mov byte [esp + 2], al
xor eax, eax
inc eax
movzx edx, byte [esp + eax + 2]
mov dl, byte [edx + str.cw]
mov byte [esp + eax + 2], dl
inc eax
cmp eax, 4
jne 0x4049b2
jmp 0x404a51
mov al, byte [esp + 6]
mov byte [esp + 3], al
mov byte [esp + 4], bh
mov byte [esp + 5], bl
movzx eax, byte [esp + 7]
mov al, byte [eax + str.cw]
mov byte [esp + 2], al
xor eax, eax
inc eax
movzx edx, byte [esp + eax + 2]
mov dl, byte [edx + str.cw]
mov byte [esp + eax + 2], dl
inc eax
cmp eax, 4
jne 0x4049ee
lea ebx, [ebp*4]
xor edx, edx
mov eax, ecx
div ebx
dec eax
je 0x404a2a
xor ebx, ebx
mov dl, 1
mov dh, dl
add dh, dh
sar dl, 7
and dl, 0x1b
xor dl, dh
inc ebx
cmp ebx, eax
jne 0x404a17
jmp 0x404a2c
mov dl, 1
mov byte [esp + 8], dl
mov byte [esp + 0xb], 0
mov word [esp + 9], 0
xor byte [esp + 2], dl
xor eax, eax
inc eax
mov dl, byte [esp + eax + 8]
xor byte [esp + eax + 2], dl
inc eax
cmp eax, 4
jne 0x404a43
shl ebp, 2
mov eax, ecx
sub eax, ebp
mov dl, byte [esp + 2]
xor dl, byte [esi + eax]
mov byte [esi + ecx], dl
mov eax, ecx
or eax, 1
mov edx, dword [edi]
shl edx, 2
mov ebx, eax
sub ebx, edx
mov dl, byte [esp + 3]
xor dl, byte [esi + ebx]
mov byte [esi + eax], dl
mov eax, ecx
or eax, 2
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
mov eax, ecx
or eax, 3
mov edx, dword [edi]
shl edx, 2
mov ebx, eax
sub ebx, edx
mov dl, byte [esp + 5]
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 0x404959
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret