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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x42e00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x74], 0xb7c17c51
mov dword [ebp - 0x70], 0x940a2227
mov dword [ebp - 0x6c], 0xe8ab13fe
mov dword [ebp - 0x68], 0xe06e9afa
mov dword [ebp - 0x64], 0xcc4ab16d
mov dword [ebp - 0x60], 0x20c8219e
mov dword [ebp - 0x5c], 0xd5b128ff
mov dword [ebp - 0x58], 0xb0e25def
mov dword [ebp - 0x54], 0x1d3792db
mov dword [ebp - 0x50], 0x70e92621
mov dword [ebp - 0x4c], 0x75972403
mov dword [ebp - 0x48], 0xec9e804
cmp ebx, 0x80
je 0x40f81d
cmp ebx, 0xc0
je 0x40f81d
cmp ebx, 0x100
je 0x40f81d
mov eax, 0xffffffa4
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412408
mov esp, ebp
pop ebp
ret
mov eax, dword [edx]
xorps xmm0, xmm0
mov dword [ebp - 0x44], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x40], eax
mov eax, dword [edx + 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x38], eax
movups xmmword [ebp - 0x34], xmm0
cmp ebx, 0xc0
jb 0x40f84f
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x30], eax
cmp ebx, 0x100
jne 0x40f863
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x2c], eax
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0x28], eax
add ebx, 0xffffff80
lea edx, [ebp - 0x44]
shr ebx, 6
push esi
push edi
lea eax, [ebx + 6]
add al, al
mov byte [ecx], al
lea eax, [ebp - 0x34]
push eax
mov eax, ebx
lea ecx, [ebp - 0x74]
shl eax, 4
add eax, ecx
lea ecx, [ebp - 0x34]
push eax
call fcn.0040f640
cmp ebx, 2
lea eax, [ebx + 1]
push 0x429c10
sbb esi, esi
lea edx, [ebp - 0x7c]
and esi, eax
lea ecx, [ebp - 0x78]
mov edi, esi
shl edi, 4
push 0x429a10
push 0x429b10
push 0x429d10
mov eax, dword [ebp + edi - 0x74]
xor eax, dword [ebp - 0x34]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + edi - 0x70]
xor eax, dword [ebp - 0x30]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp + edi - 0x6c]
xor eax, dword [ebp - 0x2c]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + edi - 0x68]
xor eax, dword [ebp - 0x28]
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0040f550
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x80]
push eax
lea edx, [ebp - 0x7c]
lea ecx, [ebp - 0x78]
call fcn.0040f3e0
mov eax, dword [ebp - 0x44]
add esp, 0x28
xor eax, dword [ebp - 0x78]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x40]
xor eax, dword [ebp - 0x7c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x3c]
xor eax, dword [ebp - 0x80]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x38]
xor eax, dword [ebp - 0x84]
mov dword [ebp - 0x18], eax
cmp esi, 2
jae 0x40f93c
lea eax, [ebp - 0x64]
add eax, edi
jmp 0x40f93f
lea eax, [ebp - 0x74]
lea ecx, [ebp - 0x34]
push ecx
push eax
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x14]
call fcn.0040f640
mov ebx, dword [ebp - 0x88]
lea edi, [ebp - 0x44]
add esp, 8
xor eax, eax
add ebx, 0x44
inc eax
lea esi, [ebp - 0x44]
mov dword [ebp - 0x8c], eax
lea ecx, [ebx - 0x40]
and eax, 3
mov edx, edi
shl eax, 4
add esi, eax
push 0x6d
push esi
call fcn.0040f6e0
push 0x61
push esi
mov edx, edi
mov ecx, ebx
call fcn.0040f6e0
push 0x3d
push esi
lea ecx, [ebx + 0x40]
mov edx, edi
call fcn.0040f6e0
push 0x1f
push esi
lea ecx, [ebx + 0x80]
mov edx, edi
call fcn.0040f6e0
mov eax, dword [ebp - 0x8c]
add esp, 0x20
add ebx, 0x10
add edi, 0x10
cmp eax, 4
jl 0x40f960
mov ecx, dword [ebp - 0x88]
lea eax, [ebp - 0x34]
push 0x13
push eax
lea edx, [ebp - 0x44]
lea ecx, [ecx + 0x104]
call fcn.0040f6e0
add esp, 8
lea eax, [ebp - 0x44]
mov ecx, 0x40
pop edi
pop esi
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40f9e3
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop ebx
call fcn.00412408
mov esp, ebp
pop ebp
ret