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

Disassembly:
push rbx
push r12
push r14
push r15
sub rsp, 0x58
xor ebx, ebx
xor r14d, r14d
mov r12, rdx
mov r15, rcx
cmp rdx, 0x40
jae 0x1400af196
mov ecx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x58
pop r15
pop r14
pop r12
pop rbx
ret
mov eax, 0x5a4d
cmp word [rcx], ax
je 0x1400af1b9
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x58
pop r15
pop r14
pop r12
pop rbx
ret
movsxd rcx, dword [rcx + 0x3c]
lea rax, [rcx + 0x108]
cmp r12, rax
jb 0x1400af17d
cmp dword [rcx + r15], 0x4550
mov qword [rsp + 0x80], rbp
lea rbp, [rcx + r15]
jne 0x1400af1f2
mov eax, 0x8664
cmp word [rbp + 4], ax
jne 0x1400af1f2
mov ecx, dword [rbp + 0x38]
test cl, 1
je 0x1400af204
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400af411
movzx eax, word [rbp + 0x14]
lea rdx, [rbp + 0x24]
add rdx, rax
mov qword [rsp + 0x90], rdi
movzx eax, word [rbp + 6]
mov r9, rcx
test eax, eax
je 0x1400af248
mov r8d, eax
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x1400af233
mov eax, dword [rdx]
add rax, r9
jmp 0x1400af237
mov eax, dword [rdx]
add eax, ecx
cmp rax, rbx
cmova rbx, rax
add rdx, 0x28
sub r8, 1
jne 0x1400af225
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x24]
mov eax, dword [rbp + 0x50]
lea rdi, [rdx - 1]
add rdi, rax
lea rcx, [rdx - 1]
add rcx, rbx
lea rax, [rdx - 1]
not rax
and rdi, rax
lea rax, [rdx - 1]
not rax
and rcx, rax
cmp rdi, rcx
je 0x1400af293
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400af409
mov rcx, qword [rbp + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0x88], rsi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x1400af2e9
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x1400af2e9
lea ecx, [rax + 0xe]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1400af401
mov qword [rsp + 0x50], r13
lea rcx, [rsi + rdi]
movabs r13, 0xffffffff00000000
mov rax, rsi
and rcx, r13
and rax, r13
cmp rax, rcx
jae 0x1400af362
nop word [rax + rax]
mov ecx, reloc.WS2_32.dll_recv
call fcn.14005ef64
mov rbx, rax
test rax, rax
je 0x1400af444
mov qword [rax], r14
mov r9d, 4
mov r8d, 0x3000
mov qword [rax + 8], rsi
mov rdx, rdi
xor ecx, ecx
mov r14, rax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
je 0x1400af425
lea rcx, [rax + rdi]
and rax, r13
and rcx, r13
cmp rax, rcx
jb 0x1400af310
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x70]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400af444
mov qword [rax + 8], rsi
xor r13d, r13d
movzx eax, word [rbp + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x58], r13
mov dword [rdi + 0x20], eax
lea rax, [0x140004310]
mov qword [rdi + 0x28], rax
lea rax, [0x1400b1390]
mov qword [rdi + 0x30], rax
lea rax, [0x1400af150]
mov qword [rdi + 0x38], rax
lea rax, [0x14007df20]
mov qword [rdi + 0x40], rax
lea rax, section..ty7f89
mov qword [rdi + 0x48], rax
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x68], eax
mov qword [rdi + 0x70], r14
mov edx, dword [rbp + 0x54]
cmp r12, rdx
jae 0x1400af45a
lea ecx, [r13 + 0xd]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.1400b1280
xor eax, eax
mov r13, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x80]
add rsp, 0x58
pop r15
pop r14
pop r12
pop rbx
ret
mov rcx, rbx
lea rdx, [0x1400b1390]
xor r8d, r8d
call fcn.1400af010
mov ecx, reloc.WS2_32.dll_ntohl
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400af3fa
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, r14
jmp 0x1400af428
mov r9d, 4
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rbp + 0x54]
mov rdx, r15
mov rcx, rax
mov rbx, rax
call fcn.140056c00
movsxd rax, dword [r15 + 0x3c]
mov r9, rdi
add rax, rbx
mov r8, rbp
mov qword [rdi], rax
mov rdx, r12
mov rcx, r15
mov qword [rax + 0x30], rsi
call fcn.1400b0020
test eax, eax
je 0x1400af3f2
mov rax, qword [rdi]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rbp + 0x30]
je 0x1400af4c2
mov rcx, rdi
call fcn.140007060
mov dword [rdi + 0x24], eax
jmp 0x1400af4c9
mov dword [rdi + 0x24], 1
mov rcx, rdi
call fcn.140006460
test eax, eax
je 0x1400af3f2
mov rcx, rdi
call fcn.1400b0150
test eax, eax
je 0x1400af3f2
mov rcx, rdi
call fcn.14007e600
test eax, eax
je 0x1400af3f2
mov rax, qword [rdi]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x1400af542
lea rax, [rsi + rcx]
cmp dword [rdi + 0x20], r13d
je 0x1400af536
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x1400af527
mov ecx, 0x45a
jmp 0x1400af3ec
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x1400af3fc
mov qword [rdi + 0x60], rax
mov rax, rdi
jmp 0x1400af3fc
mov qword [rdi + 0x60], r13
mov rax, rdi
jmp 0x1400af3fc