Function at 0x140006390
Capabilities:
Parse pe header

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x100]
sub rsp, 0x200
mov rax, qword [0x140023010]
xor rax, rsp
mov qword [rbp + 0xf0], rax
mov r12, r8
mov r15, rdx
test rdx, rdx
je 0x140006584
xorps xmm0, xmm0
lea rcx, [rbp - 0x20]
xor edx, edx
mov r8d, 0x108
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x30], xmm0
call sub.VCRUNTIME140.dll_memset
xor r14d, r14d
lea rax, [rbp - 0x60]
mov rsi, r15
mov ebx, r14d
sub rsi, rax
nop word [rax + rax]
mov rcx, qword [0x140023bf0]
lea rdi, [rbp - 0x60]
mov qword [rsp + 0x38], r14
lea r8, [rsp + 0x68]
xorps xmm0, xmm0
mov qword [rsp + 0x30], r14
add rdi, rbx
mov dword [rsp + 0x28], 0x30
mov r9d, 0x30
mov qword [rsp + 0x68], r14
mov edx, 0x80002048
mov qword [rsp + 0x78], r14
movdqu xmmword [rbp - 0x7c], xmm0
lea rax, [rdi + rsi]
mov dword [rbp - 0x6c], r14d
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x80], 1
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140006584
movzx eax, byte [rbp - 0x7c]
inc rbx
mov byte [rdi], al
cmp rbx, 0x40
jb 0x140006400
mov eax, 0x5a4d
cmp word [rbp - 0x60], ax
jne 0x140006584
movsxd rsi, dword [rbp - 0x24]
lea rax, [rbp - 0x20]
add rsi, r15
mov rbx, r14
sub rsi, rax
nop dword [rax]
mov rcx, qword [0x140023bf0]
lea rdi, [rbp - 0x20]
mov qword [rsp + 0x38], r14
lea r8, [rsp + 0x68]
xorps xmm0, xmm0
mov qword [rsp + 0x30], r14
add rdi, rbx
mov dword [rsp + 0x28], 0x30
mov r9d, 0x30
mov qword [rsp + 0x68], r14
mov edx, 0x80002048
mov qword [rsp + 0x78], r14
movdqu xmmword [rbp - 0x7c], xmm0
lea rax, [rdi + rsi]
mov dword [rbp - 0x6c], r14d
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x80], 1
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140006584
movzx eax, byte [rbp - 0x7c]
inc rbx
mov byte [rdi], al
cmp rbx, 0x108
jb 0x1400064a0
cmp dword [rbp - 0x20], 0x4550
jne 0x140006584
mov ebx, dword [rbp + 0x68]
test ebx, ebx
je 0x140006584
mov eax, dword [rbp + 0x6c]
test eax, eax
je 0x140006584
mov r9d, 4
mov qword [rsp + 0x60], rax
mov r8d, 0x3000
mov edx, eax
xor ecx, ecx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r9d, esi
mov qword [rsp + 0x58], rbx
mov rdi, rax
lea rax, [rbx + r15]
mov rdx, rax
mov qword [rsp + 0x50], rax
mov r8, rdi
call fcn.140005d30
test al, al
jne 0x14000658b
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x14000669b
mov eax, dword [rdi + 0x24]
mov r14, rdi
sub r14, rbx
mov qword [rsp + 0x240], r13
mov r13d, dword [rdi + 0x20]
add rax, r14
mov qword [rsp + 0x40], rax
add r13, r14
mov eax, dword [rdi + 0x1c]
add rax, r14
mov qword [rsp + 0x48], rax
xor eax, eax
mov ebx, eax
cmp dword [rdi + 0x18], eax
jbe 0x140006680
nop dword [rax]
nop word [rax + rax]
mov esi, ebx
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], 0xf
mov edx, dword [r13 + rsi*4]
add rdx, r14
inc r8
cmp byte [rdx + r8], 0
jne 0x1400065f3
lea rcx, [rsp + 0x68]
call fcn.140009ff0
cmp qword [r12 + 0x18], 0x10
mov rdx, r12
jb 0x140006616
mov rdx, qword [r12]
cmp qword [rbp - 0x80], 0x10
lea rcx, [rsp + 0x68]
cmovae rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x1400066bc
mov rdx, qword [rbp - 0x80]
cmp rdx, 0x10
jb 0x140006670
mov rcx, qword [rsp + 0x68]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000666b
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140006738
call fcn.140013870
inc ebx
mov eax, 0
cmp ebx, dword [rdi + 0x18]
jb 0x1400065d0
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov r13, qword [rsp + 0x240]
mov rcx, qword [rbp + 0xf0]
xor rcx, rsp
call fcn.140013850
add rsp, 0x200
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
movzx eax, word [rax + rsi*2]
mov ecx, dword [rcx + rax*4]
cmp ecx, 0x1000
jbe 0x140006703
lea rbx, [r15 + rcx]
cmp rbx, qword [rsp + 0x50]
jb 0x14000673f
mov rax, qword [rsp + 0x58]
add rax, qword [rsp + 0x60]
add rax, r15
cmp rbx, rax
ja 0x14000673f
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov rdx, qword [rbp - 0x80]
cmp rdx, 0x10
jb 0x140006757
mov rcx, qword [rsp + 0x68]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006752
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140006752
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140006705
call fcn.140013870
mov rax, rbx
jmp 0x140006693