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

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x1402274c0]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor ebx, ebx
mov r15, rdx
mov r14, rcx
cmp rdx, 0x40
jae 0x14004adc9
mov ecx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14004afd5
mov eax, 0x5a4d
cmp word [rcx], ax
je 0x14004ade5
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14004afd5
movsxd rcx, dword [rcx + 0x3c]
lea rax, [rcx + 0x108]
cmp rdx, rax
jb 0x14004adb7
cmp dword [rcx + r14], 0x4550
mov qword [rsp + 0x90], rsi
lea rsi, [rcx + r14]
jne 0x14004ae1e
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x14004ae1e
mov ecx, dword [rsi + 0x38]
test cl, 1
je 0x14004ae30
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14004afcd
movzx eax, word [rsi + 0x14]
lea rdx, [rsi + 0x24]
mov qword [rsp + 0x98], rdi
add rdx, rax
movzx eax, word [rsi + 6]
mov r9, rcx
test eax, eax
je 0x14004ae73
mov r8d, eax
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x14004ae5f
mov eax, dword [rdx]
add rax, r9
jmp 0x14004ae63
mov eax, dword [rdx]
add eax, ecx
cmp rax, rbx
cmova rbx, rax
add rdx, 0x28
dec r8
jne 0x14004ae51
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x24]
mov eax, dword [rsi + 0x50]
lea rdi, [rdx - 1]
lea rcx, [rdx - 1]
add rdi, rax
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 0x14004aebe
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x14004afc5
mov rcx, qword [rsi + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rdi
mov qword [rsp + 0x88], rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x14004af04
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 0x14004af35
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 rdi, rax
test rax, rax
jne 0x14004af42
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, recvfrom
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14004afbb
mov qword [rax + 8], rbp
movzx eax, word [rsi + 0x16]
mov dword [rdi + 0x28], 0
shr eax, 0xd
mov qword [rdi + 0x58], 0
and eax, 1
mov dword [rdi + 0x20], eax
lea rax, [0x14004ad40]
mov qword [rdi + 0x30], rax
lea rax, [0x14004ad50]
mov qword [rdi + 0x38], rax
lea rax, [0x14004ad60]
mov qword [rdi + 0x40], rax
lea rax, [0x14004ad70]
mov qword [rdi + 0x48], rax
lea rax, [0x14004ad80]
mov qword [rdi + 0x50], rax
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x68], eax
mov edx, dword [rsi + 0x54]
cmp r15, rdx
jae 0x14004afec
mov ecx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.14004b290
xor eax, eax
mov rbp, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140150a60
add rsp, 0x60
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.140152980
movsxd rax, dword [r14 + 0x3c]
mov r9, rdi
add rax, rbx
mov r8, rsi
mov rdx, r15
mov qword [rdi], rax
mov rcx, r14
mov qword [rax + 0x30], rbp
call fcn.14004a670
test eax, eax
je 0x14004afb3
mov rax, qword [rdi]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rsi + 0x30]
je 0x14004b054
mov rcx, rdi
call fcn.14004aab0
mov dword [rdi + 0x24], eax
jmp 0x14004b05b
mov dword [rdi + 0x24], 1
mov rcx, rdi
call fcn.14004ab80
test eax, eax
je 0x14004afb3
mov rcx, rdi
call fcn.14004a880
test eax, eax
je 0x14004afb3
mov rax, qword [rdi]
mov rsi, qword [rdi + 8]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x14004b0b9
mov rbx, qword [rcx + rsi + 0x18]
test rbx, rbx
je 0x14004b0b9
mov rax, qword [rbx]
test rax, rax
je 0x14004b0b9
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 0x14004b0a0
mov rax, qword [rdi]
mov r8, qword [rdi + 8]
mov edx, dword [rax + 0xa4]
test edx, edx
je 0x14004b0f9
mov ecx, dword [rax + 0xa0]
movabs rax, 0xaaaaaaaaaaaaaaab
add rcx, r8
mul rdx
shr rdx, 3
call qword [sym.imp.KERNEL32.dll_RtlAddFunctionTable]
test al, al
je 0x14004afb3
mov dword [rdi + 0x28], 1
mov rax, qword [rdi]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x14004b142
cmp dword [rdi + 0x20], 0
lea rax, [rcx + rbp]
je 0x14004b136
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x14004b127
mov ecx, 0x45a
jmp 0x14004afad
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x14004afbd
mov qword [rdi + 0x60], rax
mov rax, rdi
jmp 0x14004afbd
mov qword [rdi + 0x60], 0
mov rax, rdi
jmp 0x14004afbd