Function at 0x140186b10
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x17]
sub rsp, 0xb0
xor r14d, r14d
lea rsi, [rcx - 1]
mov dword [r9], r14d
mov r13, rdx
mov word [rdx], r14w
mov r8d, 0x30
lea rdx, [rbp - 0x19]
mov rcx, rsi
mov r12, r9
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140186ec2
mov r8d, dword [rbp + 0x7f]
mov rdx, qword [rbp + 0x77]
mov rcx, qword [rbp - 0x11]
call sub.VCRUNTIME140D.dll___vcrt_GetModuleFileNameW
test eax, eax
je 0x140186ec2
mov rcx, qword [rbp - 0x11]
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140186ec2
movsxd rax, dword [rcx + 0x3c]
test eax, eax
jle 0x140186ec2
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140186ec2
movzx edx, word [rax + 0x14]
sub esi, ecx
movzx r8d, word [rax + 6]
add rdx, rax
mov edi, r14d
mov ebx, r14d
test r8d, r8d
je 0x140186bdf
nop word [rax + rax]
mov eax, ebx
lea rcx, [rax + rax*4]
mov eax, dword [rdx + rcx*8 + 0x24]
cmp esi, eax
jb 0x140186bd8
mov edi, esi
sub edi, eax
cmp esi, dword [rdx + rcx*8 + 0x20]
jb 0x140186bdf
inc ebx
cmp ebx, r8d
jb 0x140186bc0
cmp ebx, r8d
je 0x140186ec2
inc ebx
cmp byte [0x1401e7dc9], r14b
jne 0x140186c1e
cmp qword [0x1401e7dc0], r14
jne 0x140186ec2
call fcn.1401865f0
mov qword [0x1401e7dc0], rax
test rax, rax
je 0x140186ec2
mov byte [0x1401e7dc9], 1
jmp 0x140186c25
mov rax, qword [0x1401e7dc0]
lea rdx, str.PDBOpenValidate5
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140186ec2
lea rcx, [rbp - 0x31]
xor r9d, r9d
mov qword [rsp + 0x38], rcx
xor r8d, r8d
mov qword [rsp + 0x30], r14
lea rcx, [rbp - 0x21]
mov qword [rsp + 0x28], r14
xor edx, edx
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbp + 0x77]
call qword [0x14018fb10]
test eax, eax
je 0x140186ec2
mov rcx, qword [rbp - 0x31]
mov rsi, r14
mov qword [rbp - 0x49], r14
mov rax, qword [rcx]
mov rax, qword [rax]
call qword [0x14018fb10]
cmp eax, 0x1329141
jne 0x140186eac
mov rcx, qword [rbp - 0x31]
lea r9, [rbp - 0x29]
lea r8, [0x1401c1b4c]
xor edx, edx
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
call qword [0x14018fb10]
test eax, eax
je 0x140186eac
mov rcx, qword [rbp - 0x29]
lea r9, [rbp - 0x39]
mov qword [rsp + 0x30], r14
mov r8d, edi
mov qword [rsp + 0x28], r14
movzx edx, bx
mov qword [rsp + 0x20], r14
mov rax, qword [rcx]
mov rax, qword [rax + 0x40]
call qword [0x14018fb10]
test eax, eax
je 0x140186e9b
mov rcx, qword [rbp - 0x39]
lea rdx, [rbp - 0x49]
mov rax, qword [rcx]
mov rax, qword [rax + 0xd0]
call qword [0x14018fb10]
test al, al
je 0x140186e87
mov rcx, qword [rbp - 0x49]
test rcx, rcx
je 0x140186e87
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x14018fb10]
test eax, eax
je 0x140186e63
mov rcx, qword [rbp - 0x49]
lea rdx, [rbp + 0x5f]
mov qword [rsp + 0x30], r14
lea r9, [rbp + 0x57]
mov qword [rsp + 0x28], rdx
lea r8, [rbp + 0x6f]
lea rdx, [rbp - 0x41]
mov rax, qword [rcx]
mov qword [rsp + 0x20], rdx
xor edx, edx
mov rax, qword [rax + 0x18]
call qword [0x14018fb10]
test al, al
je 0x140186e77
movzx eax, word [rbp + 0x57]
cmp eax, ebx
jne 0x140186d80
mov ecx, dword [rbp + 0x6f]
cmp ecx, edi
ja 0x140186d80
add ecx, dword [rbp - 0x41]
cmp edi, ecx
jb 0x140186d9a
mov rcx, qword [rbp - 0x49]
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x14018fb10]
test eax, eax
jne 0x140186d30
jmp 0x140186e63
mov eax, dword [rbp + 0x5f]
test eax, eax
je 0x140186e77
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [rbx*8]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x140186e77
mov rcx, qword [rbp - 0x49]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
xor r8d, r8d
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x18]
lea rdx, [rbp + 0x5f]
mov qword [rsp + 0x28], rdx
lea rdx, [rbp - 0x3d]
mov qword [rsp + 0x20], r14
call qword [0x14018fb10]
test al, al
je 0x140186e63
sub edi, dword [rbp + 0x6f]
cmp edi, dword [rsi]
jb 0x140186e63
mov edx, dword [rbp + 0x5f]
mov ebx, 1
mov ecx, ebx
cmp edx, ebx
jbe 0x140186e20
mov eax, ecx
cmp edi, dword [rsi + rax*8]
jb 0x140186e20
inc ecx
cmp ecx, edx
jb 0x140186e13
mov edx, dword [rbp - 0x3d]
lea eax, [rcx - 1]
mov eax, dword [rsi + rax*8 + 4]
lea r9, [rbp + 0x67]
mov rcx, qword [rbp - 0x39]
and eax, 0xffffff
mov dword [r12], eax
mov r8, r13
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov rax, qword [rcx]
mov qword [rsp + 0x20], r14
mov rax, qword [rax + 0xe0]
call qword [0x14018fb10]
test al, al
cmovne r14d, ebx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbp - 0x49]
mov rax, qword [rcx]
mov rax, qword [rax]
call qword [0x14018fb10]
mov rcx, qword [rbp - 0x39]
mov rax, qword [rcx]
mov rax, qword [rax + 0x80]
call qword [0x14018fb10]
mov rcx, qword [rbp - 0x29]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x70]
call qword [0x14018fb10]
mov rcx, qword [rbp - 0x31]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x58]
call qword [0x14018fb10]
mov eax, r14d
jmp 0x140186ec4
xor eax, eax
add rsp, 0xb0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret