Function at 0x140022910
Capabilities:
Get common file path
Initialize winsock library
Link many functions at runtime

Disassembly:
sub rsp, 0x1e8
mov rax, qword [0x14008c840]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
test cl, 2
je 0x140022976
mov ecx, 0x202
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x140022959
movzx eax, word [rsp + 0x30]
cmp al, 2
jne 0x140022953
shr ax, 8
cmp al, 2
je 0x140022976
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.14006afb0
add rsp, 0x1e8
ret
call fcn.14005afa0
test eax, eax
jne 0x140022c0c
mov qword [rsp + 0x1f0], rbx
lea rcx, str.kernel32
mov qword [rsp + 0x200], rsi
xor esi, esi
mov qword [rsp + 0x208], rdi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
test rax, rax
jne 0x1400229be
mov qword [0x14008cde0], rsi
jmp 0x140022b3e
lea rdx, str.LoadLibraryExW
mov qword [rsp + 0x1f8], rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rbx, str.iphlpapi.dll
mov rbp, rax
mov rcx, rbx
lea rdx, [0x1400705d8]
call sub.api_ms_win_crt_string_l1_1_0.dll_wcspbrk
test rax, rax
je 0x140022a1c
mov rcx, rbx
test rbp, rbp
je 0x140022a0e
xor edx, edx
mov r8d, 8
call rbp
mov rsi, rax
jmp 0x140022b0e
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
jmp 0x140022b0e
test rbp, rbp
je 0x140022a4b
lea rdx, str.AddDllDirectory
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140022a4b
xor edx, edx
mov r8d, 0x800
mov rcx, rbx
call rbp
mov rsi, rax
jmp 0x140022b0e
xor edx, edx
mov qword [rsp + 0x1e0], r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov r14d, eax
test eax, eax
je 0x140022b06
lea ecx, [rax + 1]
lea rcx, [rcx*2 + 0x18]
call qword [section..data]
mov rdi, rax
test rax, rax
je 0x140022afd
mov edx, r14d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140022afd
mov rcx, 0xffffffffffffffff
mov rax, rcx
nop
cmp word [rdi + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140022aa0
mov dword [rdi + rax*2], 0x5c
inc rcx
cmp word [rdi + rcx*2], si
jne 0x140022ab2
add rcx, rcx
sub rcx, rbx
add rcx, rdi
nop dword [rax]
nop dword [rax + rax]
movzx eax, word [rbx]
mov word [rcx + rbx], ax
lea rbx, [rbx + 2]
test ax, ax
jne 0x140022ad0
mov rcx, rdi
test rbp, rbp
je 0x140022af4
xor edx, edx
mov r8d, 8
call rbp
jmp 0x140022afa
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
mov rcx, rdi
call qword [fcn.14006bfba]
mov r14, qword [rsp + 0x1e0]
mov rbp, qword [rsp + 0x1f8]
mov qword [0x14008cde0], rsi
test rsi, rsi
je 0x140022b3e
lea rdx, str.if_nametoindex
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140022b3e
mov qword [0x14008cdc0], rax
lea rcx, str.ws2_32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, qword [rsp + 0x208]
mov rbx, rax
mov rsi, qword [rsp + 0x200]
test rax, rax
je 0x140022ba8
lea rdx, str.FreeAddrInfoExW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GetAddrInfoExCancel
mov rcx, rbx
mov qword [0x14008cdc8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GetAddrInfoExW
mov rcx, rbx
mov qword [0x14008cdd0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14008cdd8], rax
mov r9d, 2
mov dword [rsp + 0x20], 3
xor r8d, r8d
xor edx, edx
mov ecx, 6
call fcn.14005ab50
test al, al
mov dword [rsp + 0x20], 3
mov r9d, 2
mov ecx, 6
setne byte [0x14008d439]
mov edx, r9d
xor r8d, r8d
call fcn.14005ab50
test al, al
lea rcx, [0x14008d440]
setne byte [0x14008d438]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov rbx, qword [rsp + 0x1f0]
xor eax, eax
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.14006afb0
add rsp, 0x1e8
ret