Function at 0x415200
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x4210a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp - 0x94], 0
push ebx
mov ebx, dword [sym.imp.MSVCR120.dll_malloc]
push eax
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x9c], eax
call ebx
add esp, 4
mov dword [ebp - 0x90], eax
test eax, eax
jne 0x415260
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004175a2
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.MSVCR120.dll_fopen]
push edi
push 0x41f7b0
push str.CONIN_
call esi
mov edi, eax
push 0x41f7bc
push str.CONOUT_
mov dword [ebp - 0x8c], edi
call esi
mov esi, eax
add esp, 0x10
mov eax, dword [sym.imp.MSVCR120.dll_fclose]
mov dword [ebp - 0x98], esi
test edi, edi
je 0x415308
test esi, esi
je 0x4152fd
mov edi, dword [sym.imp.MSVCR120.dll_getenv]
push str.OSTYPE
call edi
add esp, 4
test eax, eax
je 0x415323
push str.OSTYPE
mov esi, str.msys
call edi
add esp, 4
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x4152e3
test cl, cl
je 0x4152df
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x4152e3
add eax, 2
add esi, 2
test cl, cl
jne 0x4152c3
xor eax, eax
jmp 0x4152e8
sbb eax, eax
or eax, 1
mov esi, dword [ebp - 0x98]
mov edi, dword [ebp - 0x8c]
test eax, eax
jne 0x415329
mov eax, dword [sym.imp.MSVCR120.dll_fclose]
push edi
call eax
mov eax, dword [sym.imp.MSVCR120.dll_fclose]
add esp, 4
test esi, esi
je 0x415312
push esi
call eax
add esp, 4
mov esi, dword [sym.imp.MSVCR120.dll___iob_func]
call esi
mov edi, eax
call esi
lea esi, [eax + 0x40]
jmp 0x415329
mov edi, dword [ebp - 0x8c]
cmp byte [ebp + 0x10], 0
jne 0x415362
push 4
call ebx
add esp, 4
mov ebx, eax
mov dword [ebp - 0x88], ebx
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push ebx
push eax
mov dword [ebp - 0x94], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 3
push dword [ebp - 0x94]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x415387
push esi
push eax
call sub.libintl_8.dll_libintl_gettext
add esp, 4
push eax
call dword [sym.imp.MSVCR120.dll_fputs]
push esi
call dword [sym.imp.MSVCR120.dll_fflush]
add esp, 0xc
mov ebx, dword [ebp - 0x90]
push edi
push dword [ebp - 0x9c]
push ebx
call dword [sym.imp.MSVCR120.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x4153a4
mov byte [ebx], al
mov ecx, ebx
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4153b0
sub ecx, edx
test ecx, ecx
jle 0x41541a
add ebx, ecx
cmp byte [ebx - 1], 0xa
je 0x415410
jmp 0x4153d0
push edi
lea eax, [ebp - 0x84]
push 0x80
push eax
call dword [sym.imp.MSVCR120.dll_fgets]
add esp, 0xc
test eax, eax
je 0x41540a
lea ecx, [ebp - 0x84]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4153f3
sub ecx, edx
test ecx, ecx
jle 0x41540a
cmp byte [ebp + ecx - 0x85], 0xa
jne 0x4153d0
cmp byte [ebx - 1], 0xa
jne 0x415414
mov byte [ebx - 1], 0
mov ebx, dword [ebp - 0x90]
cmp byte [ebp + 0x10], 0
jne 0x415456
mov eax, dword [ebp - 0x88]
push dword [eax]
push dword [ebp - 0x94]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push esi
push 0x41bc4c
call dword [sym.imp.MSVCR120.dll_fputs]
push esi
call dword [sym.imp.MSVCR120.dll_fflush]
push dword [ebp - 0x88]
call dword [sym.imp.MSVCR120.dll_free]
add esp, 0x10
call dword [sym.imp.MSVCR120.dll___iob_func]
cmp edi, eax
je 0x41546f
push edi
mov edi, dword [sym.imp.MSVCR120.dll_fclose]
call edi
push esi
call edi
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004175a2
mov esp, ebp
pop ebp
ret