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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov r14, qword [rdx]
mov qword [rsp + 0x68], rdx
movsxd rax, dword [rdx + 8]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x50], rcx
lea rcx, [rcx + 0xb0]
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], rax
test al, 0xf
mov eax, 0x348f5fb7
mov ecx, 0xe62e79f0
cmovne ecx, eax
mov dword [rsp + 0x38], ecx
mov ebp, 0x163664a
mov esi, 0xed75c050
xor edi, edi
mov ebx, 0x3aaff3f4
mov r15d, 0x777c0f28
mov r12d, 0xb932687c
jmp 0x40eb32
setne cl
cmove ebp, ebx
and al, cl
nop word cs:[rax + rax]
cmp ebp, 0x163664a
jge 0x40eb62
cmp ebp, 0xe62e79f0
jge 0x40eb92
cmp ebp, 0xd83b7383
jge 0x40f1a6
lea rcx, [rdx + 0x10]
cmp ebp, 0xb4d09236
cmove rdx, rcx
cmove ebp, esi
jmp 0x40eb32
cmp ebp, 0x34bc86e4
jge 0x40ebb2
cmp ebp, 0x348f5fb7
jge 0x40eb1e
cmp ebp, 0x163664a
jne 0x40eb32
cmp qword [rsp + 0x78], 0
mov ebp, 0x7f3c8080
mov ecx, 0x348f5fb7
cmove ebp, ecx
jmp 0x40eb32
cmp ebp, 0xed75c050
jge 0x40f1d7
cmp ebp, 0xe62e79f0
cmove rdx, rdi
cmove ebp, esi
jmp 0x40eb32
cmp ebp, 0x3aaff3f4
jge 0x40f1f4
cmp ebp, 0x34bc86e4
jne 0x40eb32
mov byte [rsp + 0x2e], al
mov qword [rsp + 0x70], rdx
mov rax, qword [0x0045042a]
mov rcx, rax
not rcx
movabs rdx, 0xb7f06e8120b23cb
and rcx, rdx
movabs rdx, 0xf480f917edf4dc34
and rax, rdx
or rax, rcx
mov rcx, rax
not rcx
movabs rdx, 0x36a1d63ceb740fb8
and rcx, rdx
movabs rdx, 0xc95e29c3148bf047
and rax, rdx
or rax, rcx
movabs rcx, 0x3dded0d43381e68d
xor rax, rcx
mov r8d, 0x10
lea rcx, [rsp + 0x80]
mov rdx, r14
call rax
mov ecx, 0xa
mov rdx, r14
mov r8, qword [rsp + 0x50]
call fcn.0040e8f2
mov eax, 0x45baa5a8
mov bl, 9
jmp 0x40ec6a
mov ecx, 0x9fe652b
cmove eax, ecx
cmp eax, 0x45baa5a8
jae 0x40ec92
cmp eax, 0x1bf56d5e
jae 0x40ec62
cmp eax, 0x9fe652b
jne 0x40ec6a
jmp 0x40f211
cmp eax, 0x4a92d8d4
jae 0x40ee52
cmp eax, 0x45baa5a8
jne 0x40ec6a
mov r11d, ebx
mov al, byte [r14 + 9]
mov cl, byte [r14 + 0xd]
mov byte [r14 + 0xd], al
mov al, byte [r14 + 5]
mov byte [r14 + 9], al
mov al, byte [r14 + 1]
mov byte [r14 + 5], al
mov byte [r14 + 1], cl
mov al, byte [r14 + 2]
mov cl, byte [r14 + 0xa]
mov byte [r14 + 2], cl
mov byte [r14 + 0xa], al
mov al, byte [r14 + 6]
mov cl, byte [r14 + 0xe]
mov byte [r14 + 6], cl
mov byte [r14 + 0xe], al
mov al, byte [r14 + 3]
mov cl, byte [r14 + 7]
mov byte [r14 + 3], cl
mov cl, byte [r14 + 0xb]
mov byte [r14 + 7], cl
mov cl, byte [r14 + 0xf]
mov byte [r14 + 0xb], cl
mov byte [r14 + 0xf], al
mov edx, 0xb932687c
xor esi, esi
mov r8d, 0xaa7a20eb
mov ebp, 0xeb85d764
mov r9d, 0x32278deb
lea r10, [0x00450062]
jmp 0x40ed32
sete bl
cmove edx, r12d
add sil, bl
cmp edx, 0x32278deb
jge 0x40ed62
cmp edx, 0xeb85d764
jge 0x40eda2
cmp edx, 0xb932687c
jge 0x40eded
cmp edx, 0xaa7a20eb
jne 0x40ed5b
mov ecx, 0
cmove edx, ebp
jmp 0x40ed32
cmp edx, 0x6d55a6a8
jge 0x40edd2
cmp edx, 0x339c4ae4
jge 0x40ee05
cmp edx, 0x32278deb
jne 0x40ed32
movzx edx, sil
movzx ebx, cl
lea rbx, [r14 + rbx*4]
movzx edi, byte [rdx + rbx]
movzx eax, byte [rdi + r10]
mov byte [rdx + rbx], al
mov edx, 0x339c4ae4
jmp 0x40ed32
cmp edx, 0x240f1f86
jge 0x40ee1d
cmp edx, 0xeb85d764
jne 0x40ed32
cmp cl, 4
mov edx, 0x6d55a6a8
cmovb edx, r9d
jmp 0x40ed32
cmp edx, 0x777c0f28
jge 0x40ed28
cmp edx, 0x6d55a6a8
cmove edx, r15d
jmp 0x40ed32
jne 0x40ed32
cmp sil, 4
mov edx, 0x240f1f86
cmovb edx, r8d
jmp 0x40ed32
jne 0x40ed32
neg cl
mov al, 1
sub al, cl
mov edx, 0xeb85d764
mov cl, al
jmp 0x40ed32
jne 0x40ed32
mov ebx, r11d
movzx ecx, bl
mov rdx, r14
mov r8, qword [rsp + 0x50]
call fcn.0040e8f2
test bl, bl
mov eax, 0x4a92d8d4
mov ecx, 0x1bf56d5e
cmove eax, ecx
jmp 0x40ec6a
cmp eax, 0x5def4033
jae 0x40ee6c
cmp eax, 0x4a92d8d4
jne 0x40ec6a
mov byte [rsp + 0x2f], bl
xor edx, edx
jmp 0x40ee84
jne 0x40ec6a
neg bl
not bl
mov eax, 0x45baa5a8
jmp 0x40ec6a
inc edx
movsxd rbx, edx
cmp ebx, 4
mov esi, 0x71a4a310
mov eax, 0xb6447505
cmovl esi, eax
mov ecx, 0xefd923a1
jmp 0x40eea2
mov ecx, esi
nop
cmp ecx, 0x525eac45
jge 0x40f162
cmp ecx, 0xefd923a1
jge 0x40f182
cmp ecx, 0xb6447505
jne 0x40eea2
movzx ecx, byte [r14 + rbx*4]
mov dword [rsp + 0x44], ecx
movzx edi, byte [r14 + rbx*4 + 1]
movzx r13d, byte [r14 + rbx*4 + 2]
mov dword [rsp + 0x40], r13d
movzx ebp, byte [r14 + rbx*4 + 3]
mov dword [rsp + 0x4c], edx
mov edx, 0xe
mov dword [rsp + 0x48], esi
mov qword [rsp + 0x30], rbx
call fcn.0040f2d2
movzx esi, al
mov edx, 0xb
mov ecx, edi
call fcn.0040f2d2
movzx r15d, al
mov eax, esi
not eax
and eax, 0x8801e6ac
and esi, 0x53
mov ecx, r15d
not ecx
and ecx, 0x8801e6ac
and r15d, 0x53
or esi, eax
or r15d, ecx
xor r15d, esi
mov edx, 0xd
mov ecx, r13d
call fcn.0040f2d2
movzx esi, al
mov eax, r15d
not eax
and eax, 0x9242f062
and r15d, 0x9d
mov ecx, esi
not ecx
and ecx, 0x9242f062
and esi, 0x9d
or r15d, eax
or esi, ecx
xor esi, r15d
mov edx, 9
mov dword [rsp + 0x3c], ebp
mov ecx, ebp
call fcn.0040f2d2
movzx eax, al
mov ecx, esi
not ecx
and ecx, 0xab
and esi, 0x54
mov edx, eax
not edx
and edx, 0xab
and eax, 0x54
or esi, ecx
or eax, edx
xor eax, esi
mov rcx, qword [rsp + 0x30]
mov byte [r14 + rcx*4], al
mov edx, 9
mov r13d, dword [rsp + 0x44]
mov ecx, r13d
call fcn.0040f2d2
movzx esi, al
mov edx, 0xe
mov ebx, edi
mov ecx, ebx
call fcn.0040f2d2
movzx edi, al
mov eax, esi
not eax
and eax, edi
not edi
and edi, esi
or edi, eax
mov edx, 0xb
mov r15d, dword [rsp + 0x40]
mov ecx, r15d
call fcn.0040f2d2
movzx esi, al
mov eax, edi
not eax
and eax, esi
not esi
and esi, edi
or esi, eax
mov edx, 0xd
mov ecx, ebp
call fcn.0040f2d2
movzx eax, al
mov ecx, esi
not ecx
and ecx, 0x1b
and esi, 0xe4
mov edx, eax
not edx
and edx, 0x1b
and eax, 0xe4
or esi, ecx
or eax, edx
xor eax, esi
mov rcx, qword [rsp + 0x30]
mov byte [r14 + rcx*4 + 1], al
mov edx, 0xd
mov ebp, r13d
mov ecx, ebp
call fcn.0040f2d2
movzx edi, al
mov edx, 9
mov ecx, ebx
mov r13d, ebx
call fcn.0040f2d2
movzx esi, al
mov eax, edi
not eax
and eax, esi
not esi
and esi, edi
or esi, eax
mov edx, 0xe
mov ecx, r15d
call fcn.0040f2d2
movzx edi, al
mov eax, esi
not eax
and eax, 0x93ddd7b9
and esi, 0x46
mov ecx, edi
not ecx
and ecx, 0x93ddd7b9
and edi, 0x46
or esi, eax
or edi, ecx
xor edi, esi
mov edx, 0xb
mov ebx, dword [rsp + 0x3c]
mov ecx, ebx
call fcn.0040f2d2
movzx eax, al
mov ecx, edi
not ecx
and ecx, eax
not eax
and eax, edi
or eax, ecx
mov rcx, qword [rsp + 0x30]
mov byte [r14 + rcx*4 + 2], al
mov edx, 0xb
mov ecx, ebp
call fcn.0040f2d2
movzx edi, al
mov edx, 0xd
mov ecx, r13d
call fcn.0040f2d2
movzx esi, al
mov eax, edi
not eax
and eax, 0xa974d92b
and edi, 0xd4
mov ecx, esi
not ecx
and ecx, 0xa974d92b
and esi, 0xd4
or edi, eax
or esi, ecx
xor esi, edi
mov edx, 9
mov ecx, r15d
call fcn.0040f2d2
movzx edi, al
mov eax, esi
not eax
and eax, edi
not edi
and edi, esi
or edi, eax
mov edx, 0xe
mov ecx, ebx
mov r15d, 0x777c0f28
call fcn.0040f2d2
mov rbx, qword [rsp + 0x30]
mov esi, dword [rsp + 0x48]
mov edx, dword [rsp + 0x4c]
movzx eax, al
mov ecx, edi
not ecx
and ecx, eax
not eax
and eax, edi
or eax, ecx
mov byte [r14 + rbx*4 + 3], al
mov ecx, 0x525eac45
jmp 0x40eea2
cmp ecx, 0x71a4a310
jge 0x40f192
cmp ecx, 0x525eac45
jne 0x40eea2
jmp 0x40ee82
jne 0x40eea2
jmp 0x40ee9e
mov eax, 0x5def4033
jne 0x40eea2
mov bl, byte [rsp + 0x2f]
jmp 0x40ec6a
jne 0x40eb32
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx]
mov rbp, rdx
mov edx, dword [rcx + 8]
dec edx
movsxd rdx, edx
movzx edx, byte [rax + rdx]
call fcn.00410902
mov rdx, rbp
mov ebp, 0x3aaff3f4
mov al, 1
jmp 0x40eb32
jne 0x40eb32
cmp rdx, qword [rsp + 0x60]
mov ebp, 0xd83b7383
mov ecx, 0x34bc86e4
cmovb ebp, ecx
jmp 0x40eb32
cmp ebp, 0x7f3c8080
jge 0x40f2b1
cmp ebp, 0x3aaff3f4
jne 0x40eb32
jmp 0x40f2bb
mov rcx, r14
mov rsi, qword [rsp + 0x58]
mov rdx, rsi
call fcn.0040e832
mov rbx, qword [0x0045042a]
mov rax, rbx
not rax
movabs rcx, 0x5006c337789ed137
and rax, rcx
movabs rcx, 0xaff93cc887612ec8
and rbx, rcx
or rbx, rax
mov rax, rbx
not rax
movabs rcx, 0xbd631eb1312dda15
and rax, rcx
movabs rcx, 0x429ce14eced225ea
and rbx, rcx
or rbx, rax
movabs rax, 0xed65dd86834dc1dc
xor rbx, rax
mov r8d, 0x10
mov rcx, rsi
lea rdx, [rsp + 0x80]
call rbx
add r14, 0x10
mov ebp, 0xb4d09236
mov esi, 0xed75c050
xor edi, edi
mov ebx, 0x3aaff3f4
mov rdx, qword [rsp + 0x70]
mov al, byte [rsp + 0x2e]
jmp 0x40eb32
cmove ebp, dword [rsp + 0x38]
jmp 0x40eb32
and al, 1
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret