Function at 0x402790
Capabilities:
Move file
Terminate process
Write file on windows

Disassembly:
push ebp
mov eax, 0x427c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00418d04
mov ebx, dword [0x423d34]
xor edx, edx
xor eax, eax
mov dword [ebp - 0x424c], edx
xor edi, edi
xor esi, esi
mov dword [ebp - 0x4250], eax
mov ecx, dword [ebx + 8]
xor ebx, ebx
mov dword [ebp - 0x4254], edi
mov dword [ebp - 0x4244], ecx
mov ecx, dword [0x423030]
mov dword [ebp - 0x4258], esi
mov dword [ebp - 0x425c], ebx
test ecx, ecx
jne 0x40283b
mov edx, dword [ebp + 8]
mov esi, 0x400
movzx edi, word [edx + 8]
mov dword [esp], str._.ssh_known_hosts
mov dword [esp + 4], edi
call fcn.0040b5f0
mov dword [ebp - 0x4240], eax
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], 0x423d7c
call fcn.00416650
cmp eax, 0x3ff
ja 0x402e5a
mov ebx, dword [ebp - 0x4240]
mov dword [esp], ebx
call fcn.0040ced0
mov ecx, 1
mov dword [0x423030], ecx
mov dword [esp], 0x423d7c
mov eax, 0x41bc0e
mov dword [esp + 4], eax
call sub.msys_1.0.dll_fopen
test eax, eax
mov edi, eax
je 0x403021
mov edx, dword [0x42301c]
test edx, edx
je 0x4029b3
lea esi, [ebp - 0x4018]
nop
mov dword [esp + 8], edi
mov eax, 0x4000
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msys_1.0.dll_fgets
test eax, eax
je 0x4028dd
mov dword [esp], esi
mov eax, 0xa
mov dword [esp + 4], eax
call sub.msys_1.0.dll_strchr
mov dword [ebp - 0x4240], eax
test eax, eax
je 0x402a23
inc dword [ebp - 0x4254]
mov edx, dword [ebp - 0x424c]
test edx, edx
je 0x402a60
mov dword [esp + 8], edi
xor eax, eax
mov dword [ebp - 0x424c], eax
mov eax, 0x4000
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msys_1.0.dll_fgets
test eax, eax
jne 0x402889
mov dword [esp], edi
call sub.msys_1.0.dll_fclose
mov esi, dword [ebp - 0x4258]
test esi, esi
jne 0x40306c
mov esi, dword [ebp - 0x4250]
test esi, esi
je 0x4029a7
mov edi, dword [ebp - 0x4244]
lea esi, [ebp - 0x4238]
mov dword [esp], edi
call sub.msys_1.0.dll_fclose
mov dword [esp], esi
call sub.msys_1.0.dll_unlink
inc eax
je 0x402c17
mov dword [esp + 4], esi
mov dword [esp], 0x423d7c
call sub.msys_1.0.dll_link
inc eax
je 0x403040
mov eax, 0x423d7c
lea ebx, [ebp - 0x4128]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msys_1.0.dll_rename
inc eax
je 0x403129
mov ecx, dword [0x423d34]
mov eax, 0x423d7c
mov ebx, str._s_updated._n
mov dword [esp + 4], ebx
mov edi, str.Original_contents_retained_as__s_n
mov dword [esp + 8], eax
mov edx, dword [ecx + 0xc]
mov dword [esp], edx
call sub.msys_1.0.dll_fprintf
mov dword [esp + 8], esi
mov eax, dword [0x423d34]
mov dword [esp + 4], edi
mov ebx, dword [eax + 0xc]
mov dword [esp], ebx
call sub.msys_1.0.dll_fprintf
mov ecx, dword [ebp - 0x425c]
test ecx, ecx
jne 0x402bca
mov dword [esp], 0
call sub.msys_1.0.dll_exit
mov ecx, dword [0x423018]
test ecx, ecx
jne 0x4029cb
mov ebx, dword [0x423020]
test ebx, ebx
je 0x402868
mov esi, 0x103
mov eax, 0x423d7c
mov dword [esp + 8], esi
lea esi, [ebp - 0x4128]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00416650
cmp eax, 0x102
ja 0x402a17
mov dword [esp], esi
mov ecx, 0x103
mov edx, str..XXXXXXXXXX
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call fcn.004165c0
cmp eax, 0x102
jbe 0x402cfb
mov dword [esp], str.known_hosts_path_too_long
call fcn.00411b20
mov dword [esp + 8], esi
mov ebx, dword [ebp - 0x4254]
mov dword [esp], str.line__d_too_long:__.40s...
inc ebx
mov dword [esp + 4], ebx
call fcn.0040a680
mov ecx, 1
mov dword [ebp - 0x424c], ecx
mov ecx, 1
mov dword [ebp - 0x4258], ecx
jmp 0x402870
mov byte [eax], 0
mov ebx, esi
mov dword [ebp - 0x4240], esi
movzx edx, byte [esi]
cmp dl, 0x20
sete cl
cmp dl, 9
sete al
or eax, ecx
test al, 1
je 0x402aaf
lea ecx, [esi + 1]
lea esi, [esi]
lea edi, [edi]
mov dword [ebp - 0x4240], ecx
mov ebx, ecx
lea ecx, [ecx + 1]
movzx eax, byte [ecx - 1]
cmp al, 0x20
sete dl
cmp al, 9
sete al
or eax, edx
test al, 1
jne 0x402a90
movzx ecx, byte [ebx]
test cl, cl
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
je 0x402af1
mov ecx, dword [ebp - 0x4250]
test ecx, ecx
je 0x402870
mov dword [esp + 8], ebx
mov ebx, dword [ebp - 0x4244]
mov eax, 0x41ba9c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msys_1.0.dll_fprintf
jmp 0x402870
cmp cl, 0x23
je 0x402ac3
mov dword [esp], ebx
mov ecx, 0xf
mov edx, 0x41bd0c
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call sub.msys_1.0.dll_strncasecmp
test eax, eax
je 0x402b91
mov ecx, dword [ebp - 0x4240]
xor ebx, ebx
mov dword [ebp - 0x4260], ebx
mov dword [ebp - 0x423c], ecx
mov ebx, ecx
movzx ecx, byte [ecx]
test cl, cl
setne al
xor edx, edx
cmp cl, 0x20
setne dl
test eax, edx
je 0x402b63
nop
cmp cl, 9
je 0x402b63
mov edx, ebx
inc ebx
mov dword [ebp - 0x423c], ebx
movzx ecx, byte [edx + 1]
test cl, cl
setne dl
xor eax, eax
cmp cl, 0x20
setne al
test eax, edx
jne 0x402b40
cmp byte [ebx], 0
je 0x402b72
cmp byte [ebx + 1], 0
jne 0x402c48
mov dword [esp + 8], esi
mov ecx, dword [ebp - 0x4254]
mov dword [esp], str.line__d_missing_key:__.40s...
mov dword [esp + 4], ecx
call fcn.0040a680
jmp 0x402a49
mov ecx, dword [ebp - 0x4240]
movzx edx, byte [ecx + 0xf]
cmp dl, 0x20
sete bl
cmp dl, 9
sete al
or eax, ebx
test al, 1
je 0x402b1a
mov eax, 1
add ecx, 0x10
mov dword [ebp - 0x4260], eax
mov dword [ebp - 0x4240], ecx
jmp 0x402b22
mov dword [esp + 8], esi
mov eax, dword [0x423d34]
mov esi, str.WARNING:__s_contains_unhashed_entries_n
mov dword [esp + 4], esi
mov edi, 0x30
mov esi, 1
mov ebx, dword [eax + 0xc]
mov dword [esp], ebx
call sub.msys_1.0.dll_fprintf
mov ecx, dword [0x423d34]
mov edx, dword [ecx + 0xc]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp + 0xc], edx
mov dword [esp], str.Delete_this_file_to_ensure_privacy_of_hostnames_n
call sub.msys_1.0.dll_fwrite
jmp 0x4029a7
call sub.msys_1.0.dll___errno
cmp dword [eax], 2
je 0x402924
call sub.msys_1.0.dll___errno
mov edx, dword [eax]
mov dword [esp], edx
call sub.msys_1.0.dll_strerror
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], str.unlink__.100s:__s
call fcn.00411b20
mov byte [ebx], 0
mov ebx, dword [ebp - 0x423c]
mov dword [esp], 0
inc ebx
mov dword [ebp - 0x423c], ebx
call fcn.00406580
mov dword [ebp - 0x4248], eax
lea edx, [ebp - 0x423c]
mov eax, dword [ebp - 0x4248]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00407300
dec eax
je 0x402dc0
mov dword [ebp - 0x423c], ebx
mov eax, dword [ebp - 0x4248]
mov dword [esp], eax
call fcn.004067f0
mov dword [esp], 5
call fcn.00406580
mov dword [ebp - 0x4248], eax
lea ecx, [ebp - 0x423c]
mov ebx, dword [ebp - 0x4248]
mov dword [esp + 4], ecx
mov dword [esp], ebx
call fcn.00407300
dec eax
je 0x402dc0
mov dword [esp + 8], esi
mov ebx, dword [ebp - 0x4254]
mov dword [esp], str.line__d_invalid_key:__.40s...
mov dword [esp + 4], ebx
call fcn.0040a680
mov edx, dword [ebp - 0x4248]
mov dword [esp], edx
call fcn.004067f0
jmp 0x402a49
mov ebx, 0x423d7c
mov eax, 0x103
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x4238]
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00416650
cmp eax, 0x102
ja 0x402a17
mov dword [esp], ebx
mov ecx, 0x103
mov edx, str..old
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call fcn.004165c0
cmp eax, 0x102
ja 0x402a17
mov dword [esp], 0x3f
call sub.msys_1.0.dll_umask
mov dword [esp], esi
call fcn.004162e0
cmp eax, 0xffffffff
je 0x403288
mov dword [esp], eax
mov edx, 0x41be4e
mov ebx, 1
mov dword [esp + 4], edx
call sub.msys_1.0.dll_fdopen
mov dword [ebp - 0x4244], eax
test eax, eax
mov dword [ebp - 0x4250], ebx
jne 0x402868
call sub.msys_1.0.dll___errno
mov edi, dword [eax]
mov dword [esp], esi
call sub.msys_1.0.dll_unlink
mov dword [esp], edi
call sub.msys_1.0.dll_strerror
mov dword [esp + 4], eax
mov dword [esp], str.fdopen:__s
call fcn.00411b20
lea esi, [esi]
mov ebx, dword [ebp - 0x4240]
cmp byte [ebx], 0x7c
je 0x402e66
mov eax, dword [0x42301c]
test eax, eax
jne 0x402de6
mov ecx, dword [0x423020]
test ecx, ecx
je 0x402f51
mov dword [esp], ebx
call sub.msys_1.0.dll_strlen
mov dword [esp + 4], ebx
mov ebx, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp], ebx
xor ebx, ebx
call fcn.0040f3f0
mov ecx, dword [0x42301c]
cmp eax, 1
sete bl
test ecx, ecx
setne dl
xor eax, eax
test ebx, ebx
setne al
test eax, edx
jne 0x4030a9
mov ecx, dword [0x423020]
test ecx, ecx
setne al
xor edx, edx
test ebx, ebx
sete dl
test edx, eax
je 0x402e47
mov ebx, dword [ebp - 0x4260]
test ebx, ebx
je 0x40316a
mov ebx, dword [ebp - 0x4248]
mov dword [esp], ebx
call fcn.004067f0
jmp 0x402870
mov dword [esp], str.Specified_known_hosts_path_too_long
call fcn.00411b20
mov ecx, dword [0x42301c]
test ecx, ecx
jne 0x402e7d
mov eax, dword [0x423020]
test eax, eax
je 0x40319d
mov dword [esp], ebx
call sub.msys_1.0.dll_strlen
mov dword [esp + 8], eax
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], ebx
mov dword [esp], edx
call fcn.0040f8c0
test eax, eax
je 0x40321e
mov dword [esp], eax
mov ebx, dword [ebp - 0x4240]
mov dword [esp + 4], ebx
xor ebx, ebx
call sub.msys_1.0.dll_strcmp
mov ecx, dword [0x42301c]
test eax, eax
sete bl
test ecx, ecx
setne dl
xor eax, eax
test ebx, ebx
setne al
test eax, edx
je 0x402e23
mov edx, dword [ebp - 0x4248]
mov dword [esp], edx
call fcn.00407a40
mov ecx, dword [ebp - 0x4260]
mov edx, str.__CA_key_
test ecx, ecx
jne 0x402ef5
mov edx, 0x41ba1b
mov dword [esp + 0xc], eax
mov ecx, dword [ebp - 0x4254]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], str._Host__s_found:_line__d_type__s_s_n
call sub.msys_1.0.dll_printf
mov eax, dword [ebp - 0x4248]
xor edx, edx
mov ecx, dword [ebp - 0x4260]
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4240]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x4244]
mov dword [esp], ecx
call fcn.00402600
jmp 0x402e23
mov edx, dword [0x423018]
test edx, edx
je 0x402e47
mov edx, 0x41beb0
lea eax, [ebp - 0x4240]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msys_1.0.dll_strsep
mov dword [ebp - 0x4264], eax
test eax, eax
je 0x403200
cmp byte [eax], 0
je 0x403200
mov ecx, dword [ebp - 0x4260]
test ecx, ecx
jne 0x4031cb
mov edx, dword [ebp - 0x4264]
mov ecx, 0x41beb2
mov dword [esp + 4], ecx
mov dword [esp], edx
call sub.msys_1.0.dll_strcspn
mov ebx, eax
mov eax, dword [ebp - 0x4264]
mov dword [esp], eax
call sub.msys_1.0.dll_strlen
cmp ebx, eax
je 0x403210
mov ebx, dword [ebp - 0x4264]
mov ecx, str.Warning:_ignoring_host_name_with_metacharacters:__.64s_n
mov edx, dword [0x423d34]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov eax, dword [edx + 0xc]
xor ebx, ebx
mov dword [esp], eax
call sub.msys_1.0.dll_fprintf
mov dword [esp + 0x10], ebx
xor eax, eax
mov dword [esp + 0xc], eax
mov ebx, dword [ebp - 0x4248]
mov ecx, dword [ebp - 0x4264]
mov edx, dword [ebp - 0x4244]
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.00402600
jmp 0x402f5f
call sub.msys_1.0.dll___errno
mov esi, dword [eax]
mov dword [esp], esi
call sub.msys_1.0.dll_strerror
mov dword [esp + 4], eax
mov dword [esp], str.fopen:__s
call fcn.00411b20
call sub.msys_1.0.dll___errno
mov ebx, dword [eax]
mov dword [esp], ebx
call sub.msys_1.0.dll_strerror
mov dword [esp + 0xc], eax
mov ecx, 0x423d7c
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov dword [esp], str.link__.100s_to__.100s:__s
call fcn.00411b20
mov ecx, dword [0x423d34]
mov eax, 0x423d7c
mov ebx, str._s_is_not_a_valid_known_hosts_file._n
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov edx, dword [ecx + 0xc]
mov dword [esp], edx
call sub.msys_1.0.dll_fprintf
mov edi, dword [ebp - 0x4250]
test edi, edi
jne 0x40323d
mov dword [esp], 1
call sub.msys_1.0.dll_exit
mov edx, dword [ebp - 0x4248]
mov dword [esp], edx
call fcn.00407a40
mov ecx, dword [ebp - 0x4260]
mov edx, str.__CA_key_
test ecx, ecx
jne 0x4030cb
mov edx, 0x41ba1b
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x4254]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [esp], str._Host__s_found:_line__d_type__s_s_n
mov dword [esp + 4], eax
call sub.msys_1.0.dll_printf
mov ecx, dword [0x423018]
test ecx, ecx
setne dl
xor eax, eax
cmp dword [ebp - 0x4260], 0
mov ecx, dword [ebp - 0x4260]
sete al
mov dword [esp + 0xc], ecx
and eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x4248]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
jmp 0x402f3a
call sub.msys_1.0.dll___errno
mov edx, dword [eax]
mov edi, 0x423d7c
mov dword [esp], edx
call sub.msys_1.0.dll_strerror
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], str.rename__s__to___s_:__s
call fcn.0040a680
mov dword [esp], ebx
call sub.msys_1.0.dll_unlink
mov dword [esp], esi
call sub.msys_1.0.dll_unlink
jmp 0x40309d
mov edx, dword [ebp - 0x4248]
xor ebx, ebx
xor ecx, ecx
mov dword [esp + 0x10], ebx
mov eax, dword [ebp - 0x4240]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4244]
mov dword [esp], eax
call fcn.00402600
jmp 0x402e47
mov edx, dword [0x423018]
test edx, edx
je 0x402e47
mov dword [esp + 4], ebx
mov ecx, dword [ebp - 0x4260]
xor edx, edx
mov dword [esp + 0x10], edx
mov eax, dword [ebp - 0x4248]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
jmp 0x40318a
mov ebx, dword [ebp - 0x4264]
mov ecx, str.Warning:_ignoring_CA_key_for_host:__.64s_n
mov edx, dword [0x423d34]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov eax, dword [edx + 0xc]
xor ebx, ebx
mov dword [esp], eax
call sub.msys_1.0.dll_fprintf
mov dword [esp + 0x10], ebx
mov eax, dword [ebp - 0x4260]
jmp 0x402ff6
mov ecx, 1
mov dword [ebp - 0x425c], ecx
jmp 0x402e47
mov eax, 1
mov dword [esp + 0x10], eax
jmp 0x402ff4
mov dword [esp + 8], esi
mov ebx, dword [ebp - 0x4254]
mov dword [esp], str.line__d:_invalid_hashed_name:__.64s...
mov dword [esp + 4], ebx
call fcn.0040a680
jmp 0x402a49
mov eax, dword [0x423d34]
mov ecx, 0x3a
mov edx, 1
lea esi, [ebp - 0x4128]
mov ebx, dword [eax + 0xc]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp], str.Not_replacing_existing_known_hosts_file_because_of_errors_n
call sub.msys_1.0.dll_fwrite
mov edi, dword [ebp - 0x4244]
mov dword [esp], edi
call sub.msys_1.0.dll_fclose
mov dword [esp], esi
call sub.msys_1.0.dll_unlink
jmp 0x40309d
call sub.msys_1.0.dll___errno
mov edi, dword [eax]
mov dword [esp], edi
call sub.msys_1.0.dll_strerror
mov dword [esp + 4], eax
mov dword [esp], str.mkstemp:__s
jmp 0x402db4