Function at 0x10011070
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
sub esp, 0x258
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x38]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x10], ebx
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x34]
mov eax, dword [0x10057de4]
mov edi, 1
or edx, 2
cmp eax, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x34], edx
jne 0x1001127a
mov eax, dword [0x10057de0]
mov dword [esp + 0x18], str.getaddrinfo
cmp eax, ebx
mov dword [esp + 0x1c], 0x10011ac0
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x10012200
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x10011a70
je 0x10011108
mov eax, dword [0x1002302c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10057de4], eax
jmp 0x10011280
lea eax, [esp + 0x160]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1001125b
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ws2_32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
and ecx, 3
lea eax, [esp + 0x54]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x100111ab
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x10011229
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100111b1
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.wship6
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x54]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x10011261
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x10011229
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10011261
xor ebx, ebx
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebp
test eax, eax
mov dword [edi], eax
je 0x10011220
inc ebx
add edi, 8
cmp ebx, 3
jl 0x1001122f
xor eax, eax
mov edx, dword [esp + eax + 0x1c]
mov dword [eax + 0x1002302c], edx
add eax, 8
cmp eax, 0x18
jl 0x10011247
jmp 0x10011261
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov eax, dword [0x1002302c]
mov edi, 1
mov dword [0x10057de0], edi
xor ebx, ebx
mov dword [0x10057de4], eax
jmp 0x10011280
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x270]
push edx
push ebx
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp esi, ebx
jne 0x100114c5
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 4]
cmp ecx, 0x17
jne 0x100112f6
mov edi, dword [eax + 0x18]
mov esi, dword [esp + 0x274]
add edi, 8
cmp esi, ebx
je 0x100112ea
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
sub edi, esi
mov ebx, 8
mov dx, word [edi + esi]
push edx
call ebp
mov word [esi], ax
add esi, 2
dec ebx
jne 0x100112d0
mov eax, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x14], 2
xor ebx, ebx
jmp 0x1001131d
cmp ecx, 2
jne 0x1001131d
mov ecx, dword [eax + 0x18]
mov esi, dword [esp + 0x270]
cmp esi, ebx
mov ecx, dword [ecx + 4]
je 0x10011319
push ecx
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esi], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], edi
mov dword [esp + 0x30], eax
mov eax, dword [0x10057ddc]
cmp eax, ebx
jne 0x100114be
mov eax, dword [0x10057de0]
mov dword [esp + 0x18], str.getaddrinfo
cmp eax, ebx
mov dword [esp + 0x1c], 0x10011ac0
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x10012200
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x10011a70
jne 0x100114b4
lea edx, [esp + 0x160]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100114aa
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ws2_32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
and ecx, 3
lea eax, [esp + 0x54]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x10011402
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x1001147a
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.wship6
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x54]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x100114aa
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x1001147a
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100114aa
xor ebx, ebx
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebp
test eax, eax
mov dword [edi], eax
je 0x10011471
inc ebx
add edi, 8
cmp ebx, 3
jl 0x10011480
xor eax, eax
mov edx, dword [esp + eax + 0x1c]
mov dword [eax + 0x1002302c], edx
add eax, 8
cmp eax, 0x18
jl 0x10011498
mov dword [0x10057de0], 1
mov eax, dword [0x1002303c]
mov dword [0x10057ddc], eax
mov ecx, dword [esp + 0x30]
push ecx
call eax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x258
ret 0xc