Function at 0x69af40
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x69af89
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.postgres.exe__dosmaperr
add esp, 4
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
test eax, 0x400
jne 0x69afaf
call dword [sym.imp.MSVCR100.dll__errno]
pop edi
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push esi
push 0
push 0x2200000
push 3
push 0
push 3
push bind
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x69aff2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.postgres.exe__dosmaperr
add esp, 4
or eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x228]
push eax
push 0x21c
lea ecx, [ebp - 0x220]
push ecx
push 0
push 0
push 0x900a8
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x69b0c4
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
push 0
push 0
lea edx, [ebp - 0x224]
push edx
push 0x409
mov dword [eax], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0
push 0x7720c8
push 0x16f
push str.srcportdirmod.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x69b094
mov eax, dword [ebp - 0x224]
push eax
push ebx
push str.could_not_get_junction_for___s_:__s
call sym.postgres.exe_errmsg
add esp, 0xc
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ecx, dword [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
pop esi
pop edi
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x220], 0xa0000003
jne 0x69b0f9
mov edx, dword [ebp + 0x10]
push 0
push 0
push edx
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
test esi, esi
jg 0x69b119
call dword [sym.imp.MSVCR100.dll__errno]
pop esi
pop edi
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
cmp esi, 4
jle 0x69b159
push 4
push 0x77209c
push edi
call dword [sym.imp.MSVCR100.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x69b159
lea edx, [edi + 4]
mov eax, edx
lea ebx, [eax + 1]
jmp 0x69b140
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x69b140
sub eax, ebx
inc eax
push eax
push edx
push edi
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
sub esi, 4
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret