Function at 0x100080c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x230
mov edx, dword [esp + 0x234]
push ebp
mov cl, byte [esp + 0x24c]
push esi
mov ax, word [edx]
push edi
mov bp, ax
mov dword [esp + 0xc], 0xffffffff
sub bp, 2
neg bp
sbb ebp, ebp
and ebp, 0xc
add ebp, 0x10
test cl, 2
jne 0x10008140
cmp ax, 0x17
jne 0x10008140
mov ecx, 4
mov edi, 0x10032c40
lea esi, [edx + 8]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x10008140
mov eax, dword [esp + 0x244]
test eax, eax
je 0x10008133
mov ecx, dword [esp + 0x248]
push ecx
push str.Null_address__possibly_DAD_Phase_
push eax
call fcn.10016ba0
add esp, 0xc
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x230
ret
mov eax, dword [0x10032c34]
push ebx
test eax, eax
jne 0x1000830c
mov eax, dword [0x10032c28]
mov dword [esp + 0x14], str.getaddrinfo
test eax, eax
mov dword [esp + 0x18], 0x100026b0
mov dword [esp + 0x1c], str.getnameinfo
mov dword [esp + 0x20], 0x100033f0
mov dword [esp + 0x24], str.freeaddrinfo
mov dword [esp + 0x28], 0x10002660
je 0x10008191
mov eax, dword [0x1002d254]
jmp 0x10008307
lea edx, [esp + 0x138]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100082f1
lea edi, [esp + 0x138]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2c]
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 + 0x2c]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x10008230
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x100082ac
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x138]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2c]
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 + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x100082f1
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x100082ac
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100082f1
mov ecx, dword [0x100201f0]
xor ebx, ebx
test ecx, ecx
jle 0x100082db
lea edi, [esp + 0x18]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [edi], eax
je 0x100082a3
mov ecx, dword [0x100201f0]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x100082bc
xor eax, eax
test ecx, ecx
jle 0x100082f1
mov edx, dword [esp + eax*8 + 0x18]
mov dword [eax*8 + 0x1002d24c], edx
inc eax
cmp eax, ecx
jl 0x100082e1
mov eax, dword [0x1002d254]
mov edx, dword [esp + 0x244]
mov dword [0x10032c28], 1
mov dword [0x10032c34], eax
mov ecx, dword [esp + 0x258]
mov ebx, dword [esp + 0x250]
mov edi, dword [esp + 0x248]
push ecx
mov ecx, dword [esp + 0x258]
push ecx
mov ecx, dword [esp + 0x254]
push ebx
push ecx
push edi
push ebp
push edx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
je 0x100083b6
mov esi, dword [esp + 0x25c]
test esi, esi
je 0x1000836b
mov ebp, dword [esp + 0x260]
push ebp
push esi
push str.getnameinfo__:
call fcn.100071f0
add esp, 0xc
mov byte [esi + ebp - 1], 0
test edi, edi
je 0x1000838a
mov esi, dword [esp + 0x24c]
push esi
push str.No_name_available
push edi
call fcn.10016ba0
add esp, 0xc
mov byte [edi + esi - 1], 0
test ebx, ebx
je 0x100083a9
mov esi, dword [esp + 0x254]
push esi
push str.No_port_available
push ebx
call fcn.10016ba0
add esp, 0xc
mov byte [ebx + esi - 1], 0
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x230
ret
mov eax, dword [esp + 0x10]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x230
ret