Function at 0x140006174
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov eax, 0x5a4d
mov rbp, rcx
cmp word [0x140092ae0], ax
jne 0x140006419
movsxd rsi, dword [0x140092b1c]
lea r14, [0x140092ae0]
add rsi, r14
cmp dword [rsi], 0x4550
jne 0x140006419
mov eax, 0x20b
cmp word [rsi + 0x18], ax
jne 0x140006419
mov ebx, dword [rsi + 0x50]
xor ecx, ecx
mov edx, ebx
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
xor r13d, r13d
mov rdi, rax
test rax, rax
je 0x140006419
movzx ecx, word [rsi + 0x14]
mov r12d, dword [rcx + rsi + 0x24]
mov rcx, rbp
sub ebx, r12d
mov eax, ebx
mov r8d, ebx
mov qword [rsp + 0xa8], rax
call fcn.140002e94
mov r15, rax
mov rcx, rdi
test rax, rax
jne 0x140006233
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140006419
mov r8d, dword [rsi + 0x54]
mov rdx, r14
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rsi + 0x14]
mov r14d, r13d
add rbx, 0x28
cmp r13w, word [rsi + 6]
jae 0x140006288
add rbx, rsi
lea r13, [0x140092ae0]
test dword [rbx + 0x14], 0x80
ja 0x140006278
mov edx, dword [rbx + 4]
mov ecx, dword [rbx - 4]
add rdx, r13
mov r8d, dword [rbx]
add rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
movzx eax, word [rsi + 6]
inc r14d
add rbx, 0x28
cmp r14d, eax
jl 0x14000625b
mov r13, r15
lea rcx, [rsp + 0x30]
sub r15, r12
mov rdx, rdi
mov rbx, r15
sub rbx, qword [rsi + 0x30]
call fcn.140006eec
mov r10, rax
mov r11, qword [rax + 8]
mov rdx, qword [rax]
jmp 0x1400062f1
xor r8d, r8d
cmp dword [rdx + 0x10], r8d
jbe 0x1400062ed
mov rax, qword [rdx + 8]
mov ecx, 0xf000
movzx r9d, word [rax + r8*2]
movzx eax, r9w
and ax, cx
mov ecx, 0xa000
cmp ax, cx
jne 0x1400062e4
mov rax, qword [rdx]
and r9d, 0xfff
add qword [r9 + rax], rbx
inc r8d
cmp r8d, dword [rdx + 0x10]
jb 0x1400062b7
add rdx, 0x18
cmp rdx, r11
jne 0x1400062ae
mov rcx, r10
call fcn.14000667c
mov eax, 0x5a4d
cmp word [rdi], ax
jne 0x140006419
movsxd rax, dword [rdi + 0x3c]
cmp dword [rax + rdi], 0x4550
jne 0x140006419
mov ecx, dword [rax + rdi + 0xd8]
xor ebx, ebx
test ecx, ecx
je 0x140006386
mov r14, qword [rcx + rdi + 0x58]
test r14, r14
je 0x140006386
mov rax, rdi
sub rax, r15
add r14, rax
movabs rax, 0x2b992ddfa232
cmp qword [r14], rax
jne 0x140006419
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
movabs rdx, 0x2b992ddfa232
xor rcx, rbx
movabs rax, 0x2b992ddfa233
xor rcx, rdx
cmp rcx, rdx
cmove rcx, rax
xor ebx, ebx
mov qword [r14], rcx
mov rdx, rdi
lea rcx, [rsp + 0x30]
call fcn.140007010
mov rdx, rax
mov rcx, rbp
call fcn.140006434
test al, al
je 0x1400063fd
mov r9, qword [rsp + 0xa8]
lea r8, [r12 + rdi]
mov rdx, r13
mov rcx, rbp
call fcn.140002c84
test al, al
je 0x1400063fd
mov r8d, dword [rsi + 0x28]
lea rdx, [rsp + 0xb0]
add r8, r15
mov dword [rsp + 0xb0], ebx
xor r9d, r9d
mov qword [rsp + 0x20], rbx
mov rcx, rbp
call fcn.140006738
test al, al
je 0x1400063fd
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r13
jmp 0x14000641b
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, r13
mov rcx, rbp
call fcn.140002fd0
xor eax, eax
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret