Function at 0x40cdd0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], str.getaddrinfo
mov dword [ebp - 0x18], 0x40d0c0
mov dword [ebp - 0x14], str.getnameinfo
mov dword [ebp - 0x10], 0x40dc40
mov dword [ebp - 0xc], str.freeaddrinfo
mov dword [ebp - 8], 0x40d050
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
cmp dword [0x4408d8], 0
je 0x40ce38
mov eax, dword [ebp + 8]
and eax, 0xffff
mov eax, dword [eax*8 + 0x43c0ec]
jmp 0x40d03b
push 0x104
lea ecx, [ebp - 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x40ce53
jmp 0x40cf96
lea edi, [ebp - 0x238]
lea edx, [ebp - 0x130]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ws2_32
lea edx, [ebp - 0x130]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40ceef
push str.getaddrinfo
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40ceef
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 0
cmp dword [ebp - 4], 0
je 0x40cefa
jmp 0x40cf96
lea edi, [ebp - 0x238]
lea edx, [ebp - 0x130]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.wship6
lea edx, [ebp - 0x130]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40cf96
push str.getaddrinfo
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40cf96
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 0
cmp dword [ebp - 4], 0
je 0x40d021
mov dword [ebp - 0x20], 0
jmp 0x40cfb2
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 3
jge 0x40cff0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + ecx*8 - 0x1c]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x20]
mov dword [ebp + ecx*8 - 0x18], eax
mov edx, dword [ebp - 0x20]
cmp dword [ebp + edx*8 - 0x18], 0
jne 0x40cfee
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 4], 0
jmp 0x40cff0
jmp 0x40cfa9
cmp dword [ebp - 4], 0
je 0x40d021
mov dword [ebp - 0x20], 0
jmp 0x40d008
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 3
jge 0x40d021
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + eax*8 - 0x18]
mov dword [edx*8 + 0x43c0ec], ecx
jmp 0x40cfff
mov dword [0x4408d8], 1
mov edx, dword [ebp + 8]
and edx, 0xffff
mov eax, dword [edx*8 + 0x43c0ec]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4