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

Disassembly:
mov r11, rsp
push rbp
push rdi
push r12
push r13
push r15
lea rbp, [r11 - 0x158]
sub rsp, 0x230
mov rax, qword [0x18005a080]
xor rax, rsp
mov qword [rbp + 0x118], rax
mov rdi, qword [rbp + 0x180]
mov r15, r9
mov qword [rsp + 0x20], r8
mov r12, r8
mov qword [rsp + 0x28], rcx
mov r13, rdx
test rcx, rcx
je 0x18004ad98
test rdx, rdx
je 0x18004ad98
xor eax, eax
mov qword [r11 - 0x30], rbx
mov qword [r11 - 0x38], rsi
xorps xmm0, xmm0
mov qword [rbp + 0x50], rax
movups xmmword [rbp + 0xf0], xmm0
movups xmmword [rbp + 0x40], xmm0
test r9, r9
je 0x18004a6aa
mov qword [r9], rax
mov rbx, qword [rbp + 0x188]
lea rcx, [rbp + 0xf0]
mov eax, 0x21
mov r8, rbx
cmp rbx, rax
mov rdx, rdi
cmova r8, rax
call sub.VCRUNTIME140.dll_memcpy
xorps xmm0, xmm0
lea r8, [rbp + 0x71]
xor ecx, ecx
movups xmmword [rbp + 0x70], xmm0
xor r9d, r9d
movups xmmword [rbp + 0x80], xmm0
movups xmmword [rbp + 0x90], xmm0
movups xmmword [rbp + 0xa0], xmm0
movups xmmword [rbp + 0xb0], xmm0
movups xmmword [rbp + 0xc0], xmm0
movups xmmword [rbp + 0xd0], xmm0
movups xmmword [rbp + 0xe0], xmm0
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 - 1], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 1], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 2], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 3], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 4], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 5], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 6], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 7], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 8], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 9], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0xa], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0xb], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0xc], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0xd], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0xe], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0xf], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x10], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x11], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x12], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x13], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x14], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x15], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x16], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x17], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x18], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 + 0x19], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
lea r8, [r8 + 0x20]
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 - 6], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 - 5], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 - 4], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 - 3], cl
lea ecx, [rdx + 1]
movsxd rax, ecx
xor edx, edx
cmp rax, rbx
cmovb edx, ecx
add r9d, 0x20
movsxd rax, edx
movzx ecx, byte [rax + rdi]
add cl, 2
mov byte [r8 - 2], cl
lea ecx, [rdx + 1]
cmp r9d, 0x80
jb 0x18004a710
movzx edi, byte [rbp + 0xf1]
lea rsi, [rbp + 0x70]
shr rdi, 3
add rsi, rdi
xor ebx, ebx
nop dword [rax + rax]
mov edx, 0xff
mov ecx, 1
call fcn.18004b830
mov byte [rbp + rbx + 0x40], al
inc rbx
cmp rbx, 8
jl 0x18004aac0
cmp rdi, 0x10
lea rcx, [rbp + 0x70]
lea rdx, [rbp + 0x58]
cmovae rcx, rsi
lea rax, [rcx + 0xf]
cmp rdx, rax
ja 0x18004ab07
lea rax, [rbp + 0x67]
cmp rax, rcx
jb 0x18004ab07
movups xmm0, xmmword [rcx]
movups xmmword [rbp + 0x58], xmm0
jmp 0x18004ab0e
movups xmm0, xmmword [rcx]
movups xmmword [rbp + 0x58], xmm0
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, pe_nt_image_headers64
call sub.VCRUNTIME140.dll_memset
lea rax, [rbp + 0x70]
mov dword [rsp + 0x34], 0x80
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x30]
lea rax, [rbp + 0x58]
mov dword [rsp + 0x38], 1
mov qword [rsp + 0x48], rax
call fcn.18004be20
mov r9d, 8
lea rdx, [rbp + 0x40]
mov r8, r12
lea rcx, [rsp + 0x30]
call fcn.18004bc10
mov r12d, eax
movzx edi, byte [rbp + 0x40]
mov rbx, qword [rbp + 0x41]
movzx eax, dil
xor al, byte [0x18004f8b0]
mov byte [rbp + 0x70], al
movzx eax, bl
xor al, byte [reloc.WS2_32.dll_htons]
mov r11, qword [rbp + 0x42]
mov r9, qword [rbp + 0x43]
mov r8, qword [rbp + 0x44]
mov rdx, qword [rbp + 0x45]
mov r10, qword [rbp + 0x46]
mov rcx, qword [rbp + 0x47]
mov byte [rbp + 0x71], al
movzx eax, r11b
xor al, byte [0x18004f8b2]
mov rsi, qword [rsp + 0x20]
mov byte [rbp + 0x72], al
add rsi, r12
movzx eax, r9b
xor al, byte [0x18004f8b3]
mov byte [rbp + 0x73], al
movzx eax, r8b
xor al, byte [0x18004f8b4]
mov byte [rbp + 0x74], al
movzx eax, dl
xor al, byte [0x18004f8b5]
mov byte [rbp + 0x75], al
movzx eax, r10b
xor al, byte [0x18004f8b6]
mov byte [rbp + 0x76], al
movzx eax, cl
xor al, byte [0x18004f8b7]
mov byte [rbp + 0x77], al
movzx eax, dil
xor al, byte [0x18004f8b8]
mov byte [rbp + 0x78], al
movzx eax, bl
xor al, byte [0x18004f8b9]
mov byte [rbp + 0x79], al
movzx eax, r11b
xor al, byte [0x18004f8ba]
mov byte [rbp + 0x7a], al
movzx eax, r9b
xor al, byte [0x18004f8bb]
mov byte [rbp + 0x7b], al
movzx eax, r8b
xor al, byte [0x18004f8bc]
mov byte [rbp + 0x7c], al
movzx eax, dl
xor al, byte [0x18004f8bd]
mov byte [rbp + 0x7d], al
movzx eax, r10b
xor al, byte [0x18004f8be]
mov byte [rbp + 0x7e], al
movzx eax, cl
xor al, byte [0x18004f8bf]
mov byte [rbp + 0x7f], al
movzx eax, dil
xor al, byte [0x18004f8c0]
mov byte [rbp + 0x80], al
movzx eax, bl
xor al, byte [0x18004f8c1]
xor dil, byte [0x18004f8c8]
xor bl, byte [0x18004f8c9]
mov byte [rbp + 0x81], al
movzx eax, r11b
xor al, byte [0x18004f8c2]
xor r11b, byte [0x18004f8ca]
mov byte [rbp + 0x82], al
movzx eax, r9b
xor al, byte [0x18004f8c3]
xor r9b, byte [0x18004f8cb]
mov byte [rbp + 0x83], al
movzx eax, r8b
xor al, byte [0x18004f8c4]
xor r8b, byte [0x18004f8cc]
mov byte [rbp + 0x84], al
movzx eax, dl
xor al, byte [0x18004f8c5]
xor dl, byte [0x18004f8cd]
mov byte [rbp + 0x85], al
movzx eax, r10b
xor al, byte [0x18004f8c6]
xor r10b, byte [0x18004f8ce]
mov byte [rbp + 0x86], al
movzx eax, cl
xor al, byte [0x18004f8c7]
xor cl, byte [0x18004f8cf]
mov byte [rbp + 0x87], al
lea rax, [rbp + 0x70]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x58]
mov byte [rbp + 0x8f], cl
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x48], rax
mov byte [rbp + 0x88], dil
mov byte [rbp + 0x89], bl
mov byte [rbp + 0x8a], r11b
mov byte [rbp + 0x8b], r9b
mov byte [rbp + 0x8c], r8b
mov byte [rbp + 0x8d], dl
mov byte [rbp + 0x8e], r10b
mov qword [rsp + 0x34], 0x80
call fcn.18004be20
mov rdx, qword [rsp + 0x28]
lea rcx, [rsp + 0x30]
mov r9d, r13d
mov r8, rsi
call fcn.18004bc10
mov rsi, qword [rsp + 0x220]
mov rbx, qword [rsp + 0x228]
mov eax, eax
test r15, r15
je 0x18004ada4
add rax, r12
mov qword [r15], rax
jmp 0x18004ada4
test r15, r15
je 0x18004ada4
mov qword [r9], 0
mov rcx, qword [rbp + 0x118]
xor rcx, rsp
call fcn.18004c400
add rsp, 0x230
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret