Function at 0x18005c150
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 [0x1800a6478]
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 0x18005c8b8
test rdx, rdx
je 0x18005c8b8
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 0x18005c1ca
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 fcn.18005f000
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 0x18005c230
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.18005d2f0
mov byte [rbp + rbx + 0x40], al
inc rbx
cmp rbx, 8
jl 0x18005c5e0
cmp rdi, 0x10
lea rcx, [rbp + 0x70]
lea rdx, [rbp + 0x58]
cmovae rcx, rsi
lea rax, [rcx + 0xf]
cmp rdx, rax
ja 0x18005c627
lea rax, [rbp + 0x67]
cmp rax, rcx
jb 0x18005c627
movups xmm0, xmmword [rcx]
movups xmmword [rbp + 0x58], xmm0
jmp 0x18005c62e
movups xmm0, xmmword [rcx]
movups xmmword [rbp + 0x58], xmm0
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, pe_nt_image_headers64
call fcn.18005f6a0
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.18005d8e0
mov r9d, 8
lea rdx, [rbp + 0x40]
mov r8, r12
lea rcx, [rsp + 0x30]
call fcn.18005d6d0
mov r12d, eax
movzx edi, byte [rbp + 0x40]
mov rbx, qword [rbp + 0x41]
movzx eax, dil
xor al, byte [0x18008e310]
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 [0x18008e312]
mov rsi, qword [rsp + 0x20]
mov byte [rbp + 0x72], al
add rsi, r12
movzx eax, r9b
xor al, byte [0x18008e313]
mov byte [rbp + 0x73], al
movzx eax, r8b
xor al, byte [0x18008e314]
mov byte [rbp + 0x74], al
movzx eax, dl
xor al, byte [0x18008e315]
mov byte [rbp + 0x75], al
movzx eax, r10b
xor al, byte [0x18008e316]
mov byte [rbp + 0x76], al
movzx eax, cl
xor al, byte [0x18008e317]
mov byte [rbp + 0x77], al
movzx eax, dil
xor al, byte [0x18008e318]
mov byte [rbp + 0x78], al
movzx eax, bl
xor al, byte [0x18008e319]
mov byte [rbp + 0x79], al
movzx eax, r11b
xor al, byte [0x18008e31a]
mov byte [rbp + 0x7a], al
movzx eax, r9b
xor al, byte [0x18008e31b]
mov byte [rbp + 0x7b], al
movzx eax, r8b
xor al, byte [0x18008e31c]
mov byte [rbp + 0x7c], al
movzx eax, dl
xor al, byte [0x18008e31d]
mov byte [rbp + 0x7d], al
movzx eax, r10b
xor al, byte [0x18008e31e]
mov byte [rbp + 0x7e], al
movzx eax, cl
xor al, byte [0x18008e31f]
mov byte [rbp + 0x7f], al
movzx eax, dil
xor al, byte [0x18008e320]
mov byte [rbp + 0x80], al
movzx eax, bl
xor al, byte [0x18008e321]
xor dil, byte [0x18008e328]
xor bl, byte [0x18008e329]
mov byte [rbp + 0x81], al
movzx eax, r11b
xor al, byte [0x18008e322]
xor r11b, byte [0x18008e32a]
mov byte [rbp + 0x82], al
movzx eax, r9b
xor al, byte [0x18008e323]
xor r9b, byte [0x18008e32b]
mov byte [rbp + 0x83], al
movzx eax, r8b
xor al, byte [0x18008e324]
xor r8b, byte [0x18008e32c]
mov byte [rbp + 0x84], al
movzx eax, dl
xor al, byte [0x18008e325]
xor dl, byte [0x18008e32d]
mov byte [rbp + 0x85], al
movzx eax, r10b
xor al, byte [0x18008e326]
xor r10b, byte [0x18008e32e]
mov byte [rbp + 0x86], al
movzx eax, cl
xor al, byte [0x18008e327]
xor cl, byte [0x18008e32f]
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.18005d8e0
mov rdx, qword [rsp + 0x28]
lea rcx, [rsp + 0x30]
mov r9d, r13d
mov r8, rsi
call fcn.18005d6d0
mov rsi, qword [rsp + 0x220]
mov rbx, qword [rsp + 0x228]
mov eax, eax
test r15, r15
je 0x18005c8c4
add rax, r12
mov qword [r15], rax
jmp 0x18005c8c4
test r15, r15
je 0x18005c8c4
mov qword [r9], 0
mov rcx, qword [rbp + 0x118]
xor rcx, rsp
call fcn.180057710
add rsp, 0x230
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret