Function at 0x140001aec
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xf8
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x58], 0
mov edx, 0x40
mov rcx, qword [rsp + 0x108]
call fcn.140004150
test eax, eax
jne 0x140001b42
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140001b70
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
add rax, 0x108
mov rdx, rax
mov rcx, qword [rsp + 0x108]
call fcn.140004150
test eax, eax
jne 0x140001b9a
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x100]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
cmp dword [rax], 0x4550
je 0x140001bd5
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x40]
movzx eax, word [rax + 4]
cmp eax, 0x8664
je 0x140001bf7
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x38]
and eax, 1
test eax, eax
je 0x140001c18
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x40]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x40]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x38]
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x48], 0
jmp 0x140001c62
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
mov rax, qword [rsp + 0x50]
add rax, 0x28
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x40]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x48], eax
jae 0x140001cd7
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x10], 0
jne 0x140001c96
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0xc]
add rax, qword [rsp + 0xa8]
mov qword [rsp + 0x80], rax
jmp 0x140001cb0
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x50]
add eax, dword [rcx + 0x10]
mov eax, eax
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x88]
cmp qword [rsp + 0x80], rax
jbe 0x140001cd2
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x88], rax
jmp 0x140001c4a
lea rcx, [rsp + 0xb8]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [rsp + 0xbc]
mov rcx, qword [rsp + 0x40]
mov ecx, dword [rcx + 0x50]
mov edx, eax
call fcn.140004fcc
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0xbc]
mov edx, eax
mov rcx, qword [rsp + 0x88]
call fcn.140004fcc
cmp qword [rsp + 0x68], rax
je 0x140001d2f
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0x20], rax
mov r9d, 4
mov r8d, 0x3000
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax + 0x30]
call qword [rsp + 0x110]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x140001db0
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0x20], rax
mov r9d, 4
mov r8d, 0x3000
mov rdx, qword [rsp + 0x68]
xor ecx, ecx
call qword [rsp + 0x110]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x140001db0
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x38]
shr rax, 0x20
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x38]
add rdx, rcx
mov rcx, rdx
shr rcx, 0x20
cmp rax, rcx
jae 0x140001ecf
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0x10
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x140001e45
mov r9, qword [rsp + 0x138]
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [rsp + 0x118]
mov r8, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x58]
call fcn.1400031d0
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
mov qword [rax], rcx
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x38]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x138]
mov qword [rsp + 0x20], rax
mov r9d, 4
mov r8d, 0x3000
mov rdx, qword [rsp + 0x68]
xor ecx, ecx
call qword [rsp + 0x110]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x140001eca
mov r8, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x58]
call fcn.1400031d0
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
jmp 0x140001db0
xor r8d, r8d
xor edx, edx
mov ecx, 0x40000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [rsp + 0x90], rax
mov r8d, 0x80
mov edx, 8
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x90]
mov qword [rax + 0x78], rcx
cmp qword [rsp + 0x30], 0
jne 0x140001f66
mov r9, qword [rsp + 0x138]
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [rsp + 0x118]
mov r8, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x58]
call fcn.1400031d0
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140002247
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x40]
movzx eax, word [rax + 0x16]
and eax, 0x2000
test eax, eax
je 0x140001f90
mov dword [rsp + 0x60], 1
jmp 0x140001f98
mov dword [rsp + 0x60], 0
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 0x60]
mov dword [rax + 0x20], ecx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x110]
mov qword [rax + 0x28], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x118]
mov qword [rax + 0x30], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x120]
mov qword [rax + 0x38], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x128]
mov qword [rax + 0x40], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x130]
mov qword [rax + 0x48], rcx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x138]
mov qword [rax + 0x58], rcx
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 0xbc]
mov dword [rax + 0x68], ecx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x58]
mov qword [rax + 0x70], rcx
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x54]
mov edx, eax
mov rcx, qword [rsp + 0x108]
call fcn.140004150
test eax, eax
jne 0x140002047
jmp 0x14000223b
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x54]
mov rcx, qword [rsp + 0x138]
mov qword [rsp + 0x20], rcx
mov r9d, 4
mov r8d, 0x1000
mov edx, eax
mov rcx, qword [rsp + 0x38]
call qword [rsp + 0x110]
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x40]
mov r8d, dword [rax + 0x54]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x98]
call fcn.140003508
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x98]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x30]
mov qword [rcx], rax
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x38]
mov qword [rax + 0x30], rcx
mov r9, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x108]
mov rcx, qword [rsp + 0x100]
call fcn.140003724
test eax, eax
jne 0x1400020f1
jmp 0x14000223b
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx + 0x30]
mov rax, qword [rax + 0x30]
sub rax, rcx
mov qword [rsp + 0xa0], rax
cmp qword [rsp + 0xa0], 0
je 0x140002138
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x30]
call section..text
mov rcx, qword [rsp + 0x30]
mov dword [rcx + 0x24], eax
jmp 0x140002144
mov rax, qword [rsp + 0x30]
mov dword [rax + 0x24], 1
mov rcx, qword [rsp + 0x30]
call fcn.1400045c8
test eax, eax
jne 0x140002157
jmp 0x14000223b
mov rcx, qword [rsp + 0x30]
call fcn.140005ec0
test eax, eax
jne 0x14000216a
jmp 0x14000223b
mov rcx, qword [rsp + 0x30]
call fcn.14000287c
test eax, eax
jne 0x14000217d
jmp 0x14000223b
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
cmp dword [rax + 0x28], 0
je 0x140002227
mov rax, qword [rsp + 0x30]
cmp dword [rax + 0x20], 0
je 0x140002206
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xb0], rax
mov dword [rsp + 0x64], 1
movzx eax, byte [rsp + 0x140]
test eax, eax
jne 0x1400021e4
xor r8d, r8d
mov edx, 1
mov rcx, qword [rsp + 0x38]
call qword [rsp + 0xb0]
mov dword [rsp + 0x64], eax
cmp dword [rsp + 0x64], 0
jne 0x1400021f8
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14000223b
mov rax, qword [rsp + 0x30]
mov dword [rax + 0x1c], 1
jmp 0x140002225
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x30]
mov qword [rcx + 0x60], rax
jmp 0x140002234
mov rax, qword [rsp + 0x30]
mov qword [rax + 0x60], 0
mov rax, qword [rsp + 0x30]
jmp 0x140002247
mov rcx, qword [rsp + 0x30]
call fcn.1400017b4
xor eax, eax
add rsp, 0xf8
ret