Function at 0x6a0d30
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp + 0xc]
push esi
inc eax
push edi
xor edi, edi
push eax
mov dword [ebp - 0x98], edi
mov dword [ebp - 0x94], edi
mov dword [ebp - 0x9c], eax
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
add esp, 4
mov dword [ebp - 0x88], esi
cmp esi, edi
jne 0x6a0d8e
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push ebx
push 0x6b2698
push str.CONIN_
call sym.postgres.exe_pgwin32_fopen
mov edi, eax
push 0x7728a8
push str.CONOUT_
mov dword [ebp - 0x8c], edi
call sym.postgres.exe_pgwin32_fopen
add esp, 0x10
mov ebx, eax
mov dword [ebp - 0x90], ebx
test edi, edi
je 0x6a0e2f
test ebx, ebx
je 0x6a0e25
mov edi, dword [sym.imp.MSVCR100.dll_getenv]
push str.OSTYPE
call edi
add esp, 4
test eax, eax
je 0x6a0e58
push str.OSTYPE
mov esi, str.msys
call edi
add esp, 4
jmp 0x6a0df0
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x6a0e10
test cl, cl
je 0x6a0e0c
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x6a0e10
add eax, 2
add esi, 2
test cl, cl
jne 0x6a0df0
xor eax, eax
jmp 0x6a0e15
sbb eax, eax
sbb eax, 0xffffffff
mov esi, dword [ebp - 0x88]
test eax, eax
jne 0x6a0e58
mov edi, dword [ebp - 0x8c]
push edi
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
test ebx, ebx
je 0x6a0e3d
push ebx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
mov edi, dword [sym.imp.MSVCR100.dll___iob_func]
call edi
mov dword [ebp - 0x8c], eax
call edi
add eax, 0x40
mov dword [ebp - 0x90], eax
mov ebx, eax
cmp byte [ebp + 0x10], 0
jne 0x6a0e98
push 4
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov edi, eax
push 0xfffffffffffffff6
mov dword [ebp - 0x94], edi
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
push edi
push esi
mov dword [ebp - 0x98], esi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 3
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov esi, dword [ebp - 0x88]
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x6a0ebd
push ebx
push eax
call sub.libintl.dll_libintl_gettext
add esp, 4
push eax
call dword [sym.imp.MSVCR100.dll_fputs]
push ebx
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0xc
mov ecx, dword [ebp - 0x8c]
mov edx, dword [ebp - 0x9c]
push ecx
push edx
push esi
call dword [sym.imp.MSVCR100.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x6a0edb
mov byte [esi], al
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x6a0ee0
sub eax, edx
mov esi, eax
test esi, esi
jle 0x6a0f59
mov edi, dword [ebp - 0x88]
mov bl, 0xa
cmp byte [esi + edi - 1], bl
je 0x6a0f4c
lea ecx, [ecx]
mov eax, dword [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x84]
push 0x80
push ecx
call dword [sym.imp.MSVCR100.dll_fgets]
add esp, 0xc
test eax, eax
je 0x6a0f46
lea eax, [ebp - 0x84]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x6a0f30
sub eax, edx
test eax, eax
jle 0x6a0f46
cmp byte [ebp + eax - 0x85], bl
jne 0x6a0f00
cmp byte [esi + edi - 1], bl
jne 0x6a0f53
mov edx, edi
mov byte [esi + edx - 1], 0
mov ebx, dword [ebp - 0x90]
cmp byte [ebp + 0x10], 0
jne 0x6a0f92
mov esi, dword [ebp - 0x94]
mov eax, dword [esi]
mov ecx, dword [ebp - 0x98]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push ebx
push 0x6b27a0
call dword [sym.imp.MSVCR100.dll_fputs]
push ebx
call dword [sym.imp.MSVCR100.dll_fflush]
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 0x10
call dword [sym.imp.MSVCR100.dll___iob_func]
mov ecx, dword [ebp - 0x8c]
cmp ecx, eax
je 0x6a0fb1
mov esi, dword [sym.imp.MSVCR100.dll_fclose]
push ecx
call esi
push ebx
call esi
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x88]
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret