Function at 0x14013c980
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [0x1403bfb80]
xor rax, rsp
mov qword [rbp + 0x390], rax
mov r13d, r9d
mov r12, r8
mov r14d, edx
mov rdi, rcx
test rcx, rcx
je 0x14013ca6d
cmp qword [rcx + 8], 0
je 0x14013ca6d
xor ecx, ecx
cmp dword [rdi + 0x10], ecx
jne 0x14013cb25
mov rbx, qword [rdi]
xor eax, eax
mov qword [rsp + 0x68], rcx
xor edx, edx
mov qword [rsp + 0x78], rcx
mov r8d, 0x400
lea rcx, [rbp - 0x70]
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x80], rax
call sub.VCRUNTIME140.dll_memset
test rbx, rbx
je 0x14013ca6d
mov rcx, qword [rbx + 0x418]
test rcx, rcx
je 0x14013ca6d
call fcn.140139f30
lea r8, [rsp + 0x60]
mov dword [rsp + 0x60], reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x68]
mov rcx, rax
mov rsi, rax
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x14013ca93
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x400
lea rdx, [rbp - 0x70]
mov ecx, dword [rax]
call fcn.1401379a0
mov qword [rsp + 0x20], rax
lea r9, str.Getting_local_IP_address:__s
lea r8, str.ssh_pcap_context_connect
mov edx, 1
mov rcx, rbx
call fcn.14012c070
mov eax, 0xffffffff
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.1402d88b0
add rsp, 0x4a0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea r8, [rsp + 0x60]
mov dword [rsp + 0x60], reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x78]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jns 0x14013cad6
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x400
lea rdx, [rbp - 0x70]
mov ecx, dword [rax]
call fcn.1401379a0
mov qword [rsp + 0x20], rax
lea r9, str.Getting_remote_IP_address:__s
jmp 0x14013ca59
cmp word [rsp + 0x68], 2
je 0x14013cafe
lea r9, str.Only_IPv4_supported_for_pcap_logging
mov edx, 1
lea r8, str.ssh_pcap_context_connect
mov rcx, rbx
call fcn.14012c070
jmp 0x14013ca6d
mov eax, dword [rsp + 0x6c]
mov dword [rdi + 0x14], eax
mov eax, dword [rsp + 0x7c]
mov dword [rdi + 0x18], eax
movzx eax, word [rsp + 0x6a]
mov word [rdi + 0x1c], ax
movzx eax, word [rsp + 0x7a]
mov word [rdi + 0x1e], ax
mov dword [rdi + 0x10], 1
call fcn.140135c40
mov rsi, rax
test rax, rax
jne 0x14013cb46
mov rcx, qword [rdi]
lea rdx, str.ssh_pcap_context_write
call fcn.14012c120
jmp 0x14013ca6d
mov rax, qword [rdi + 8]
xor edx, edx
mov dword [rsp + 0x58], 0x4f65feb3
mov qword [rsp + 0x50], rdx
mov dword [rsp + 0x48], 6
movzx ecx, word [rax + 8]
lea r9d, [rdx + 0x45]
mov dword [rsp + 0x40], 0x40
lea r8d, [rdx + 8]
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], ecx
mov rcx, rsi
mov qword [rsp + 0x4e8], r15
mov r15d, dword [rbp + 0x400]
lea eax, [r15 + 0x28]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdx
lea rdx, str.bbwwwbbw
call fcn.140135290
mov rcx, qword [rdi + 8]
mov ebx, eax
inc word [rcx + 8]
test eax, eax
jne 0x14013ce60
mov rcx, rsi
cmp r14d, 1
jne 0x14013cc50
mov edx, dword [rdi + 0x14]
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce60
mov edx, dword [rdi + 0x18]
mov rcx, rsi
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce60
movzx edx, word [rdi + 0x1c]
mov rcx, rsi
call fcn.1401357d0
mov ebx, eax
test eax, eax
js 0x14013ce60
movzx edx, word [rdi + 0x1e]
mov rcx, rsi
call fcn.1401357d0
mov ebx, eax
test eax, eax
js 0x14013ce60
mov r9d, dword [rdi + 0x20]
lea rdx, [0x1402dae00]
mov r8d, r14d
mov dword [rsp + 0x20], 0x4f65feb3
mov rcx, rsi
call fcn.140135290
mov ebx, eax
test eax, eax
jne 0x14013ce60
add dword [rdi + 0x20], r15d
mov r9d, dword [rdi + 0x24]
jmp 0x14013ccd6
mov edx, dword [rdi + 0x18]
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce60
mov edx, dword [rdi + 0x14]
mov rcx, rsi
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce60
movzx edx, word [rdi + 0x1e]
mov rcx, rsi
call fcn.1401357d0
mov ebx, eax
test eax, eax
js 0x14013ce60
movzx edx, word [rdi + 0x1c]
mov rcx, rsi
call fcn.1401357d0
mov ebx, eax
test eax, eax
js 0x14013ce60
mov r9d, dword [rdi + 0x24]
lea rdx, [0x1402dae00]
mov r8d, 1
mov dword [rsp + 0x20], 0x4f65feb3
mov rcx, rsi
call fcn.140135290
mov ebx, eax
test eax, eax
jne 0x14013ce60
add dword [rdi + 0x24], r15d
mov r9d, dword [rdi + 0x20]
mov r8d, 1
mov dword [rsp + 0x20], 0x4f65feb3
lea rdx, [0x1402dae00]
mov rcx, rsi
call fcn.140135290
mov ebx, eax
test eax, eax
jne 0x14013ce60
mov dword [rsp + 0x50], 0x4f65feb3
lea rdx, str.bbwwwP
mov qword [rsp + 0x48], r12
mov rcx, rsi
xor r12d, r12d
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0xffff
lea r9d, [r12 + 0x50]
mov dword [rsp + 0x20], 0x18
lea r8d, [r12 + 7]
call fcn.140135290
mov ebx, eax
test eax, eax
jne 0x14013ce60
mov r14, qword [rdi + 8]
call fcn.140135c40
mov rdi, rax
test rax, rax
jne 0x14013cd68
lea ebx, [rax - 1]
jmp 0x14013ce60
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.140136df0
mov rcx, rsi
call fcn.140135ad0
mov rcx, rdi
lea edx, [rax + 0x10]
call fcn.140135990
mov ebx, eax
test eax, eax
js 0x14013ce58
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_htonl]
mov edx, eax
mov rcx, rdi
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce58
mov ecx, dword [rsp + 0x64]
call qword [sym.imp.WS2_32.dll_htonl]
mov edx, eax
mov rcx, rdi
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce58
mov rcx, rsi
call fcn.140135ad0
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htonl]
mov edx, eax
mov rcx, rdi
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce58
lea ecx, [r15 + 0x28]
call qword [sym.imp.WS2_32.dll_htonl]
mov edx, eax
mov rcx, rdi
call fcn.140135840
mov ebx, eax
test eax, eax
js 0x14013ce58
mov rdx, rsi
mov rcx, rdi
call fcn.140135600
mov ebx, eax
test eax, eax
js 0x14013ce58
test r14, r14
je 0x14013ce53
cmp qword [r14], r12
je 0x14013ce53
mov rcx, rdi
call fcn.140135ad0
mov rcx, rdi
mov ebx, eax
call fcn.140135a60
mov r9, qword [r14]
mov rcx, rax
mov r8d, 1
mov edx, ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
test eax, eax
mov ebx, r12d
setns bl
dec ebx
jmp 0x14013ce58
mov ebx, 0xffffffff
mov rcx, rdi
call fcn.1401359e0
mov rcx, rsi
call fcn.1401359e0
mov r15, qword [rsp + 0x4e8]
mov eax, ebx
jmp 0x14013ca72