Function at 0x140001120
Capabilities:
Connect socket
Convert ip address from string
Initialize winsock library

Disassembly:
push rbp
push r14
lea rbp, [rsp - 0x218]
sub rsp, 0x318
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x200], rax
lea rcx, str.pktdump_ex:_prints_the_packets_of_the_network_using_WinPcap._n
call fcn.140001060
lea r9, [rbp + 0x100]
xor edx, edx
lea r8, [rsp + 0x48]
lea rcx, str.rpcap:__
call qword [sym.imp.wpcap.dll_pcap_findalldevs_ex]
cmp eax, 0xffffffff
jne 0x140001199
lea ecx, [rax + 3]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea r8, [rbp + 0x100]
lea rdx, str.Error_in_pcap_findalldevs_ex:__s_n
call fcn.140001010
mov eax, 0xffffffff
jmp 0x14000169f
mov qword [rsp + 0x330], rbx
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x1400011ce
nop dword [rax + rax]
mov rcx, qword [rbx + 0x10]
lea rdx, str.Intel
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x1400011fd
mov rbx, qword [rbx]
test rbx, rbx
jne 0x1400011b0
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.No_Intel_interfaces_found__Exiting._n
call fcn.140001010
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.wpcap.dll_pcap_freealldevs]
mov eax, 0xffffffff
jmp 0x140001697
mov rcx, qword [rbx + 8]
lea rax, [rbp + 0x100]
mov edx, 0x64
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x310], r15
mov qword [rsp + 0x20], 0
lea r9d, [rdx - 0x50]
lea r8d, [rdx - 0x63]
call qword [sym.imp.wpcap.dll_pcap_open]
mov r15, rax
test rax, rax
jne 0x140001265
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str._nError_opening_adapter_n
call fcn.140001010
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.wpcap.dll_pcap_freealldevs]
lea eax, [r15 - 1]
jmp 0x14000168f
mov r8, qword [rbx + 0x10]
lea rcx, str.Using_interface:__s___s__n
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x338], rsi
mov qword [rsp + 0x340], rdi
mov qword [rsp + 0x348], r12
call fcn.140001060
lea r8, [rsp + 0x30]
mov rcx, r15
lea rdx, [rsp + 0x38]
mov r12d, 4
call qword [sym.imp.wpcap.dll_pcap_next_ex]
lea r14d, [r12 - 2]
test eax, eax
js 0x140001609
je 0x1400015ee
mov rax, qword [rsp + 0x30]
xor esi, esi
cmp byte [rax + 0x17], 6
jne 0x1400012e8
mov rcx, r15
call qword [sym.imp.wpcap.dll_pcap_datalink]
cmp eax, 1
mov rax, qword [rsp + 0x30]
movzx esi, byte [rax + 0x24]
movzx eax, byte [rax + 0x25]
shl esi, 8
add esi, eax
mov rcx, r15
call qword [sym.imp.wpcap.dll_pcap_datalink]
mov rcx, qword [rsp + 0x30]
cmp byte [rcx + 0xc], 8
jne 0x14000134c
cmp byte [rcx + 0xd], 0
jne 0x14000134c
movzx ecx, byte [rcx + 0x17]
cmp cl, 1
jne 0x140001314
lea rbx, str.ICMP
jmp 0x140001353
cmp cl, 6
jne 0x140001340
mov ecx, 0x40
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9d, esi
lea r8, str.TCP__Port__d_
mov rcx, rax
mov edx, 0x40
mov rbx, rax
call fcn.1400010c0
jmp 0x140001353
lea rbx, [0x140003398]
cmp cl, 0x11
je 0x140001353
lea rbx, str.Unknown
mov rdx, qword [rsp + 0x38]
lea rcx, str._ld:_ld___ld_____s_n
mov qword [rsp + 0x20], rbx
mov r9d, dword [rdx + 0xc]
mov r8d, dword [rdx + 4]
mov edx, dword [rdx]
call fcn.140001060
mov rax, qword [rsp + 0x38]
mov ebx, 1
mov ecx, dword [rax + 8]
inc ecx
cmp ecx, ebx
jbe 0x1400013d8
xor edi, edi
nop dword [rax + rax]
mov rax, qword [rsp + 0x30]
lea rcx, str._.2x
movzx edx, byte [rdi + rax]
call fcn.140001060
mov eax, ebx
and eax, 0x8000000f
jge 0x1400013b5
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x1400013c5
lea rcx, [0x1400034a4]
call fcn.140001060
mov rax, qword [rsp + 0x38]
inc ebx
inc rdi
mov ecx, dword [rax + 8]
inc ecx
cmp ebx, ecx
jb 0x140001390
lea rcx, [0x1400034a8]
call fcn.140001060
lea r8, [0x1400034ac]
lea rdx, str.wyniki.txt
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
jne 0x140001706
mov rcx, r15
call qword [sym.imp.wpcap.dll_pcap_datalink]
mov rcx, qword [rsp + 0x30]
cmp byte [rcx + 0xc], 8
jne 0x140001469
cmp byte [rcx + 0xd], 0
jne 0x140001469
movzx ecx, byte [rcx + 0x17]
cmp cl, 1
jne 0x140001431
lea rbx, str.ICMP
jmp 0x140001470
cmp cl, 6
jne 0x14000145d
mov ecx, 0x40
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9d, esi
lea r8, str.TCP__Port__d_
mov rcx, rax
mov edx, 0x40
mov rbx, rax
call fcn.1400010c0
jmp 0x140001470
lea rbx, [0x140003398]
cmp cl, 0x11
je 0x140001470
lea rbx, str.Unknown
mov rax, qword [rsp + 0x38]
lea rdx, str._ld:_ld___d_____s_n
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x28], rbx
mov r8d, dword [rax]
mov r9d, r8d
mov eax, dword [rax + 0xc]
mov dword [rsp + 0x20], eax
call fcn.140001010
mov rax, qword [rsp + 0x38]
mov ebx, 1
mov ecx, dword [rax + 8]
inc ecx
cmp ecx, ebx
jbe 0x140001503
xor edi, edi
nop dword [rax]
mov rax, qword [rsp + 0x30]
lea rdx, str._.2x
mov rcx, qword [rsp + 0x40]
movzx r8d, byte [rdi + rax]
call fcn.140001010
mov eax, ebx
and eax, 0x8000000f
jge 0x1400014db
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x1400014f0
mov rcx, qword [rsp + 0x40]
lea rdx, [0x1400034a4]
call fcn.140001010
mov rax, qword [rsp + 0x38]
inc ebx
inc rdi
mov ecx, dword [rax + 8]
inc ecx
cmp ebx, ecx
jb 0x1400014b0
cmp esi, 0x4d2
jne 0x1400015d2
test r12d, r12d
jne 0x1400015cf
mov ecx, 0x202
lea rdx, [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1400016de
lea edx, [rax + 1]
mov ecx, r14d
lea r8d, [r12 + 6]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400016b9
mov ecx, 0x15b3
mov word [rsp + 0x50], r14w
call qword [sym.imp.WS2_32.dll_htons]
lea r8, [rsp + 0x54]
mov ecx, r14d
lea rdx, str.10.0.2.15
mov word [rsp + 0x52], ax
call qword [sym.imp.WS2_32.dll_inet_pton]
lea r8d, [r12 + 0x10]
mov rcx, rbx
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140001640
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x140003578]
call fcn.140001730
mov rcx, rax
lea rdx, [0x140001900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov r12d, 4
jmp 0x1400015d2
dec r12d
mov rcx, qword [rsp + 0x40]
lea rdx, [0x1400034a8]
call fcn.140001010
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea r8, [rsp + 0x30]
mov rcx, r15
lea rdx, [rsp + 0x38]
call qword [sym.imp.wpcap.dll_pcap_next_ex]
test eax, eax
jns 0x1400012b7
cmp eax, 0xffffffff
jne 0x140001718
mov rcx, r15
call qword [sym.imp.wpcap.dll_pcap_geterr]
mov ecx, r14d
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.Error_reading_the_packets:__s_n
mov rcx, rax
call fcn.140001010
mov eax, 0xffffffff
jmp 0x140001677
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, [0x140003550]
call fcn.140001730
mov rcx, rax
lea rdx, [0x140001900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
mov r12, qword [rsp + 0x348]
mov rdi, qword [rsp + 0x340]
mov rsi, qword [rsp + 0x338]
mov r15, qword [rsp + 0x310]
mov rbx, qword [rsp + 0x330]
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.1400019c0
add rsp, 0x318
pop r14
pop rbp
ret
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, [0x140003520]
call fcn.140001730
mov rcx, rax
lea rdx, [0x140001900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x14000166c
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, [0x1400034f8]
call fcn.140001730
mov rcx, rax
lea rdx, [0x140001900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140001672
lea rcx, str.Nie_mo
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x140001672
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.wpcap.dll_pcap_freealldevs]
xor eax, eax
jmp 0x140001677