Function at 0x4052a1
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
add rsp, 0xffffffffffffff80
mov dword [rbp + 0x20], ecx
mov qword [rbp + 0x28], rdx
call fcn.00406d30
mov qword [rbp - 8], 0
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
mov word [rbp - 0x1a], 0
mov word [rbp - 0x1c], 0
mov word [rbp - 0x3a], 0
mov word [rbp - 0x1e], 0
mov word [rbp - 0x20], 0
mov qword [rbp - 0x28], 0
mov dword [rbp - 0x2c], 0
call fcn.00402e70
mov ecx, 0x10
call fcn.00403637
mov qword [0x0040d088], rax
mov ecx, 0x10
call fcn.00403637
mov qword [0x0040d090], rax
mov ecx, 0x2000
call fcn.00403637
mov rdx, rax
lea rax, [0x0040dc48]
mov qword [rax], rdx
mov ecx, 0x2000
call fcn.00403637
mov rdx, rax
lea rax, [0x0040db10]
mov qword [rax], rdx
mov ecx, 0x208
call fcn.00403637
mov rdx, rax
lea rax, [0x0040dc40]
mov qword [rax], rdx
mov ecx, 0x208
call fcn.00403637
mov rdx, rax
lea rax, [0x0040db08]
mov qword [rax], rdx
mov ecx, 0x4a
call fcn.00403637
mov qword [0x0040d0a8], rax
mov ecx, 1
call sub.msvcrt.dll_malloc
mov rdx, rax
lea rax, [0x0040dc50]
mov qword [rax], rdx
lea rax, [0x0040dc50]
mov rax, qword [rax]
mov byte [rax], 1
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
mov dword [0x00408038], 4
cmp dword [rbp + 0x20], 1
jne 0x405568
mov rax, qword [rbp + 0x28]
mov rbx, qword [rax]
mov ecx, 0x400
call fcn.00403637
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x28]
mov qword [rax], rbx
mov ecx, 0x2000
call fcn.00403637
mov rbx, rax
mov rax, qword [rbp + 0x28]
add rax, 8
mov qword [rax], rbx
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov r9, rax
mov r8d, 0x25
mov edx, 1
lea rcx, str.Interactive_mode_requires_a_command
call sub.msvcrt.dll_fwrite
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x60
mov rcx, rax
call sub.msvcrt.dll_fflush
mov r8d, 0x2000
mov rdx, rbx
mov ecx, 0
call sub.msvcrt.dll__read
mov dword [0x0040d06c], eax
mov eax, dword [0x0040d06c]
test eax, eax
jne 0x40547e
lea rcx, str.wrong
call fcn.004034e7
mov eax, dword [0x0040d06c]
mov edx, eax
mov rcx, rbx
call fcn.00403698
mov esi, eax
test esi, esi
je 0x4054a4
mov eax, dword [0x0040d06c]
mov edx, esi
sub eax, edx
mov dword [0x0040d06c], eax
mov eax, dword [0x0040d06c]
test eax, eax
je 0x4054d2
mov eax, dword [0x0040d06c]
mov ecx, eax
movsxd rax, esi
lea rdx, [rbx + rax]
lea rax, [0x0040dc48]
mov rax, qword [rax]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
mov edx, 0xa
mov rcx, rax
call sub.msvcrt.dll_strchr
mov rbx, rax
test rbx, rbx
je 0x4054f5
mov byte [rbx], 0
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
mov edx, 0xd
mov rcx, rax
call sub.msvcrt.dll_strchr
mov rbx, rax
test rbx, rbx
je 0x405518
mov byte [rbx], 0
mov rax, qword [rbp + 0x28]
mov rbx, qword [rax + 8]
add rbx, 1
mov esi, 2
jmp 0x40555e
movzx eax, byte [rbx]
cmp al, 0x20
jne 0x405537
mov byte [rbx], 0
jmp 0x40555a
lea rax, [rbx - 1]
movzx eax, byte [rax]
test al, al
jne 0x40555a
movsxd rax, esi
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov qword [rax], rbx
add esi, 1
add rbx, 1
movzx eax, byte [rbx]
test al, al
jne 0x40552b
mov dword [rbp + 0x20], esi
jmp 0x405908
lea eax, [rsi - 0x47]
cmp eax, 0x33
ja case.0x40559a.72
mov eax, eax
lea rdx, [rax*4]
lea rax, [0x00409a84]
mov eax, dword [rdx + rax]
movsxd rdx, eax
lea rax, [0x00409a84]
add rax, rdx
jmp rax
lea rcx, str.all_A_records_NIY
call fcn.004034e7
movzx eax, word [0x0040d0b8]
add eax, 1
mov word [0x0040d0b8], ax
jmp 0x405908
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov qword [0x0040d0d8], rax
jmp 0x405908
movzx eax, word [0x0040d0c0]
add eax, 1
mov word [0x0040d0c0], ax
mov dword [rbp - 0x2c], 1
jmp 0x405908
mov rax, qword [sym.imp.KERNEL32.dll_FreeConsole]
call rax
jmp 0x405908
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_atoi
mov esi, eax
test esi, esi
je 0x405628
mov eax, esi
and eax, 0x1c
cmp eax, esi
jne 0x405628
mov dword [0x00408038], esi
jmp 0x405636
mov edx, esi
lea rcx, str.invalid_hop_pointer__d__must_be_multiple_of_4___28
call fcn.004034e7
jmp 0x405908
mov eax, dword [0x0040d068]
cmp eax, 8
jle 0x405652
lea rcx, str.too_many__g_hops
call fcn.004034e7
mov rax, qword [0x0040d098]
test rax, rax
jne 0x40566f
mov ecx, 0x50
call fcn.00403637
mov qword [0x0040d098], rax
movzx eax, word [0x0040d0c2]
movzx edx, ax
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rcx, rax
call fcn.00403760
mov qword [rbp - 0x48], rax
cmp qword [rbp - 0x48], 0
je 0x4056b4
mov rax, qword [0x0040d098]
mov edx, dword [0x0040d068]
movsxd rdx, edx
shl rdx, 3
add rdx, rax
mov rax, qword [rbp - 0x48]
mov qword [rdx], rax
mov eax, dword [0x0040d068]
add eax, 1
mov dword [0x0040d068], eax
jmp 0x405908
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
lea rcx, str.This_is_a_minimal_version
call fcn.004034e7
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_atoi
movzx eax, ax
mov dword [0x0040d0bc], eax
mov eax, dword [0x0040d0bc]
imul eax, eax, 0x3e8
mov dword [0x0040d0bc], eax
mov eax, dword [0x0040d0bc]
test eax, eax
jne 0x405733
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.invalid_interval_time__s
call fcn.004034e7
jmp 0x405908
movzx eax, word [0x0040d0c0]
add eax, 1
mov word [0x0040d0c0], ax
jmp 0x405908
movzx eax, word [0x0040d0c2]
add eax, 1
mov word [0x0040d0c2], ax
jmp 0x405908
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov qword [0x0040d0b0], rax
movzx eax, word [0x0040d0c4]
add eax, 1
mov word [0x0040d0c4], ax
jmp 0x405908
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.00403ac7
mov word [rbp - 0x1a], ax
cmp word [rbp - 0x1a], 0
jne 0x4057c6
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.invalid_local_port__s
call fcn.004034e7
jmp 0x405908
movzx eax, word [0x0040d0c6]
add eax, 1
mov word [0x0040d0c6], ax
jmp 0x405908
movzx eax, word [0x0040d0c2]
movzx edx, ax
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rcx, rax
call fcn.00403760
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
add rax, 0x1c0
mov qword [rbp - 0x10], rax
jmp 0x405908
movzx eax, word [0x0040d0e0]
add eax, 1
mov word [0x0040d0e0], ax
jmp 0x405908
movzx eax, word [0x0040d0d2]
add eax, 1
mov word [0x0040d0d2], ax
jmp 0x405908
movzx eax, word [0x0040d0c8]
add eax, 1
mov word [0x0040d0c8], ax
jmp 0x405908
movzx eax, word [0x0040d0ca]
add eax, 1
mov word [0x0040d0ca], ax
jmp 0x405908
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_atoi
mov dword [0x0040d0cc], eax
mov eax, dword [0x0040d0cc]
test eax, eax
jne 0x4058a7
mov rax, qword [0x00409fc0]
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.invalid_wait_time__s
call fcn.004034e7
mov ecx, 8
call fcn.00403637
mov qword [0x0040d078], rax
mov ecx, 8
call fcn.00403637
mov qword [0x0040d080], rax
mov rax, qword [0x0040d078]
mov edx, dword [0x0040d0cc]
mov dword [rax], edx
jmp 0x405908
movzx eax, word [0x0040d0d0]
add eax, 1
mov word [0x0040d0d0], ax
jmp 0x405908
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
lea rcx, str.nc__h_for_help
call fcn.004034e7
mov rax, qword [rbp + 0x28]
lea r8, str.ade:g:G:hi:lLno:p:rs:tcuvw:z
mov rdx, rax
mov ecx, dword [rbp + 0x20]
call fcn.004022a8
mov esi, eax
cmp esi, 0xffffffff
jne 0x40556d
movzx eax, word [0x0040d0c6]
test ax, ax
je 0x405954
mov ecx, 0
call sub.msvcrt.dll__time64
mov ecx, eax
call sub.msvcrt.dll_srand
mov ecx, 0x10000
call fcn.00403637
mov qword [rbp - 0x28], rax
mov rax, qword [0x0040d0d8]
test rax, rax
je 0x40597d
mov ecx, 0
call sub.msvcrt.dll__close
mov word [0x0040d0c4], 0
mov dword [0x0040d064], 0
movzx eax, word [0x0040d0c4]
test ax, ax
je 0x4059da
mov rax, qword [0x0040d0b0]
mov r8d, 0x1b4
mov edx, 0x301
mov rcx, rax
call sub.msvcrt.dll__open
mov dword [0x0040d064], eax
mov eax, dword [0x0040d064]
test eax, eax
jg 0x4059c9
mov rax, qword [0x0040d0b0]
mov rdx, rax
lea rcx, str.cant_open__s
call fcn.004034e7
mov ecx, 0x64
call fcn.00403637
mov qword [0x0040d0b0], rax
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x405a2f
movzx eax, word [0x0040d0c2]
movzx edx, ax
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rcx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rcx
mov rax, qword [rax]
mov rcx, rax
call fcn.00403760
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x405a53
mov rax, qword [rbp - 8]
add rax, 0x1c0
test rax, rax
je 0x405a53
mov rax, qword [rbp - 8]
add rax, 0x1c0
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
je 0x405a6f
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
lea edx, [rax + 1]
mov rax, qword [0x00409fd0]
mov dword [rax], edx
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx eax, word [0x0040d0c0]
test ax, ax
je 0x405bc5
mov word [rbp - 0x20], 0
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x405b17
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.00403ac7
mov word [rbp - 0x20], ax
cmp word [rbp - 0x20], 0
jne 0x405b17
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.Bad_data:__s
call fcn.004034e7
movzx r8d, word [rbp - 0x1a]
movzx edx, word [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x18]
mov r9d, r8d
mov r8, rcx
mov rcx, rax
call fcn.004041aa
mov dword [0x00408020], eax
mov eax, dword [0x00408020]
test eax, eax
jle 0x405bb9
mov rax, qword [0x0040d0d8]
test rax, rax
je 0x405b62
mov eax, dword [0x00408020]
cdqe
mov rcx, rax
call fcn.0040258a
mov rax, qword [0x0040d0d8]
test rax, rax
jne 0x405b7d
mov eax, dword [0x00408020]
mov ecx, eax
call fcn.00404b1d
mov esi, eax
movzx eax, word [0x0040d0ca]
cmp ax, 1
jbe 0x405ba7
mov edx, dword [0x0040d070]
mov eax, dword [0x0040d074]
mov r8d, edx
mov edx, eax
lea rcx, str._sent__d__rcvd__d
call fcn.004033f9
cmp dword [rbp - 0x2c], 1
jne 0x405bb2
jmp 0x4053d5
mov ecx, esi
call sub.msvcrt.dll_exit
lea rcx, str.Cannot_connect
call fcn.004034e7
cmp qword [rbp - 0x18], 0
jne 0x405bd8
lea rcx, str.Missing_dst
call fcn.004034e7
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
jne 0x405c06
lea rcx, str.The_prt_is_missing
call fcn.004034e7
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
add rax, 1
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x405c35
mov word [0x0040803c], 0
movzx eax, word [rbp - 0x1a]
mov word [rbp - 0x1c], ax
jmp 0x405f99
mov word [rbp - 0x3a], 0
movzx eax, word [rbp - 0x3a]
mov word [rbp - 0x1e], ax
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov edx, 0x2d
mov rcx, rax
call sub.msvcrt.dll_strchr
mov rbx, rax
test rbx, rbx
je 0x405cb0
mov byte [rbx], 0
add rbx, 1
mov edx, 0
mov rcx, rbx
call fcn.00403ac7
mov word [rbp - 0x1e], ax
cmp word [rbp - 0x1e], 0
jne 0x405cb0
mov rdx, rbx
lea rcx, str.Bad_prt__s
call fcn.004034e7
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.00403ac7
mov word [rbp - 0x3a], ax
cmp word [rbp - 0x3a], 0
jne 0x405d11
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.Bad_prt__s
call fcn.004034e7
movzx eax, word [rbp - 0x1e]
cmp ax, word [rbp - 0x3a]
jbe 0x405d64
mov word [0x0040803c], 0
movzx eax, word [rbp - 0x1e]
mov word [rbp - 0x20], ax
movzx eax, word [0x0040d0c6]
test ax, ax
je 0x405d6c
movzx ecx, word [rbp - 0x1e]
movzx edx, word [rbp - 0x3a]
mov rax, qword [rbp - 0x28]
mov r8d, ecx
mov rcx, rax
call fcn.00403d63
mov rax, qword [rbp - 0x28]
mov rcx, rax
call fcn.00403cd3
mov word [rbp - 0x20], ax
jmp 0x405f76
movzx eax, word [rbp - 0x3a]
mov word [rbp - 0x20], ax
jmp 0x405f76
cmp word [rbp - 0x1a], 0
jne 0x405d9b
movzx eax, word [0x0040d0c6]
test ax, ax
je 0x405d9b
call sub.msvcrt.dll_rand
mov word [rbp - 0x1c], ax
cmp word [rbp - 0x1c], 0x1fff
ja 0x405d9b
add word [rbp - 0x1c], 0x2000
movzx eax, word [rbp - 0x20]
mov edx, eax
mov ecx, 0
call fcn.00403ac7
mov word [rbp - 0x20], ax
movzx r8d, word [rbp - 0x1c]
movzx edx, word [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x18]
mov r9d, r8d
mov r8, rcx
mov rcx, rax
call fcn.00403de9
mov dword [0x00408020], eax
mov eax, dword [0x00408020]
test eax, eax
jle 0x405e0d
movzx eax, word [0x0040d0d0]
test ax, ax
je 0x405e0d
movzx eax, word [0x0040d0c8]
test ax, ax
je 0x405e0d
mov eax, dword [0x00408020]
mov rdx, qword [rbp - 0x18]
mov ecx, eax
call fcn.004046f8
mov dword [0x00408020], eax
mov eax, dword [0x00408020]
test eax, eax
jle 0x405ea0
mov esi, 0
mov rax, qword [0x0040d0a8]
mov r8, rax
movzx edx, word [rbp - 0x20]
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x100]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x20], r8
mov r9d, edx
mov r8, rcx
mov rdx, rax
lea rcx, str._s___s___d___s__open
call fcn.004033f9
mov rax, qword [0x0040d0d8]
test rax, rax
je 0x405e73
mov eax, dword [0x00408020]
cdqe
mov rcx, rax
call fcn.0040258a
movzx eax, word [0x0040d0d0]
test ax, ax
jne 0x405f05
mov rax, qword [0x0040d0d8]
test rax, rax
jne 0x405f05
mov eax, dword [0x00408020]
mov ecx, eax
call fcn.00404b1d
mov esi, eax
jmp 0x405f05
mov esi, 1
movzx eax, word [0x0040803c]
test ax, ax
jne 0x405ece
movzx eax, word [0x0040d0ca]
cmp ax, 1
ja 0x405ece
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
cmp eax, 0x274d
je 0x405f05
mov rax, qword [0x0040d0a8]
mov r8, rax
movzx edx, word [rbp - 0x20]
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x100]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x20], r8
mov r9d, edx
mov r8, rcx
mov rdx, rax
lea rcx, str._s___s___d___s_
call fcn.004033f9
mov eax, dword [0x00408020]
cdqe
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [0x00408020]
cdqe
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, dword [0x0040d0bc]
test eax, eax
je 0x405f4d
mov eax, dword [0x0040d0bc]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__sleep]
call rax
movzx eax, word [0x0040d0c6]
test ax, ax
je 0x405f6b
mov rax, qword [rbp - 0x28]
mov rcx, rax
call fcn.00403cd3
mov word [rbp - 0x20], ax
jmp 0x405f76
movzx eax, word [rbp - 0x20]
sub eax, 1
mov word [rbp - 0x20], ax
movzx eax, word [rbp - 0x3a]
cmp ax, word [rbp - 0x20]
jbe 0x405d71
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
lea edx, [rax + 1]
mov rax, qword [0x00409fd0]
mov dword [rax], edx
mov rax, qword [0x00409fd0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
jne 0x405c42
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx eax, word [0x0040d0ca]
cmp ax, 1
jbe 0x405ff8
mov edx, dword [0x0040d070]
mov eax, dword [0x0040d074]
mov r8d, edx
mov edx, eax
lea rcx, str.sent__d__rcvd__d
call fcn.004033f9
mov rax, qword [sym.imp.WSOCK32.dll_WSACleanup]
call rax
cmp dword [rbp - 0x2c], 1
jne 0x40600c
jmp 0x4053d5
movzx eax, word [0x0040803c]
test ax, ax
je 0x40601f
mov ecx, esi
call sub.msvcrt.dll_exit
mov ecx, 0
call sub.msvcrt.dll_exit
nop
nop
nop
nop
nop
nop
nop
jmp qword [sym.imp.KERNEL32.dll_Sleep]