Function at 0x4019b5
Capabilities:
Get socket status
Write file on windows

Disassembly:
push rbp
mov eax, 0x1700
call fcn.00406c70
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1690], rcx
mov qword [rbp + 0x1698], rdx
mov word [rbp + 0x167e], 0x3e8
mov dword [rbp + 0x1678], 0
mov dword [rbp + 0x1674], 0
cmp qword [rbp + 0x1690], 0
jne 0x401a19
mov r8d, 0x12f
lea rdx, str.C:Usersl00810585Downloads_nbtscan_source_1.0.35_nbtscan.c
lea rcx, [0x0040928d]
call sym._assert
cmp qword [rbp + 0x1698], 0xffffffffffffffff
jne 0x401a3c
mov r8d, 0x130
lea rdx, str.C:Usersl00810585Downloads_nbtscan_source_1.0.35_nbtscan.c
lea rcx, str.SOCKET_IS_VALID_sockfd_
call sym._assert
jmp 0x401eeb
mov qword [rbp + 0x1668], 0
mov dword [rbp - 0x50], 0
mov dword [rbp + 0x1664], 0
jmp 0x401a7a
mov eax, dword [rbp + 0x1664]
mov rax, qword [rbp + rax*8 - 0x48]
cmp qword [rbp + 0x1698], rax
je 0x401a87
add dword [rbp + 0x1664], 1
mov eax, dword [rbp - 0x50]
cmp dword [rbp + 0x1664], eax
jb 0x401a5f
jmp 0x401a88
nop
mov eax, dword [rbp - 0x50]
cmp dword [rbp + 0x1664], eax
jne 0x401ab6
mov eax, dword [rbp - 0x50]
cmp eax, 0x3f
ja 0x401ab6
mov eax, dword [rbp + 0x1664]
mov rdx, qword [rbp + 0x1698]
mov qword [rbp + rax*8 - 0x48], rdx
mov eax, dword [rbp - 0x50]
add eax, 1
mov dword [rbp - 0x50], eax
mov edx, dword [0x00408010]
lea rax, [rbp + 0x1548]
mov rcx, rax
call sym.timeval_set_secs
cmp dword [rbp + 0x1674], 0
je 0x401afd
lea rax, [rbp + 0x1c0]
lea rdx, [rbp - 0x50]
mov ecx, 0x208
mov r8, rcx
mov rcx, rax
call sym.memcpy
lea rax, [rbp + 0x1c0]
mov qword [rbp + 0x1668], rax
mov rax, qword [rbp + 0x1698]
add eax, 1
mov r10d, eax
mov rcx, qword [rbp + 0x1668]
lea rax, [rbp - 0x50]
lea rdx, [rbp + 0x1548]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8, rcx
mov rdx, rax
mov ecx, r10d
mov rax, qword [sym.imp.WSOCK32.dll_select]
call rax
mov dword [rbp + 0x1660], eax
cmp dword [rbp + 0x1660], 0
jne 0x401b82
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x1e
mov edx, 1
lea rcx, str.timeout__normal_end_of_scan__n
call sym.fwrite
mov rcx, qword [rbp + 0x1690]
call sym.fflush
nop
jmp 0x401f27
cmp dword [rbp + 0x1660], 0
jns 0x401bb2
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov ecx, eax
call sym.strerror
mov rdx, rax
lea rcx, str.ERROR___s__n
call sym.printf
nop
jmp 0x401f27
cmp dword [rbp + 0x1660], 0
jle 0x401dad
lea rax, [rbp - 0x50]
mov rcx, qword [rbp + 0x1698]
mov rdx, rax
call sym.__WSAFDIsSet
test eax, eax
je 0x401dad
lea rax, [rbp + 0x1530]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp + 0x7e0]
mov r8d, 0xd38
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp + 0x1698]
mov ecx, eax
lea rdx, [rbp + 0x1530]
lea rax, [rbp + 0x3d0]
mov r9, rdx
mov r8d, 0x40c
mov rdx, rax
call sym.recvpacket
mov dword [rbp + 0x165c], eax
mov eax, dword [0x0040e030]
test eax, eax
je 0x401ce4
cmp dword [rbp + 0x165c], 0
jns 0x401c7d
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov ecx, eax
call sym.strerror
mov r8, rax
lea rdx, str.Error_on_read:__s_n
mov rcx, qword [rbp + 0x1690]
call sym.fprintf
jmp 0x401ce4
mov eax, dword [rbp + 0x1534]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov rdx, rax
mov eax, dword [rbp + 0x165c]
mov r9, rdx
mov r8d, eax
lea rdx, str.Got__d_bytes_from__s_n
mov rcx, qword [rbp + 0x1690]
call sym.fprintf
mov eax, dword [0x0040e030]
cmp eax, 1
jle 0x401ce4
mov ecx, 1
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov edx, dword [rbp + 0x165c]
lea rax, [rbp + 0x3d0]
mov r8, rcx
mov rcx, rax
call sym.dump_nbtpacket
cmp dword [rbp + 0x165c], 0
jle 0x401eea
sub dword [rbp + 0x1678], 1
lea r8, [rbp + 0x1550]
lea rcx, [rbp + 0x7e0]
mov edx, dword [rbp + 0x165c]
lea rax, [rbp + 0x3d0]
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.parse_nbtstat
test eax, eax
je 0x401d79
mov rax, qword [rbp + 0x1530]
mov rdx, qword [rbp + 0x1538]
mov qword [rbp + 0x7e0], rax
mov qword [rbp + 0x7e8], rdx
lea rax, [rbp + 0x7e0]
add rax, 4
mov rcx, rax
call sym.target_responded
test eax, eax
je 0x401dad
mov edx, dword [0x0040e04c]
lea rax, [rbp + 0x7e0]
mov r8d, edx
mov rdx, rax
mov rcx, qword [rbp + 0x1690]
call sym.display_nbtstat
jmp 0x401dad
mov eax, dword [rbp + 0x1534]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov rdx, rax
lea rax, [rbp + 0x1550]
mov r9, rax
mov r8, rdx
lea rdx, str.ERROR:_no_parse_for__s_____s_n
mov rcx, qword [rbp + 0x1690]
call sym.fprintf
cmp dword [rbp + 0x1660], 0
jle 0x401eeb
cmp qword [rbp + 0x1668], 0
je 0x401eeb
mov rdx, qword [rbp + 0x1668]
mov rax, qword [rbp + 0x1698]
mov rcx, rax
call sym.__WSAFDIsSet
test eax, eax
je 0x401eeb
lea rax, [rbp + 0x1520]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov word [rbp + 0x1520], 2
mov eax, dword [rbp + 0x1658]
mov dword [rbp + 0x1524], eax
movzx eax, word [0x00408018]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_htons]
call rax
mov word [rbp + 0x1522], ax
mov dword [rbp + 0x1674], 0
movzx eax, word [rbp + 0x167e]
mov edx, eax
add edx, 1
mov word [rbp + 0x167e], dx
movsx ecx, ax
lea rdx, [rbp + 0x151c]
lea rax, [rbp + 0x7e0]
mov r8d, ecx
mov rcx, rax
call sym.fill_namerequest
mov eax, dword [0x0040e030]
test eax, eax
je 0x401e9b
mov eax, dword [rbp + 0x1524]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov r8, rax
lea rdx, str.sending_to__s_n
mov rcx, qword [rbp + 0x1690]
call sym.fprintf
mov ecx, dword [rbp + 0x151c]
mov rax, qword [rbp + 0x1698]
mov r10d, eax
lea rdx, [rbp + 0x1520]
lea rax, [rbp + 0x7e0]
mov r9, rdx
mov r8d, ecx
mov rdx, rax
mov ecx, r10d
call sym.sendpacket
mov eax, dword [0x00408014]
test eax, eax
jle 0x401ee1
mov eax, dword [0x00408014]
mov ecx, eax
call sym.sleep_msecs
add dword [rbp + 0x1678], 1
jmp 0x401eeb
nop
cmp dword [rbp + 0x1674], 0
jne 0x401a41
lea rax, [rbp + 0x1658]
mov rcx, rax
call sym.next_target
mov dword [rbp + 0x1674], eax
cmp dword [rbp + 0x1674], 0
jne 0x401a41
cmp dword [rbp + 0x1678], 0
jg 0x401a41
nop
add rsp, 0x1700
pop rbp
ret