Function at 0x180008ff0
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x50
xor ebx, ebx
mov r15, rdx
mov r14, rcx
cmp rdx, 0x40
jae 0x18000901f
mov ecx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x50
pop r15
pop r14
pop rbx
ret
mov eax, 0x5a4d
cmp word [rcx], ax
je 0x180009040
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x50
pop r15
pop r14
pop rbx
ret
movsxd rcx, dword [rcx + 0x3c]
lea rax, [rcx + 0x108]
cmp r15, rax
jb 0x180009008
cmp dword [rcx + r14], 0x4550
mov qword [rsp + 0x78], rsi
lea rsi, [rcx + r14]
jne 0x180009076
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x180009076
mov ecx, dword [rsi + 0x38]
test cl, 1
je 0x180009092
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rsi, qword [rsp + 0x78]
xor eax, eax
add rsp, 0x50
pop r15
pop r14
pop rbx
ret
movzx eax, word [rsi + 0x14]
lea rdx, [rsi + 0x24]
add rdx, rax
mov qword [rsp + 0x80], rdi
movzx eax, word [rsi + 6]
mov r9, rcx
test eax, eax
je 0x1800090d6
mov r8d, eax
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x1800090c1
mov eax, dword [rdx]
add rax, r9
jmp 0x1800090c5
mov eax, dword [rdx]
add eax, ecx
cmp rax, rbx
cmova rbx, rax
add rdx, 0x28
sub r8, 1
jne 0x1800090b3
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x24]
lea r8d, [rdx - 1]
lea edi, [rdx - 1]
not r8d
add edi, dword [rsi + 0x50]
lea rcx, [rdx - 1]
add rcx, rbx
and rdi, r8
and rcx, r8
cmp rdi, rcx
je 0x180009116
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1800091fa
mov rcx, qword [rsi + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0x70], rbp
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x180009159
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x18000918a
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x50]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x180009197
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, reloc.WLDAP32.dll_Ordinal_14
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1800091f3
mov qword [rax + 8], rbp
movzx eax, word [rsi + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x40], 0
mov dword [rdi + 0x20], eax
lea rax, [0x180008fb0]
mov qword [rdi + 0x28], rax
lea rax, [0x180008fc0]
mov qword [rdi + 0x30], rax
lea rax, [0x180008fd0]
mov qword [rdi + 0x38], rax
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x50], eax
mov edx, dword [rsi + 0x54]
cmp r15, rdx
jae 0x180009211
mov ecx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.180009340
xor eax, eax
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop r15
pop r14
pop rbx
ret
mov r9d, 4
mov r8d, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsi + 0x54]
mov rdx, r14
mov rcx, rax
mov rbx, rax
call fcn.180081b10
movsxd rax, dword [r14 + 0x3c]
mov r9, rdi
add rax, rbx
mov r8, rsi
mov qword [rdi], rax
mov rdx, r15
mov rcx, r14
mov qword [rax + 0x30], rbp
call fcn.1800089f0
test eax, eax
je 0x1800091eb
mov rax, qword [rdi]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rsi + 0x30]
je 0x180009275
mov rcx, rdi
call fcn.180008d70
mov dword [rdi + 0x24], eax
jmp 0x18000927c
mov dword [rdi + 0x24], 1
mov rcx, rdi
call fcn.180008e30
test eax, eax
je 0x1800091eb
mov rcx, rdi
call fcn.180008b10
test eax, eax
je 0x1800091eb
mov rax, qword [rdi]
mov rsi, qword [rdi + 8]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x1800092d9
mov rbx, qword [rcx + rsi + 0x18]
test rbx, rbx
je 0x1800092d9
mov rax, qword [rbx]
test rax, rax
je 0x1800092d9
nop
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 8]
lea rbx, [rbx + 8]
test rax, rax
jne 0x1800092c0
mov rax, qword [rdi]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x180009322
cmp dword [rdi + 0x20], 0
lea rax, [rcx + rbp]
je 0x180009316
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x180009307
mov ecx, 0x45a
jmp 0x1800091e5
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x1800091f5
mov qword [rdi + 0x48], rax
mov rax, rdi
jmp 0x1800091f5
mov qword [rdi + 0x48], 0
mov rax, rdi
jmp 0x1800091f5