Function at 0x14004a650
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x140068040]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x48], r9
mov r14, rcx
mov eax, 0x5a4d
cmp word [0x1400684a0], ax
jne 0x14004a8d9
movsxd rdi, dword [0x1400684dc]
lea rax, [0x1400684a0]
add rdi, rax
cmp dword [rdi], 0x4550
jne 0x14004a8d9
mov eax, 0x20b
cmp word [rdi + 0x18], ax
jne 0x14004a8d9
mov ebx, dword [rdi + 0x50]
mov edx, ebx
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x14004a8d9
movzx ecx, word [rdi + 0x14]
mov r15d, dword [rcx + rdi + 0x24]
sub ebx, r15d
xor esi, esi
mov qword [rsp + 0x50], rsi
mov r13d, ebx
mov qword [rsp + 0x40], r13
lea r8, [rsp + 0x50]
mov edx, ebx
mov rcx, r14
call fcn.14004a240
mov r12, rax
mov rcx, rbp
test rax, rax
jne 0x14004a732
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x14004a8d9
mov r8d, dword [rdi + 0x54]
lea rdx, [0x1400684a0]
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rdi + 0x14]
add rbx, 0x28
xor eax, eax
cmp ax, word [rdi + 6]
jae 0x14004a790
add rbx, rdi
lea r13, [0x1400684a0]
nop dword [rax]
test dword [rbx + 0x14], 0x80
ja 0x14004a77d
mov r8d, dword [rbx]
mov edx, dword [rbx + 4]
add rdx, r13
mov ecx, dword [rbx - 4]
add rcx, rbp
call sub.VCRUNTIME140.dll_memcpy
inc esi
add rbx, 0x28
movzx eax, word [rdi + 6]
cmp esi, eax
jl 0x14004a760
mov r13, qword [rsp + 0x40]
mov rsi, r12
sub r12, r15
mov rbx, r12
sub rbx, qword [rdi + 0x30]
mov rdx, rbp
lea rcx, [rsp + 0x58]
call fcn.14004b630
mov rdx, rbx
mov rcx, rax
call fcn.14004a910
mov rdx, r12
mov rcx, rbp
call fcn.14004aa10
test al, al
je 0x14004a8d9
mov rdx, rbp
lea rcx, [rsp + 0x58]
call fcn.14004b780
mov rdx, rax
mov rcx, r14
call fcn.14004aac0
mov rbx, qword [rsp + 0x50]
test al, al
je 0x14004a89c
lea rax, [r15 + rbp]
test rax, rax
je 0x14004a89c
test r13, r13
je 0x14004a89c
xor r15d, r15d
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x58], 0x33
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], r13
mov dword [rsp + 0x50], r15d
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
lea r9d, [r15 + 0x28]
lea r8, [rsp + 0x58]
mov edx, 0x80862007
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x14004a89c
mov r8d, dword [rdi + 0x28]
add r8, r12
mov dword [rsp + 0x50], r15d
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9, rbx
lea rdx, [rsp + 0x50]
mov rcx, r14
call fcn.14004add0
test al, al
je 0x14004a89c
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, rsi
jmp 0x14004a8db
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r8, rbx
mov rdx, rsi
mov rcx, r14
call fcn.140045c70
test al, al
je 0x14004a8d9
mov rdx, rbx
mov rcx, r14
call fcn.140045da0
test al, al
je 0x14004a8d9
mov rdx, rbx
mov rcx, r14
call fcn.140045ed0
xor eax, eax
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14004ce30
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret