Function at 0x180001b00
Capabilities:
Parse pe header

Disassembly:
push rbx
push r12
push r13
sub rsp, 0x50
mov r12, rcx
lea rcx, str.Kernel32.dll
mov r13, rdx
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.GetNativeSystemInfo
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r11, rax
cmp r13, 0x40
jae 0x180001b4f
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x50
pop r13
pop r12
pop rbx
ret
mov eax, 0x5a4d
cmp word [r12], ax
je 0x180001b72
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x50
pop r13
pop r12
pop rbx
ret
movsxd rcx, dword [r12 + 0x3c]
lea rax, [rcx + 0x108]
cmp r13, rax
jb 0x180001b38
cmp dword [rcx + r12], 0x4550
mov qword [rsp + 0x80], rdi
lea rdi, [rcx + r12]
jne 0x180001bab
mov eax, 0x8664
cmp word [rdi + 4], ax
jne 0x180001bab
mov eax, dword [rdi + 0x38]
test al, 1
je 0x180001bca
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, qword [rsp + 0x80]
xor eax, eax
add rsp, 0x50
pop r13
pop r12
pop rbx
ret
movzx ecx, word [rdi + 0x14]
mov r9, rax
movzx eax, word [rdi + 6]
mov qword [rsp + 0x78], rsi
test eax, eax
je 0x180001c09
lea rdx, [rcx + rdi + 0x24]
mov r8, rax
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x180001bf4
mov eax, dword [rdx]
add rax, r9
jmp 0x180001bf8
mov eax, dword [rdx]
add eax, ecx
cmp rax, rbx
cmova rbx, rax
add rdx, 0x28
sub r8, 1
jne 0x180001be6
lea rcx, [rsp + 0x20]
call r11
mov r11d, dword [rsp + 0x24]
mov eax, dword [rdi + 0x50]
lea rsi, [rax + r11 - 1]
lea rax, [r11 - 1]
lea rcx, [r11 + rbx - 1]
not rax
and rsi, rax
lea rax, [r11 - 1]
not rax
and rcx, rax
cmp rsi, rcx
je 0x180001c4e
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x180001d53
mov rcx, qword [rdi + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rsi
mov qword [rsp + 0x70], rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x180001c91
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x180001cc2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
lea r8d, [rdx + 0x68]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x180001ccf
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x180001d4c
mov qword [rax + 8], rbp
movzx eax, word [rdi + 0x16]
mov qword [rbx + 0x58], 0
shr eax, 0xd
and eax, 1
mov dword [rbx + 0x20], eax
lea rax, [0x180001a80]
mov qword [rbx + 0x28], rax
lea rax, [0x180001aa0]
mov qword [rbx + 0x38], rax
lea rax, [0x180001a90]
mov qword [rbx + 0x30], rax
lea rax, [0x180001ad0]
mov qword [rbx + 0x40], rax
lea rax, [0x180001ae0]
mov qword [rbx + 0x48], rax
lea rax, [0x180001af0]
mov qword [rbx + 0x50], rax
mov eax, dword [rsp + 0x24]
mov dword [rbx + 0x68], eax
mov edx, dword [rdi + 0x54]
cmp r13, rdx
jae 0x180001d6a
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rbx
call fcn.180002020
xor eax, eax
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x80]
add rsp, 0x50
pop r13
pop r12
pop rbx
ret
mov r9d, 4
mov r8d, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rdi + 0x54]
mov rdx, rax
test r8, r8
je 0x180001da2
mov r9, r12
sub r9, rax
movzx ecx, byte [r9 + rdx]
inc rdx
sub r8, 1
mov byte [rdx - 1], cl
jne 0x180001d91
movsxd rcx, dword [r12 + 0x3c]
mov r9, rbx
mov r8, rdi
add rcx, rax
mov rdx, r13
mov qword [rbx], rcx
mov qword [rcx + 0x30], rbp
mov rcx, r12
call fcn.180001420
test eax, eax
je 0x180001d44
mov rax, qword [rbx]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rdi + 0x30]
je 0x180001de4
mov rcx, rbx
call fcn.1800017c0
mov dword [rbx + 0x24], eax
jmp 0x180001deb
mov dword [rbx + 0x24], 1
mov rcx, rbx
call fcn.180001890
test eax, eax
je 0x180001d44
mov rcx, rbx
call fcn.180001560
test eax, eax
je 0x180001d44
mov rax, qword [rbx]
mov rsi, qword [rbx + 8]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x180001e49
mov rdi, qword [rcx + rsi + 0x18]
test rdi, rdi
je 0x180001e49
mov rax, qword [rdi]
test rax, rax
je 0x180001e49
nop
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
mov rax, qword [rdi + 8]
add rdi, 8
test rax, rax
jne 0x180001e30
mov rax, qword [rbx]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x180001e9e
cmp dword [rbx + 0x20], 0
je 0x180001e8d
xor r8d, r8d
lea rax, [rbp + rcx]
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x180001e7e
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x180001d44
mov dword [rbx + 0x1c], 1
mov rax, rbx
jmp 0x180001d4e
lea rax, [rbp + rcx]
mov qword [rbx + 0x60], rax
mov rax, rbx
jmp 0x180001d4e
mov qword [rbx + 0x60], 0
mov rax, rbx
jmp 0x180001d4e