Function at 0x1400581c4
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov rax, qword [0x140148f00]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rbx, rdx
mov r14, rcx
mov qword [rbp - 0x39], rcx
mov qword [rbp - 0x21], rdx
mov rcx, qword [rdx]
mov eax, 0x5a4d
xor r13d, r13d
cmp word [rcx], ax
jne 0x140058477
movsxd rdi, dword [rcx + 0x3c]
add rdi, rcx
cmp dword [rdi], 0x4550
jne 0x140058477
test rdi, rdi
je 0x140058477
mov eax, 0x20b
cmp word [rdi + 0x18], ax
jne 0x140058477
mov esi, dword [rdi + 0x50]
mov qword [rbp - 0x31], rsi
lea r9d, [r13 + 4]
mov r8d, 0x3000
mov edx, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
mov r8d, esi
mov rcx, r14
call fcn.140056898
mov rsi, rax
test rax, rax
je 0x14005844c
lea rax, [rdi + 0x54]
mov qword [rbp - 0x29], rax
mov r8d, dword [rax]
mov rdx, qword [rbx]
mov rcx, r15
call sub.VCRUNTIME140.dll_memcpy
movzx r12d, word [rdi + 0x14]
add r12, 0x28
lea rax, [rdi + 6]
xor ecx, ecx
cmp cx, word [rax]
jae 0x1400582ce
add r12, rdi
mov r14, rax
mov ecx, dword [r12 - 4]
add rcx, r15
mov r8d, dword [r12]
mov edx, dword [r12 + 4]
add rdx, qword [rbx]
call sub.VCRUNTIME140.dll_memcpy
inc r13d
lea r12, [r12 + 0x28]
movzx eax, word [r14]
cmp r13d, eax
jl 0x1400582a0
mov r14, qword [rbp - 0x39]
mov r12, rsi
sub r12, qword [rdi + 0x30]
mov rdx, r15
lea rcx, [rbp - 0x11]
call fcn.140063d1c
mov r10, rax
mov r11, qword [rax + 8]
mov rdx, qword [rax]
xor r13d, r13d
cmp rdx, r11
je 0x140058339
mov r8d, r13d
cmp dword [rdx + 0x10], r13d
jbe 0x140058333
mov ecx, r8d
mov rax, qword [rdx + 8]
movzx r9d, word [rax + rcx*2]
movzx eax, r9w
shr ax, 0xc
mov ecx, 0xfff
and r9w, cx
cmp ax, 0xa
jne 0x14005832a
movzx ecx, r9w
mov rax, qword [rdx]
add qword [rcx + rax], r12
inc r8d
cmp r8d, dword [rdx + 0x10]
jb 0x1400582fc
add rdx, 0x18
jmp 0x1400582ee
mov rcx, r10
call fcn.140058644
mov rdx, r15
lea rcx, [rbp - 0x11]
call fcn.140063e80
mov rdx, rax
mov rcx, r14
call fcn.1400584e0
test al, al
je 0x14005844c
mov r9, qword [rbp - 0x31]
mov r8, r15
mov rdx, rsi
mov rcx, r14
call fcn.140056680
test al, al
je 0x14005844c
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r8d, dword [rdi + 0x28]
add r8, rsi
mov dword [rbp - 0x19], r13d
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140058700
test al, al
je 0x14005844c
mov rax, qword [rbp - 0x29]
mov eax, dword [rax]
test rax, rax
je 0x140058403
mov qword [rbp - 9], r13
and qword [rbp - 1], 0
mov qword [rbp - 0x11], 0x30
mov qword [rbp + 7], rsi
mov qword [rbp + 0xf], rax
mov dword [rbp - 0x19], r13d
mov qword [rsp + 0x38], r13
lea rax, [rbp - 0x19]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
mov r9d, 0x28
lea r8, [rbp - 0x11]
mov edx, 0x80862007
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
nop
mov rcx, qword [rbx]
test rcx, rcx
je 0x140058447
mov rdx, qword [rbx + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x140058437
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400584d8
mov rcx, r8
call fcn.14010a9a0
mov qword [rbx], r13
mov qword [rbx + 8], r13
mov qword [rbx + 0x10], r13
mov rax, rsi
jmp 0x1400584b1
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, rsi
mov rcx, r14
call fcn.1400569fc
nop
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400584af
mov rdx, qword [rbx + 0x10]
jmp 0x14005847b
mov rdx, qword [rdx + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x14005849f
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400584d8
mov rcx, r8
call fcn.14010a9a0
mov qword [rbx], r13
mov qword [rbx + 8], r13
mov qword [rbx + 0x10], r13
xor eax, eax
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.14010a620
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3