Function at 0x10001640
Capabilities:
Enumerate pe sections
Get system information on windows
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0xe8
mov eax, dword [rsp + 0xf8]
mov rcx, qword [rsp + 0xf0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x48]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x40], rax
jbe 0x100016b2
xor eax, eax
jmp 0x10001a1d
mov rax, qword [rsp + 0x40]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x40]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x40]
movzx ecx, word [rcx + 6]
imul rcx, rcx, 0x28
add rax, rcx
mov dword [rsp + 0x68], eax
lea rcx, [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x8c]
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x100]
mov rcx, rax
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
jne 0x10001731
xor eax, eax
jmp 0x10001a1d
mov eax, dword [rsp + 0x100]
mov r8, rax
xor edx, edx
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll_memset
mov word [rsp + 0xc0], 0
jmp 0x10001769
movzx eax, word [rsp + 0xc0]
inc ax
mov word [rsp + 0xc0], ax
movzx eax, word [rsp + 0xc0]
mov rcx, qword [rsp + 0x40]
movzx ecx, word [rcx + 6]
cmp eax, ecx
jg 0x1000191d
movzx eax, word [rsp + 0xc0]
mov rcx, qword [rsp + 0x40]
movzx ecx, word [rcx + 6]
cmp eax, ecx
jne 0x100017b6
mov qword [rsp + 0xb8], 0
mov eax, dword [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x24], 0x60000000
jmp 0x10001806
movzx eax, word [rsp + 0xc0]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx + rax + 0xc]
mov qword [rsp + 0xb8], rax
movzx eax, word [rsp + 0xc0]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx + rax + 0x10]
mov qword [rsp + 0x28], rax
movzx eax, word [rsp + 0xc0]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx + rax + 0x24]
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0xb8]
lea rax, [rax + rcx - 1]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x60]
mov qword [rsp + 0xc8], rax
xor edx, edx
mov rax, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0xc8]
div rcx
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x60]
mov qword [rsp + 0xd0], rax
xor edx, edx
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0xd0]
div rcx
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x20]
mov dword [rsp + 0x78], eax
jmp 0x10001878
mov eax, dword [rsp + 0x78]
inc eax
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x78], eax
ja 0x10001918
mov eax, dword [rsp + 0x24]
and eax, 0x20000000
test eax, eax
je 0x100018b5
mov eax, dword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
movzx eax, byte [rcx + rax]
or eax, 1
mov ecx, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x24]
and eax, 0x40000000
test eax, eax
je 0x100018e4
mov eax, dword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
movzx eax, byte [rcx + rax]
or eax, 2
mov ecx, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x24]
and eax, 0x80000000
test eax, eax
je 0x10001913
mov eax, dword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
movzx eax, byte [rcx + rax]
or eax, 4
mov ecx, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
mov byte [rdx + rcx], al
jmp 0x1000186e
jmp 0x10001756
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x78], 0
jmp 0x1000193b
mov eax, dword [rsp + 0x78]
inc eax
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x100]
cmp dword [rsp + 0x78], eax
ja 0x10001a0a
mov eax, dword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
mov al, byte [rcx + rax]
mov byte [rsp + 0xd8], al
cmp byte [rsp + 0xd8], 2
je 0x10001982
cmp byte [rsp + 0xd8], 4
je 0x1000198c
cmp byte [rsp + 0xd8], 6
je 0x10001996
jmp 0x100019a0
mov dword [rsp + 0x64], 2
jmp 0x100019a8
mov dword [rsp + 0x64], 0x20
jmp 0x100019a8
mov dword [rsp + 0x64], 4
jmp 0x100019a8
mov dword [rsp + 0x64], 0x40
cmp dword [rsp + 0x64], 0x40
je 0x100019f1
mov eax, dword [rsp + 0x8c]
lea r9, [rsp + 0x64]
mov r8d, dword [rsp + 0x64]
mov rdx, rax
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [rsp + 0xc4], eax
cmp dword [rsp + 0xc4], 0
jne 0x100019f1
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.msvcrt.dll_free]
xor eax, eax
jmp 0x10001a1d
mov eax, dword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
jmp 0x10001931
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.msvcrt.dll_free]
mov eax, 1
add rsp, 0xe8
ret