Function at 0x10015e40
Capabilities:
Get common file path

Disassembly:
sub esp, 0x250
push esi
push edi
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov dword [esp + 0x28], eax
mov eax, dword [0x10032c38]
test eax, eax
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], 6
jne 0x10016027
mov eax, dword [0x10032c28]
mov dword [esp + 0xc], str.getaddrinfo
test eax, eax
mov dword [esp + 0x10], 0x100026b0
mov dword [esp + 0x14], str.getnameinfo
mov dword [esp + 0x18], 0x100033f0
mov dword [esp + 0x1c], str.freeaddrinfo
mov dword [esp + 0x20], 0x10002660
je 0x10015eb9
mov eax, dword [0x1002d24c]
jmp 0x10016022
push ebx
push ebp
lea eax, [esp + 0x158]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10016011
lea edi, [esp + 0x158]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x4c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x4c]
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 + 0x4c]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x10015f58
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x10015fd0
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x158]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x4c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x4c]
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 + 0x4c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x10016011
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x10015fd0
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10016011
mov ecx, dword [0x100201f0]
xor ebx, ebx
test ecx, ecx
jle 0x10015ffb
lea edi, [esp + 0x18]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebp
test eax, eax
mov dword [edi], eax
je 0x10015fc7
mov ecx, dword [0x100201f0]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x10015fe0
xor eax, eax
test ecx, ecx
jle 0x10016011
mov edx, dword [esp + eax*8 + 0x18]
mov dword [eax*8 + 0x1002d24c], edx
inc eax
cmp eax, ecx
jl 0x10016001
mov eax, dword [0x1002d24c]
pop ebp
mov dword [0x10032c28], 1
pop ebx
mov dword [0x10032c38], eax
lea ecx, [esp + 8]
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x260]
push edx
push 0
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [esp + 8]
mov eax, esi
neg eax
sbb eax, eax
pop edi
not eax
and eax, ecx
pop esi
add esp, 0x250
ret