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

Disassembly:
sub esp, 0x198
mov eax, dword [0x10090400]
xor eax, esp
mov dword [esp + 0x194], eax
test byte [esp + 0x19c], 2
je 0x100358d1
lea eax, [esp + 4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x100358b7
mov eax, dword [esp + 4]
cmp al, 2
jne 0x100358b1
shr eax, 8
cmp al, 2
je 0x100358d1
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.1007296b
add esp, 0x198
ret
call fcn.10066ef0
test eax, eax
jne 0x10035aa4
push ebp
push esi
push edi
push str.kernel32
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
jne 0x10035905
mov dword [0x1009175c], esi
jmp 0x10035a29
push ebx
push str.LoadLibraryExA
push edi
call ebp
push 0x1007a814
push str.iphlpapi.dll
mov ebx, eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strpbrk
add esp, 8
test eax, eax
je 0x1003594e
test ebx, ebx
je 0x1003593c
push 8
push 0
push str.iphlpapi.dll
call ebx
mov esi, eax
jmp 0x10035a0d
push str.iphlpapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
jmp 0x10035a0d
test ebx, ebx
je 0x10035973
push str.AddDllDirectory
push edi
call ebp
test eax, eax
je 0x10035973
push 0x800
push 0
push str.iphlpapi.dll
call ebx
mov esi, eax
jmp 0x10035a0d
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [esp + 0x10], eax
test eax, eax
je 0x10035a0d
lea ecx, [eax + 0xd]
push ecx
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
je 0x10035a03
push dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10035a03
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100359b0
sub ecx, edx
mov eax, 0x5c
mov word [ecx + edi], ax
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100359c7
sub ecx, edx
mov edx, str.iphlpapi.dll
sub ecx, edx
add ecx, edi
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x100359e0
test ebx, ebx
je 0x100359fa
push 8
push 0
push edi
call ebx
jmp 0x10035a01
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push edi
call dword [0x10090004]
add esp, 4
mov dword [0x1009175c], esi
pop ebx
test esi, esi
je 0x10035a29
push str.if_nametoindex
push esi
call ebp
test eax, eax
je 0x10035a29
mov dword [0x1009174c], eax
push str.ws2_32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
test esi, esi
je 0x10035a61
push str.FreeAddrInfoExW
push esi
call ebp
push str.GetAddrInfoExCancel
push esi
mov dword [0x10091750], eax
call ebp
push str.GetAddrInfoExW
push esi
mov dword [0x10091754], eax
call ebp
mov dword [0x10091758], eax
push 3
push 2
push 0
push 0
push 6
call fcn.10066b10
push 3
push 2
push 0
test al, al
push 2
push 6
setne byte [0x10095bf9]
call fcn.10066b10
add esp, 0x28
test al, al
setne byte [0x10095bf8]
push 0x10095c00
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.1007296b
add esp, 0x198
ret