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

Disassembly:
sub esp, 0x254
push ebx
push ebp
push esi
mov ebp, ecx
push edi
xor edx, edx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x34]
mov dword [esp + 0x30], edx
rep stosd dword es:[edi], eax
mov ecx, ebp
mov esi, dword [esp + 0x30]
lea ebx, [ebp + 0x10]
or esi, 2
mov dword [ecx], eax
mov edi, ebx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x34], edx
mov dword [ecx + 4], eax
mov dword [esp + 0x38], 1
mov dword [esp + 0x30], esi
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov ecx, 0xc
rep stosd dword es:[edi], eax
mov eax, dword [0x10065118]
cmp eax, edx
jne 0x1003254a
mov eax, dword [0x10065114]
mov dword [esp + 0x18], str.getaddrinfo
cmp eax, edx
mov dword [esp + 0x1c], 0x10031590
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x10031cd0
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x10031540
jne 0x10032540
lea edx, [esp + 0x15c]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10032536
lea edi, [esp + 0x15c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x50]
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 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 + 0x50]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x1003247a
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x100324fa
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x15c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x50]
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 + 0x50]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x10032536
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x100324fa
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10032536
xor ebp, ebp
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [edi], eax
je 0x1003270e
inc ebp
add edi, 8
cmp ebp, 3
jl 0x10032500
xor eax, eax
mov edx, dword [esp + eax + 0x1c]
mov dword [eax + 0x1005093c], edx
add eax, 8
cmp eax, 0x18
jl 0x10032520
mov ebp, dword [esp + 0x10]
mov dword [0x10065114], 1
mov eax, dword [0x1005093c]
mov dword [0x10065118], eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x26c]
push edx
push 0
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
jne 0x10032769
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 0x18]
add edx, 8
mov ecx, dword [edx]
mov dword [ebp], ecx
mov ecx, dword [edx + 4]
mov dword [ebp + 4], ecx
mov ecx, dword [edx + 8]
mov dword [ebp + 8], ecx
mov edx, dword [edx + 0xc]
mov dword [ebp + 0xc], edx
mov eax, dword [eax + 0x14]
push eax
push 0x100509b8
push ebx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [0x10065110]
mov ebp, dword [esp + 0x20]
add esp, 0xc
test eax, eax
jne 0x10032762
mov eax, dword [0x10065114]
mov dword [esp + 0x18], str.getaddrinfo
test eax, eax
mov dword [esp + 0x1c], 0x10031590
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x10031cd0
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x10031540
jne 0x10032758
lea ecx, [esp + 0x15c]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1003274e
lea edi, [esp + 0x15c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x50]
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 + 0x50]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x10032692
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x1003271a
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x15c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x50]
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 + 0x50]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x1003274e
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x1003271a
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1003274e
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10032532
xor ebx, ebx
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [edi], eax
je 0x10032705
inc ebx
add edi, 8
cmp ebx, 3
jl 0x10032720
xor eax, eax
mov edx, dword [esp + eax + 0x1c]
mov dword [eax + 0x1005093c], edx
add eax, 8
cmp eax, 0x18
jl 0x1003273c
mov dword [0x10065114], 1
mov eax, dword [0x1005094c]
mov dword [0x10065110], eax
push ebp
call eax
mov ebp, dword [esp + 0x10]
mov ecx, ebp
call fcn.10032860
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x254
ret 4