Function at 0x4018a0
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, method.std::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___.append_wchar_t_const__unsigned_int_
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp], 0x476544
mov ebx, dword [esp + 0x50]
call sub.cygwin1.dll_wcslen
add eax, eax
mov dword [esp + 0x18], eax
je 0x40191d
sar eax, 1
mov dword [esp + 4], 0
mov edi, eax
lea eax, [esp + 0x26]
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.004511f0
mov esi, eax
lea ebp, [eax + 0xc]
cmp edi, 1
je 0x401b78
test edi, edi
je 0x401911
mov dword [esp + 8], edi
mov dword [esp + 4], 0x476544
mov dword [esp], ebp
call sub.cygwin1.dll_wmemcpy
cmp esi, sym.imp.cygstdc_6.dll_std::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::_Rep::_S_empty_rep_storage
jne 0x401b88
lea edi, [esp + 0x28]
lea eax, [ebx + 0x1b4]
mov dword [esp + 0x28], ebp
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.004511c8
call fcn.0040bc40
add eax, 0x3e8
mov byte [ebx + 0x1b8], 0
mov dword [ebx + 0x1c0], eax
mov eax, dword [esp + 0x28]
adc edx, 0
mov dword [ebx + 0x1c4], edx
mov byte [ebx + 0x1c8], 1
lea edx, [eax - 0xc]
cmp eax, method.std::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___.append_wchar_t_const__unsigned_int_
jne 0x401c20
call fcn.0040bc40
mov dword [ebx + 0x1a0], eax
mov dword [ebx + 0x1a4], edx
mov dword [esp], 0x476544
call sub.cygwin1.dll_wcslen
mov ecx, method.std::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___.append_wchar_t_const__unsigned_int_
add eax, eax
mov dword [esp + 0x18], eax
je 0x4019f0
sar eax, 1
mov dword [esp + 4], 0
mov esi, eax
lea eax, [esp + 0x26]
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.004511f0
mov ebp, eax
lea ecx, [eax + 0xc]
cmp esi, 1
je 0x401b68
test esi, esi
je 0x4019e4
mov dword [esp], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], 0x476544
mov dword [esp + 0x1c], ecx
call sub.cygwin1.dll_wmemcpy
mov ecx, dword [esp + 0x1c]
cmp ebp, sym.imp.cygstdc_6.dll_std::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::_Rep::_S_empty_rep_storage
jne 0x401ba8
lea eax, [ebx + 0x240]
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [esp + 0x28], ecx
call fcn.004046c0
mov eax, dword [esp + 0x28]
lea edx, [eax - 0xc]
cmp eax, method.std::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___.append_wchar_t_const__unsigned_int_
jne 0x401bc8
mov dword [esp], ebx
call fcn.00401790
lea eax, [ebx + 0x254]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.00415750
sub esp, 4
mov eax, dword [esp + 0x28]
mov dword [esp + 8], 0xffffffff
mov dword [esp], 1
mov dword [esp + 4], eax
call fcn.0041e7a0
mov eax, dword [esp + 0x28]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x401bf0
lea eax, [ebx + 0x20]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp], 0
call sub.cygwin1.dll_tcsetattr
test eax, eax
js 0x401c47
mov eax, dword [ebx + 0x250]
test eax, eax
je 0x401b0e
mov eax, dword [eax + 0x34c]
mov edx, dword [eax + 0x14]
or edx, dword [eax + 0x10]
jne 0x401b30
mov edi, dword [ebx + 4]
mov esi, dword [ebx]
call sub.cygwin1.dll___getreent
mov dword [esp + 4], str._nmosh_did_not_make_a_successful_connection_to__s:_s._n
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov ebx, dword [ebx + 4]
call sub.cygwin1.dll___getreent
mov dword [esp + 4], str.Please_verify_that_UDP_port__s_is_not_firewalled_and_can_reach_the_server._n_n
mov dword [esp + 8], ebx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x6e
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], str._By_default__mosh_uses_a_UDP_port_between_60000_and_61000._The__p_option_nselects_a_specific_UDP_port_number.__n
call sub.cygwin1.dll_fwrite
mov eax, dword [esp + 0x2c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x401c5f
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [ebx + 0x267], 0
jne 0x401b0e
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x6f
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], str._n_nmosh_did_not_shut_down_cleanly._Please_note_that_the_nmosh_server_process_may_still_be_running_on_the_server._n
call sub.cygwin1.dll_fwrite
jmp 0x401b0e
xor eax, eax
mov word [ebp + 0xc], ax
jmp 0x4019e4
xor ecx, ecx
mov word [eax + 0xc], cx
jmp 0x401911
mov eax, dword [esp + 0x18]
xor edx, edx
mov dword [esi + 8], 0
mov dword [esi], edi
mov word [esi + eax + 0xc], dx
jmp 0x40191d
mov eax, dword [esp + 0x18]
xor edx, edx
mov dword [ebp + 8], 0
mov dword [ebp], esi
mov word [ebp + eax + 0xc], dx
jmp 0x4019f0
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x401a18
lea eax, [esp + 0x27]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.004511f8
jmp 0x401a18
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x401a63
lea eax, [esp + 0x27]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x401a63
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x401970
lea eax, [esp + 0x27]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.004511f8
jmp 0x401970
mov dword [esp], str.tcsetattr
call sub.cygwin1.dll_perror
mov dword [esp], 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___stack_chk_fail
mov ebx, eax
jmp 0x46bea4