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

Disassembly:
sub esp, 0x23c
mov eax, dword [esp + 0x24c]
push ebx
push ebp
xor ebp, ebp
mov dword [eax], ebp
mov eax, dword [0x102f8784]
push esi
cmp eax, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x1c], ebp
jne 0x100f86ff
mov eax, dword [0x102f8780]
mov dword [esp + 0x20], str.getaddrinfo
cmp eax, ebp
mov dword [esp + 0x24], 0x100f8ac0
mov dword [esp + 0x28], str.getnameinfo
mov dword [esp + 0x2c], 0x100f91c0
mov dword [esp + 0x30], str.freeaddrinfo
mov dword [esp + 0x34], 0x100f8a70
jne 0x100f86f5
lea ecx, [esp + 0x144]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100f86eb
lea edi, [esp + 0x144]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x38]
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 + 0x38]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
cmp esi, ebp
je 0x100f862a
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x100f86a8
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100f8630
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea edi, [esp + 0x144]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x38]
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 + 0x38]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x100f86e9
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x100f86a8
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100f86e9
mov ecx, dword [0x102656c0]
xor ebx, ebx
test ecx, ecx
jle 0x100f86d3
lea edi, [esp + 0x24]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebp
test eax, eax
mov dword [edi], eax
je 0x100f869f
mov ecx, dword [0x102656c0]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x100f86b8
xor eax, eax
test ecx, ecx
jle 0x100f86e9
mov edx, dword [esp + eax*8 + 0x24]
mov dword [eax*8 + 0x102d0674], edx
inc eax
cmp eax, ecx
jl 0x100f86d9
xor ebp, ebp
mov dword [0x102f8780], 1
mov eax, dword [0x102d0674]
mov dword [0x102f8784], eax
mov edx, dword [esp + 0x258]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x258]
push edx
mov edx, dword [esp + 0x258]
push ecx
push edx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp esi, ebp
mov dword [esp + 0x14], esi
je 0x100f873c
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x23c
ret
mov edi, dword [esp + 0x18]
cmp edi, ebp
je 0x100f8a3c
mov ebx, 0x10
cmp dword [edi + 4], 2
jne 0x100f8805
cmp dword [edi + 0x18], ebp
je 0x100f8805
mov eax, dword [edi + 0x10]
cmp eax, ebp
jbe 0x100f8805
cmp eax, ebx
jb 0x100f8805
push 0x20
call dword [0x102cdf24]
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x100f8812
mov eax, dword [edi]
push ebx
mov dword [esi], eax
mov ecx, dword [edi + 4]
mov dword [esi + 4], ecx
mov edx, dword [edi + 8]
mov dword [esi + 8], edx
mov eax, dword [edi + 0xc]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x18], ebp
mov dword [esi + 0x14], ebp
mov dword [esi + 0x1c], ebp
call dword [0x102cdf24]
add esp, 4
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x100f881c
mov ecx, dword [edi + 0x18]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0x14]
cmp eax, ebp
je 0x100f87ec
push eax
call dword [0x102cdf30]
add esp, 4
cmp eax, ebp
mov dword [esi + 0x14], eax
je 0x100f8830
cmp dword [esp + 0x10], ebp
jne 0x100f87f6
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x100f8801
mov dword [eax + 0x1c], esi
mov dword [esp + 0x1c], esi
mov edi, dword [edi + 0x1c]
cmp edi, ebp
jne 0x100f874d
jmp 0x100f884c
mov dword [esp + 0x14], 8
jmp 0x100f884c
push esi
mov dword [esp + 0x18], 8
call dword [0x102cdf28]
add esp, 4
jmp 0x100f884c
mov edx, dword [esi + 0x18]
mov dword [esp + 0x14], 8
push edx
call dword [0x102cdf28]
push esi
call dword [0x102cdf28]
add esp, 8
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x100f8a1d
mov ebp, eax
mov eax, dword [0x102f877c]
test eax, eax
jne 0x100f8a18
mov eax, dword [0x102f8780]
mov dword [esp + 0x20], str.getaddrinfo
test eax, eax
mov dword [esp + 0x24], 0x100f8ac0
mov dword [esp + 0x28], str.getnameinfo
mov dword [esp + 0x2c], 0x100f91c0
mov dword [esp + 0x30], str.freeaddrinfo
mov dword [esp + 0x34], 0x100f8a70
jne 0x100f8a0e
lea eax, [esp + 0x144]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100f8a04
lea edi, [esp + 0x144]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x38]
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 + 0x38]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x100f8943
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x100f89bf
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x144]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x38]
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 + 0x38]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x100f8a04
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x100f89bf
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100f8a04
mov ecx, dword [0x102656c0]
xor ebx, ebx
test ecx, ecx
jle 0x100f89ee
lea edi, [esp + 0x24]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [edi], eax
je 0x100f89b6
mov ecx, dword [0x102656c0]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x100f89cf
xor eax, eax
test ecx, ecx
jle 0x100f8a04
mov edx, dword [esp + eax*8 + 0x24]
mov dword [eax*8 + 0x102d0674], edx
inc eax
cmp eax, ecx
jl 0x100f89f4
mov dword [0x102f8780], 1
mov eax, dword [0x102d0684]
mov dword [0x102f877c], eax
push ebp
call eax
xor ebp, ebp
mov eax, dword [esp + 0x14]
cmp eax, ebp
mov eax, dword [esp + 0x10]
je 0x100f8a38
push eax
call fcn.100f84e0
add esp, 4
mov dword [esp + 0x10], ebp
jmp 0x100f8a4f
cmp eax, ebp
jne 0x100f8a4f
push 0x2af9
mov dword [esp + 0x18], 0x2af9
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edx, dword [esp + 0x25c]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword [edx], ecx
pop ebx
add esp, 0x23c
ret