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

Disassembly:
push rbp
mov rbp, rsp
push rsi
push rbx
add rsp, 0xffffffffffffff80
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call fcn.00406e00
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x48], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x28], 0
mov word [rbp - 0x2a], 0
mov word [rbp - 0x2c], 0
mov word [rbp - 0x4a], 0
mov word [rbp - 0x2e], 0
mov word [rbp - 0x30], 0
mov qword [rbp - 0x38], 0
mov dword [rbp - 0x3c], 0
call fcn.00402f70
mov ecx, 0x10
call fcn.0040371e
mov qword [0x0040b098], rax
mov ecx, 0x10
call fcn.0040371e
mov qword [0x0040b0a0], rax
mov ecx, 0x2000
call fcn.0040371e
mov qword [0x0040bba8], rax
mov ecx, 0x2000
call fcn.0040371e
mov qword [0x0040ba90], rax
mov ecx, 0x208
call fcn.0040371e
mov qword [0x0040bba0], rax
mov ecx, 0x208
call fcn.0040371e
mov qword [0x0040ba88], rax
mov ecx, 0x4a
call fcn.0040371e
mov qword [0x0040b0b8], rax
mov ecx, 1
call sub.msvcrt.dll_malloc
mov qword [0x0040bbb0], rax
mov rax, qword [0x0040bbb0]
mov byte [rax], 1
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
mov dword [0x00408028], 4
jmp 0x40539b
nop
jmp 0x40539b
nop
cmp dword [rbp + 0x10], 1
jne 0x4058bb
mov rax, qword [rbp + 0x18]
mov rbx, qword [rax]
mov ecx, 0x400
call fcn.0040371e
mov qword [rbp + 0x18], rax
mov rax, qword [rbp + 0x18]
mov qword [rax], rbx
mov ecx, 0x2000
call fcn.0040371e
mov rbx, rax
mov rax, qword [rbp + 0x18]
add rax, 8
mov qword [rax], rbx
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
lea rdx, [rax + 0x60]
lea rax, str.Cmd_line:
mov r9, rdx
mov r8d, 0xa
mov edx, 1
mov rcx, rax
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 [0x0040b07c], eax
mov eax, dword [0x0040b07c]
test eax, eax
jne 0x405447
lea rcx, str.wrong
call fcn.004035db
mov eax, dword [0x0040b07c]
mov edx, eax
mov rcx, rbx
call fcn.0040377b
mov esi, eax
test esi, esi
je 0x405471
mov edx, dword [0x0040b07c]
mov eax, esi
mov ecx, edx
sub ecx, eax
mov eax, ecx
mov dword [0x0040b07c], eax
mov eax, dword [0x0040b07c]
test eax, eax
je 0x40549c
mov eax, dword [0x0040b07c]
mov ecx, eax
movsxd rax, esi
lea rdx, [rbx + rax]
mov rax, qword [0x0040bba8]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp + 0x18]
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 0x4054bf
mov byte [rbx], 0
mov rax, qword [rbp + 0x18]
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 0x4054e2
mov byte [rbx], 0
mov rax, qword [rbp + 0x18]
add rax, 8
mov rbx, qword [rax]
add rbx, 1
mov esi, 2
jmp 0x405524
movzx eax, byte [rbx]
cmp al, 0x20
jne 0x405504
mov byte [rbx], 0
jmp 0x405520
lea rax, [rbx - 1]
movzx eax, byte [rax]
test al, al
jne 0x405520
movsxd rax, esi
shl rax, 3
add rax, qword [rbp + 0x18]
mov qword [rax], rbx
add esi, 1
add rbx, 1
movzx eax, byte [rbx]
test al, al
jne 0x4054f8
mov dword [rbp + 0x10], esi
jmp 0x4058bb
lea eax, [rsi - 0x47]
cmp eax, 0x33
ja case.0x405561.72
mov eax, eax
lea rdx, [rax*4]
lea rax, [0x00409b50]
mov eax, dword [rdx + rax]
movsxd rdx, eax
lea rax, [0x00409b50]
lea rax, [rdx + rax]
jmp rax
lea rcx, str.all_A_records_NIY
call fcn.004035db
movzx eax, word [0x0040b0c8]
add eax, 1
mov word [0x0040b0c8], ax
jmp 0x4058bb
mov rax, qword [0x0040b040]
mov qword [0x0040b0e8], rax
jmp 0x4058bb
movzx eax, word [0x0040b0d0]
add eax, 1
mov word [0x0040b0d0], ax
mov dword [rbp - 0x3c], 1
jmp 0x4058bb
mov rax, qword [sym.imp.KERNEL32.dll_FreeConsole]
call rax
jmp 0x4058bb
mov rax, qword [0x0040b040]
mov rcx, rax
call sub.msvcrt.dll_atoi
mov esi, eax
test esi, esi
je 0x4055ec
mov eax, esi
and eax, 0x1c
cmp eax, esi
jne 0x4055ec
mov dword [0x00408028], esi
jmp 0x4058bb
mov edx, esi
lea rcx, str.invalid_hop_pointer__d__must_be_multiple_of_4___28
call fcn.004035db
jmp 0x4058bb
mov eax, dword [0x0040b078]
cmp eax, 8
jle 0x405616
lea rcx, str.too_many__g_hops
call fcn.004035db
mov rax, qword [0x0040b0a8]
test rax, rax
jne 0x405633
mov ecx, 0x50
call fcn.0040371e
mov qword [0x0040b0a8], rax
movzx eax, word [0x0040b0d2]
movzx edx, ax
mov rax, qword [0x0040b040]
mov rcx, rax
call fcn.00403841
mov qword [rbp - 0x58], rax
cmp qword [rbp - 0x58], 0
je 0x405676
mov rax, qword [0x0040b0a8]
mov edx, dword [0x0040b078]
movsxd rdx, edx
shl rdx, 3
lea rdx, [rax + rdx]
mov rax, qword [rbp - 0x58]
mov qword [rdx], rax
mov eax, dword [0x0040b078]
add eax, 1
mov dword [0x0040b078], eax
jmp 0x4058bb
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
call 0x405f60
mov rax, qword [0x0040b040]
mov rcx, rax
call sub.msvcrt.dll_atoi
and eax, 0xffff
mov dword [0x0040b0cc], eax
mov eax, dword [0x0040b0cc]
imul eax, eax, 0x3e8
mov dword [0x0040b0cc], eax
mov eax, dword [0x0040b0cc]
test eax, eax
jne 0x4058b7
mov rax, qword [0x0040b040]
mov rdx, rax
lea rcx, str.invalid_interval_time__s
call fcn.004035db
jmp 0x4058bb
movzx eax, word [0x0040b0d0]
add eax, 1
mov word [0x0040b0d0], ax
jmp 0x4058bb
movzx eax, word [0x0040b0d2]
add eax, 1
mov word [0x0040b0d2], ax
jmp 0x4058bb
mov rax, qword [0x0040b040]
mov qword [0x0040b0c0], rax
movzx eax, word [0x0040b0d4]
add eax, 1
mov word [0x0040b0d4], ax
jmp 0x4058bb
mov rax, qword [0x0040b040]
mov edx, 0
mov rcx, rax
call fcn.00403bc0
mov word [rbp - 0x2a], ax
cmp word [rbp - 0x2a], 0
jne 0x4058ba
mov rax, qword [0x0040b040]
mov rdx, rax
lea rcx, str.invalid_local_port__s
call fcn.004035db
jmp 0x4058bb
movzx eax, word [0x0040b0d6]
add eax, 1
mov word [0x0040b0d6], ax
jmp 0x4058bb
movzx eax, word [0x0040b0d2]
movzx edx, ax
mov rax, qword [0x0040b040]
mov rcx, rax
call fcn.00403841
mov qword [rbp - 0x48], rax
mov rax, qword [rbp - 0x48]
add rax, 0x1c0
mov qword [rbp - 0x20], rax
jmp 0x4058bb
movzx eax, word [0x0040b0f0]
add eax, 1
mov word [0x0040b0f0], ax
jmp 0x4058bb
movzx eax, word [0x0040b0e2]
add eax, 1
mov word [0x0040b0e2], ax
jmp 0x4058bb
movzx eax, word [0x0040b0d8]
add eax, 1
mov word [0x0040b0d8], ax
jmp 0x4058bb
movzx eax, word [0x0040b0da]
add eax, 1
mov word [0x0040b0da], ax
jmp 0x4058bb
mov rax, qword [0x0040b040]
mov rcx, rax
call sub.msvcrt.dll_atoi
mov dword [0x0040b0dc], eax
mov eax, dword [0x0040b0dc]
test eax, eax
jne 0x405854
mov rax, qword [0x0040b040]
mov rdx, rax
lea rcx, str.invalid_wait_time__s
call fcn.004035db
mov ecx, 8
call fcn.0040371e
mov qword [0x0040b088], rax
mov ecx, 8
call fcn.0040371e
mov qword [0x0040b090], rax
mov rax, qword [0x0040b088]
mov edx, dword [0x0040b0dc]
mov dword [rax], edx
jmp 0x4058bb
movzx eax, word [0x0040b0e0]
add eax, 1
mov word [0x0040b0e0], ax
jmp 0x4058bb
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
lea rcx, str.nc__h_for_help
call fcn.004035db
jmp 0x4058bb
nop
jmp 0x4058bb
nop
mov rax, qword [rbp + 0x18]
lea r8, str.ade:g:G:hi:lLno:p:rs:tcuvw:z
mov rdx, rax
mov ecx, dword [rbp + 0x10]
call fcn.00402422
mov esi, eax
cmp esi, 0xffffffff
jne 0x405533
movzx eax, word [0x0040b0d6]
test ax, ax
je 0x405907
mov ecx, 0
call fcn.004073a0
mov ecx, eax
call sub.msvcrt.dll_srand
mov ecx, 0x10000
call fcn.0040371e
mov qword [rbp - 0x38], rax
mov rax, qword [0x0040b0e8]
test rax, rax
je 0x405930
mov ecx, 0
call sub.msvcrt.dll__close
mov word [0x0040b0d4], 0
mov dword [0x0040b074], 0
movzx eax, word [0x0040b0d4]
test ax, ax
je 0x40598d
mov rax, qword [0x0040b0c0]
mov r8d, 0x1b4
mov edx, 0x301
mov rcx, rax
call sub.msvcrt.dll__open
mov dword [0x0040b074], eax
mov eax, dword [0x0040b074]
test eax, eax
jg 0x40597c
mov rax, qword [0x0040b0c0]
mov rdx, rax
lea rcx, str.cant_open__s
call fcn.004035db
mov ecx, 0x64
call fcn.0040371e
mov qword [0x0040b0c0], rax
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
test rax, rax
je 0x4059ce
movzx eax, word [0x0040b0d2]
movzx edx, ax
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov rcx, rax
call fcn.00403841
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
je 0x4059f2
mov rax, qword [rbp - 0x18]
add rax, 0x1c0
test rax, rax
je 0x4059f2
mov rax, qword [rbp - 0x18]
add rax, 0x1c0
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
je 0x405a08
mov eax, dword [0x0040b048]
add eax, 1
mov dword [0x0040b048], eax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx eax, word [0x0040b0d0]
test ax, ax
je 0x405b3e
mov word [rbp - 0x30], 0
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
test rax, rax
je 0x405a92
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.00403bc0
mov word [rbp - 0x30], ax
cmp word [rbp - 0x30], 0
jne 0x405a92
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.invalid_port__s
call fcn.004035db
movzx ebx, word [rbp - 0x2a]
movzx edx, word [rbp - 0x30]
mov rcx, qword [rbp - 0x20]
mov rax, qword [rbp - 0x28]
mov r9d, ebx
mov r8, rcx
mov rcx, rax
call fcn.0040425f
mov dword [0x00408010], eax
mov eax, dword [0x00408010]
test eax, eax
jle 0x405b32
mov rax, qword [0x0040b0e8]
test rax, rax
je 0x405adc
mov eax, dword [0x00408010]
cdqe
mov rcx, rax
call fcn.004026fd
mov rax, qword [0x0040b0e8]
test rax, rax
jne 0x405af7
mov eax, dword [0x00408010]
mov ecx, eax
call fcn.00404b7c
mov esi, eax
movzx eax, word [0x0040b0da]
cmp ax, 1
jbe 0x405b21
mov edx, dword [0x0040b080]
mov eax, dword [0x0040b084]
mov r8d, edx
mov edx, eax
lea rcx, str._sent__d__rcvd__d
call fcn.004034eb
cmp dword [rbp - 0x3c], 1
je 0x405397
mov ecx, esi
call sub.msvcrt.dll_exit
lea rcx, str.no_connection
call fcn.004035db
cmp qword [rbp - 0x28], 0
jne 0x405b51
lea rcx, str.no_destination
call fcn.004035db
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
test rax, rax
jne 0x405b75
lea rcx, str.no_port_s__to_connect_to
call fcn.004035db
mov eax, dword [0x0040b048]
cdqe
add rax, 1
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
test rax, rax
je 0x405b9a
mov word [0x0040802c], 0
movzx eax, word [rbp - 0x2a]
mov word [rbp - 0x2c], ax
jmp 0x405edb
mov word [rbp - 0x4a], 0
movzx eax, word [rbp - 0x4a]
mov word [rbp - 0x2e], ax
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov edx, 0x2d
mov rcx, rax
call sub.msvcrt.dll_strchr
mov rbx, rax
test rbx, rbx
je 0x405c0b
mov byte [rbx], 0
add rbx, 1
mov edx, 0
mov rcx, rbx
call fcn.00403bc0
mov word [rbp - 0x2e], ax
cmp word [rbp - 0x2e], 0
jne 0x405c0b
mov rdx, rbx
lea rcx, str.invalid_port__s
call fcn.004035db
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.00403bc0
mov word [rbp - 0x4a], ax
cmp word [rbp - 0x4a], 0
jne 0x405c58
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov rdx, rax
lea rcx, str.invalid_port__s
call fcn.004035db
movzx eax, word [rbp - 0x2e]
cmp ax, word [rbp - 0x4a]
jbe 0x405caf
mov word [0x0040802c], 0
movzx eax, word [rbp - 0x2e]
mov word [rbp - 0x30], ax
movzx eax, word [0x0040b0d6]
test ax, ax
je 0x405ebe
movzx ecx, word [rbp - 0x2e]
movzx edx, word [rbp - 0x4a]
mov rax, qword [rbp - 0x38]
mov r8d, ecx
mov rcx, rax
call fcn.00403e4e
mov rax, qword [rbp - 0x38]
mov rcx, rax
call fcn.00403dca
mov word [rbp - 0x30], ax
jmp 0x405ebe
movzx eax, word [rbp - 0x4a]
mov word [rbp - 0x30], ax
jmp 0x405ebe
cmp word [rbp - 0x2a], 0
jne 0x405ce6
movzx eax, word [0x0040b0d6]
test ax, ax
je 0x405ce6
call sub.msvcrt.dll_rand
mov word [rbp - 0x2c], ax
cmp word [rbp - 0x2c], 0x1fff
ja 0x405ce6
add word [rbp - 0x2c], 0x2000
movzx eax, word [rbp - 0x30]
mov edx, eax
mov ecx, 0
call fcn.00403bc0
mov word [rbp - 0x30], ax
movzx ebx, word [rbp - 0x2c]
movzx edx, word [rbp - 0x30]
mov rcx, qword [rbp - 0x20]
mov rax, qword [rbp - 0x28]
mov r9d, ebx
mov r8, rcx
mov rcx, rax
call fcn.00403ec7
mov dword [0x00408010], eax
mov eax, dword [0x00408010]
test eax, eax
jle 0x405d57
movzx eax, word [0x0040b0e0]
test ax, ax
je 0x405d57
movzx eax, word [0x0040b0d8]
test ax, ax
je 0x405d57
mov eax, dword [0x00408010]
mov rdx, qword [rbp - 0x28]
mov ecx, eax
call fcn.00404773
mov dword [0x00408010], eax
mov eax, dword [0x00408010]
test eax, eax
jle 0x405dec
mov esi, 0
mov rax, qword [0x0040b0b8]
mov rdx, rax
movzx ebx, word [rbp - 0x30]
mov rax, qword [rbp - 0x18]
add rax, 0x100
mov rcx, rax
mov rax, qword [rbp - 0x18]
mov qword [rsp + 0x20], rdx
mov r9d, ebx
mov r8, rcx
mov rdx, rax
lea rcx, str._s___s___d___s__open
call fcn.004034eb
mov rax, qword [0x0040b0e8]
test rax, rax
je 0x405dbf
mov eax, dword [0x00408010]
cdqe
mov rcx, rax
call fcn.004026fd
movzx eax, word [0x0040b0e0]
test ax, ax
jne 0x405e53
mov rax, qword [0x0040b0e8]
test rax, rax
jne 0x405e53
mov eax, dword [0x00408010]
mov ecx, eax
call fcn.00404b7c
mov esi, eax
jmp 0x405e53
mov esi, 1
movzx eax, word [0x0040802c]
test ax, ax
jne 0x405e1a
movzx eax, word [0x0040b0da]
cmp ax, 1
ja 0x405e1a
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
cmp eax, 0x274d
je 0x405e53
mov rax, qword [0x0040b0b8]
mov rdx, rax
movzx ebx, word [rbp - 0x30]
mov rax, qword [rbp - 0x18]
add rax, 0x100
mov rcx, rax
mov rax, qword [rbp - 0x18]
mov qword [rsp + 0x20], rdx
mov r9d, ebx
mov r8, rcx
mov rdx, rax
lea rcx, str._s___s___d___s_
call fcn.004034eb
mov eax, dword [0x00408010]
cdqe
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [0x00408010]
cdqe
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, dword [0x0040b0cc]
test eax, eax
je 0x405e9b
mov eax, dword [0x0040b0cc]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__sleep]
call rax
movzx eax, word [0x0040b0d6]
test ax, ax
je 0x405eb9
mov rax, qword [rbp - 0x38]
mov rcx, rax
call fcn.00403dca
mov word [rbp - 0x30], ax
jmp 0x405ebe
sub word [rbp - 0x30], 1
movzx eax, word [rbp - 0x4a]
cmp ax, word [rbp - 0x30]
jbe 0x405cbc
mov eax, dword [0x0040b048]
add eax, 1
mov dword [0x0040b048], eax
mov eax, dword [0x0040b048]
cdqe
shl rax, 3
add rax, qword [rbp + 0x18]
mov rax, qword [rax]
test rax, rax
jne 0x405ba7
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx eax, word [0x0040b0da]
cmp ax, 1
jbe 0x405f30
mov edx, dword [0x0040b080]
mov eax, dword [0x0040b084]
mov r8d, edx
mov edx, eax
lea rcx, str.sent__d__rcvd__d
call fcn.004034eb
mov rax, qword [sym.imp.WSOCK32.dll_WSACleanup]
call rax
cmp dword [rbp - 0x3c], 1
je 0x40539a
movzx eax, word [0x0040802c]
test ax, ax
je 0x405f56
mov ecx, esi
call sub.msvcrt.dll_exit
mov ecx, 0
call sub.msvcrt.dll_exit
push rbp
mov rbp, rsp
sub rsp, 0x20
mov word [0x0040b0da], 1
lea rcx, str._v1.12_NT_http:__eternallybored.org_misc_netcat___nconnect_to_somewhere:_tnc___options__hostname_port_s___ports__...__nlisten_for_inbound:_tnc__l__p_port__options___hostname___port__noptions:
call fcn.004034eb
lea rcx, str._t_d_t_tdetach_from_console__background_mode_n
call fcn.004034eb
lea rcx, str._t_e_prog_t_tinbound_program_to_exec__dangerous___
call fcn.004034eb
lea rcx, str._t_g_gateway_tsource_routing_hop_point_s___up_to_8_n_t_G_num_t_tsource_routing_pointer:_4__8__12__..._n_t_h_t_tthis_cruft_n_t_i_secs_t_tdelay_interval_for_lines_sent__ports_scanned_n_t_l_t_tlisten_mode__for_inbound_connects_n_t_L_t_tlisten_harder__re_listen_on_socket_close_n_t_n_t_tnumeric_only_IP_addresses__no_DNS_n_t_o_file_t_thex_dump_of_traffic_n_t_p_port_t_tlocal_port_number_n_t_r_t_trandomize_local_and_remote_ports_n_t_s_addr_t_tlocal_source_address
call fcn.004034eb
lea rcx, str._t_t_t_tanswer_TELNET_negotiation
call fcn.004034eb
lea rcx, str._t_c_t_tsend_CRLF_instead_of_just_LF_n_t_u_t_tUDP_mode_n_t_v_t_tverbose__use_twice_to_be_more_verbose__n_t_w_secs_t_ttimeout_for_connects_and_final_net_reads_n_t_z_t_tzero_I_O_mode__used_for_scanning_
call fcn.004034eb
lea rcx, str.port_numbers_can_be_individual_or_ranges:_m_n__inclusive_
call fcn.004035db
mov eax, 0
leave
ret