Function at 0x417cc0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0x1c], eax
xor eax, eax
mov ebx, dword [esp + 0x40]
mov eax, 0x101
cmp byte [esp + 0x44], 0
mov word [ebx], ax
mov byte [ebx + 2], 1
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
jne 0x417d10
mov eax, dword [esp + 0x1c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x417def
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x18]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0x18], 0xfffffffe
call sub.cygncursesw_10.dll_setupterm
test eax, eax
jne 0x46e8f0
mov dword [esp], 0x4797b2
call fcn.00417c80
test eax, eax
setne byte [ebx]
mov dword [esp], 0x4797b6
call fcn.00417bf0
mov byte [ebx + 2], 0
mov byte [ebx + 1], al
mov dword [esp], str.TERM
call sub.cygwin1.dll_getenv
mov edi, eax
test eax, eax
je 0x417db8
mov eax, 5
mov ebp, str.xterm
xor esi, esi
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov dword [esp], edi
call sub.cygwin1.dll_strncmp
test eax, eax
je 0x417db0
add esi, 1
cmp esi, 5
je 0x417db8
mov ebp, dword [esi*4 + 0x4797f8]
mov dword [esp], ebp
call sub.cygwin1.dll_strlen
jmp 0x417d7e
mov byte [ebx + 2], 1
lea esi, [esi]
mov dword [esp], str.MOSH_NO_TERM_INIT
call sub.cygwin1.dll_getenv
test eax, eax
jne 0x417cf7
mov dword [esp], str.smcup
call fcn.00417c80
mov dword [ebx + 4], eax
mov dword [esp], str.rmcup
call fcn.00417c80
mov dword [ebx + 8], eax
jmp 0x417cf7
call sub.cygwin1.dll___stack_chk_fail
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x46e942
jg 0x46e90c
cmp eax, 0xffffffff
je 0x46e99c
test eax, eax
je 0x46e9e4
mov dword [esp], 8
call sub.cygstdc_6.dll___cxa_allocate_exception
mov dword [esp + 4], str.Unknown_terminfo_error.
mov dword [esp], eax
mov ebx, eax
call fcn.004510c0
mov dword [esp + 8], 0x4510b8
mov dword [esp + 4], 0x47df4c
mov dword [esp], ebx
call sub.cygstdc_6.dll___cxa_throw
mov dword [esp], 8
call sub.cygstdc_6.dll___cxa_allocate_exception
mov dword [esp + 4], str.Terminal_is_hardcopy_and_cannot_be_used_by_curses_applications.
mov dword [esp], eax
mov ebx, eax
call fcn.004510c0
mov dword [esp + 8], 0x4510b8
mov dword [esp + 4], 0x47df4c
mov dword [esp], ebx
call sub.cygstdc_6.dll___cxa_throw
mov dword [esp], ebx
mov esi, eax
call sub.cygstdc_6.dll___cxa_free_exception
mov dword [esp], esi
call sub.cyggcc_s_1.dll__Unwind_Resume
mov dword [esp], ebx
mov esi, eax
call sub.cygstdc_6.dll___cxa_free_exception
mov dword [esp], esi
call sub.cyggcc_s_1.dll__Unwind_Resume
mov dword [esp], 8
call sub.cygstdc_6.dll___cxa_allocate_exception
mov dword [esp + 4], str.Terminfo_database_could_not_be_found.
mov dword [esp], eax
mov ebx, eax
call fcn.004510c0
mov dword [esp + 8], 0x4510b8
mov dword [esp + 4], 0x47df4c
mov dword [esp], ebx
call sub.cygstdc_6.dll___cxa_throw
mov dword [esp], ebx
mov esi, eax
call sub.cygstdc_6.dll___cxa_free_exception
mov dword [esp], esi
call sub.cyggcc_s_1.dll__Unwind_Resume
mov dword [esp], 8
call sub.cygstdc_6.dll___cxa_allocate_exception
mov dword [esp + 4], str.Unknown_terminal_type.
mov dword [esp], eax
mov ebx, eax
call fcn.004510c0
mov dword [esp + 8], 0x4510b8
mov dword [esp + 4], 0x47df4c
mov dword [esp], ebx
call sub.cygstdc_6.dll___cxa_throw
mov dword [esp], ebx
mov esi, eax
call sub.cygstdc_6.dll___cxa_free_exception
mov dword [esp], esi
call sub.cyggcc_s_1.dll__Unwind_Resume