Function at 0x10035420
Capabilities:
Get common file path

Disassembly:
sub esp, 0x258
push ebx
push ebp
push esi
push edi
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x34]
xor ebp, ebp
rep stosd dword es:[edi], eax
mov eax, dword [0x10052c4c]
mov dword [esp + 0x34], 4
cmp eax, ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], 1
mov dword [esp + 0x40], 6
jne 0x10035469
push ebp
call fcn.10036d80
mov dword [0x10052c4c], eax
mov edi, dword [esp + 0x26c]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x34]
push ecx
push edx
push ebp
push edi
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp esi, 0x2af9
je 0x100354fc
cmp esi, ebp
jne 0x100356e9
mov eax, dword [0x10052c48]
mov esi, dword [esp + 0x10]
cmp eax, ebp
jne 0x100354b0
push 2
call fcn.10036d80
mov dword [0x10052c48], eax
push esi
call eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x274]
cmp dword [ecx], eax
jb 0x100354e7
mov edx, dword [esp + 0x270]
cmp edx, ebp
je 0x100354e7
push edi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x258
ret 0xc
inc eax
pop edi
pop esi
mov dword [ecx], eax
pop ebp
mov eax, 0x7a
pop ebx
add esp, 0x258
ret 0xc
mov eax, dword [0x10052c4c]
mov dword [esp + 0x34], ebp
cmp eax, ebp
jne 0x100356cd
mov eax, dword [0x10052c44]
mov dword [esp + 0x14], str.getaddrinfo
cmp eax, ebp
mov dword [esp + 0x18], 0x10036420
mov dword [esp + 0x1c], str.getnameinfo
mov dword [esp + 0x20], 0x10036b40
mov dword [esp + 0x24], str.freeaddrinfo
mov dword [esp + 0x28], 0x100363d0
je 0x10035550
mov eax, dword [0x1004bccc]
jmp 0x100356c8
lea eax, [esp + 0x160]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100356b2
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
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 + 0x54]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
cmp esi, ebp
je 0x100355f3
mov ebp, dword [0x1004c1b8]
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x10035671
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100355f9
mov ebp, dword [0x1004c1b8]
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
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 + 0x54]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x100356b2
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x10035671
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100356b2
mov ecx, dword [0x1003b5f0]
xor ebx, ebx
test ecx, ecx
jle 0x1003569c
lea edi, [esp + 0x18]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebp
test eax, eax
mov dword [edi], eax
je 0x10035668
mov ecx, dword [0x1003b5f0]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x10035681
xor eax, eax
test ecx, ecx
jle 0x100356b2
mov edx, dword [esp + eax*8 + 0x18]
mov dword [eax*8 + 0x1004bccc], edx
inc eax
cmp eax, ecx
jl 0x100356a2
mov eax, dword [0x1004bccc]
mov edi, dword [esp + 0x26c]
mov dword [0x10052c44], 1
mov dword [0x10052c4c], eax
lea ecx, [esp + 0x10]
lea edx, [esp + 0x34]
push ecx
push edx
push 0
push edi
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
je 0x10035707
mov eax, esi
pop edi
sub eax, 8
pop esi
neg eax
sbb eax, eax
pop ebp
and eax, 0x2edf
pop ebx
add eax, 8
add esp, 0x258
ret 0xc
mov eax, dword [esp + 0x10]
mov ecx, 2
cmp dword [eax + 4], ecx
je 0x10035725
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x10035937
cmp dword [eax + 4], ecx
jne 0x10035715
mov edx, dword [esp + 0x274]
mov ebp, dword [edx]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
mov eax, dword [0x10052c40]
test eax, eax
jne 0x10035905
mov eax, dword [0x10052c44]
mov dword [esp + 0x14], str.getaddrinfo
test eax, eax
mov dword [esp + 0x18], 0x10036420
mov dword [esp + 0x1c], str.getnameinfo
mov dword [esp + 0x20], 0x10036b40
mov dword [esp + 0x24], str.freeaddrinfo
mov dword [esp + 0x28], 0x100363d0
je 0x1003578c
mov eax, dword [0x1004bcd4]
jmp 0x10035900
lea ecx, [esp + 0x160]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100358ec
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
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 + 0x54]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x1003582b
push str.getaddrinfo
push esi
call dword [0x1004c1b8]
test eax, eax
jne 0x100358a7
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x160]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x54]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x54]
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 + 0x54]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x100358ec
push str.getaddrinfo
push esi
call dword [0x1004c1b8]
test eax, eax
jne 0x100358a7
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100358ec
mov ecx, dword [0x1003b5f0]
xor ebx, ebx
test ecx, ecx
jle 0x100358d6
lea edi, [esp + 0x18]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [0x1004c1b8]
test eax, eax
mov dword [edi], eax
je 0x1003589e
mov ecx, dword [0x1003b5f0]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x100358b7
xor eax, eax
test ecx, ecx
jle 0x100358ec
mov edx, dword [esp + eax*8 + 0x18]
mov dword [eax*8 + 0x1004bccc], edx
inc eax
cmp eax, ecx
jl 0x100358dc
mov eax, dword [0x1004bcd4]
mov dword [0x10052c44], 1
mov ecx, 2
mov dword [0x10052c40], eax
mov edi, dword [esp + 0x270]
mov edx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x34]
push 0
push 0
push ebp
push edi
push ecx
push edx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
mov eax, esi
je 0x1003593c
test edi, edi
mov eax, 0x7a
je 0x1003593c
mov eax, 0x2ee7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x258
ret 0xc