Function at 0x10064780
Capabilities:
Get common file path

Disassembly:
sub esp, 0x25c
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x38]
mov dword [esp + 0x34], ebx
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x278]
mov dword [esp + 0xc], ebx
dec eax
je 0x100647c8
dec eax
je 0x100647be
mov dword [esp + 0x38], ebx
jmp 0x100647d0
mov dword [esp + 0x38], 0x17
jmp 0x100647d0
mov dword [esp + 0x38], 2
mov eax, dword [esp + 0x274]
xor ecx, ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x270]
mov dword [esp + 0x11], ecx
lea edx, [esp + 0x10]
push 0xa
mov dword [esp + 0x19], ecx
push edx
push eax
mov byte [esp + 0x1c], 0
mov byte [esp + 0x25], cl
call dword [sym.imp.MSVCRT.dll__itoa]
mov eax, dword [0x100ac51c]
add esp, 0xc
cmp eax, ebx
jne 0x100649b3
mov eax, dword [0x100ac518]
mov dword [esp + 0x1c], str.getaddrinfo
cmp eax, ebx
mov dword [esp + 0x20], 0x10064a60
mov dword [esp + 0x24], str.getnameinfo
mov dword [esp + 0x28], 0x10065180
mov dword [esp + 0x2c], str.freeaddrinfo
mov dword [esp + 0x30], 0x10064a10
je 0x10064856
mov eax, dword [0x100aa014]
jmp 0x100649ae
push ebp
lea ecx, [esp + 0x164]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1006499c
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
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 ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
and ecx, 3
lea eax, [esp + 0x58]
rep movsb byte es:[edi], byte [esi]
push eax
call ebp
mov esi, eax
cmp esi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x100648f4
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x1006496c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
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 + 0x58]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
mov esi, eax
test esi, esi
je 0x1006499c
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x1006496c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1006499c
xor ebp, ebp
lea edi, [esp + 0x24]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebx
test eax, eax
mov dword [edi], eax
je 0x10064963
inc ebp
add edi, 8
cmp ebp, 3
jl 0x10064972
xor eax, eax
mov edx, dword [esp + eax + 0x24]
mov dword [eax + 0x100aa014], edx
add eax, 8
cmp eax, 0x18
jl 0x1006498a
mov eax, dword [0x100aa014]
mov dword [0x100ac518], 1
xor ebx, ebx
pop ebp
mov dword [0x100ac51c], eax
lea ecx, [esp + 0xc]
lea edx, [esp + 0x34]
push ecx
push edx
mov edx, dword [esp + 0x274]
lea ecx, [esp + 0x18]
push ecx
push edx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp esi, ebx
je 0x100649e5
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x25c
ret
mov esi, dword [esp + 0x27c]
mov edi, dword [esp + 0xc]
mov eax, dword [esi]
cmp eax, ebx
je 0x10064a02
push eax
call fcn.10065e70
test eax, eax
je 0x10064a02
mov dword [esi], ebx
mov dword [esi], edi
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x25c
ret