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

Disassembly:
push rbx
push rbp
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x2f0
mov rax, qword [0x1400b6f80]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov rsi, qword [rcx]
xor r13d, r13d
mov dword [rsp + 0x30], r9d
mov qword [rsp + 0x38], r13
mov rbp, qword [rsi + 0xc88]
movzx ebx, word [rsi + 0x6e0]
mov r12d, dword [rsi + 0x6e4]
mov r14d, r8d
mov qword [rsp + 0x48], rdx
mov r15, rcx
test rbp, rbp
jne 0x140038fe6
test bx, bx
jne 0x140038fe6
xor eax, eax
jmp 0x1400394ca
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x2e8], rdi
call fcn.1400717b0
test rbp, rbp
je 0x140039328
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbp
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0xff
jae 0x140039328
lea rcx, [rsp + 0xd1]
xor edx, edx
mov r8d, 0xff
mov byte [rsp + 0xd0], al
call fcn.1400717b0
mov r9, qword [0x1400b6a90]
or rcx, 0xffffffffffffffff
mov rdi, r9
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, rbp
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.140071c50
test eax, eax
jne 0x140039088
mov rdi, qword [0x1400b6a90]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
lea edi, [rax + 1]
not rcx
dec rcx
add rbp, rcx
jmp 0x1400390f3
mov r9, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r9
mov rdx, rbp
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.140071c50
test eax, eax
jne 0x1400390f0
mov rdi, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
not rcx
dec rcx
add rbp, rcx
mov eax, dword [r15 + 0x730]
mov dword [rsp + 0x30], eax
cmp r14d, 2
jne 0x140039222
mov dword [r15 + 0x730], 1
mov edi, r14d
jmp 0x14003923b
mov edi, r13d
mov r8d, dword [r15 + 0x328]
mov edx, dword [rsp + 0x30]
lea rax, [rsp + 0xd0]
mov r9, rbp
mov ecx, r14d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov qword [rsp + 0x20], rax
call fcn.1400318b0
mov edx, eax
test eax, eax
je 0x1400391fe
sub edx, 1
je 0x1400392e7
cmp edx, 1
jne 0x1400391d3
lea r9, [rsp + 0xd0]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov r8, rbp
mov rcx, rsi
mov dword [rsp + 0x20], r14d
call fcn.140037d10
mov edi, 2
cmp r14d, 0x17
jne 0x1400392f1
lea edx, [r14 + 0xe]
lea rcx, [rsp + 0xd0]
call fcn.140071c20
mov rdi, rax
test rax, rax
je 0x140039187
mov byte [rax], r13b
inc rdi
mov ebp, reloc.WS2_32.dll_socket
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0xd0]
mov ecx, ebp
call fcn.14005bca0
test eax, eax
jle 0x1400391c8
movzx ecx, bx
mov word [rsp + 0x50], bp
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
test rdi, rdi
je 0x1400391c8
mov rcx, rdi
call fcn.1400723c4
mov dword [rsp + 0x68], eax
mov r13d, Ordinal_33
jmp 0x14003936c
test edi, edi
je 0x1400390c8
lea rdx, str.Couldnt_bind_to__s
mov r8, rbp
mov rcx, rsi
mov dword [rsi + 0x17f4], r13d
call fcn.140037e70
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x1400394c2
test edi, edi
je 0x1400390c8
lea rdx, str.Couldnt_bind_to_interface__s
mov r8, rbp
mov rcx, rsi
call fcn.140037e70
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x1400394c2
cmp r14d, 0x17
jne 0x140039236
mov edi, 2
mov dword [r15 + 0x730], edi
jmp 0x14003923b
mov edi, 2
lea rax, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
mov rcx, r15
mov qword [rsp + 0x20], rax
call fcn.140055350
cmp eax, 1
jne 0x140039268
lea rdx, [rsp + 0x38]
mov rcx, r15
call fcn.140035b60
mov rcx, qword [rsp + 0x38]
mov eax, dword [rsp + 0x30]
mov dword [r15 + 0x730], eax
test rcx, rcx
je 0x1400391db
mov rcx, qword [rcx]
lea rdx, [rsp + 0xd0]
mov r8d, pe_nt_image_headers64
call fcn.140054bf0
mov rdx, qword [rsp + 0x38]
mov r9d, r14d
mov rax, qword [rdx]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov r8, rbp
mov ecx, dword [rax + 4]
lea rax, [rsp + 0xd0]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140037d10
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.1400555e0
mov rdx, qword [rsp + 0x38]
mov rax, qword [rdx]
cmp r14d, dword [rax + 4]
je 0x14003915e
mov eax, 1
jmp 0x1400394c2
cmp r14d, 2
jne 0x14003936c
lea r8, [rsp + 0x54]
lea rdx, [rsp + 0xd0]
mov ecx, edi
call fcn.14005bca0
test eax, eax
jle 0x14003936c
movzx ecx, bx
mov word [rsp + 0x50], di
call qword [sym.imp.WS2_32.dll_htons]
lea r13d, [r14 + 0xe]
mov word [rsp + 0x52], ax
jmp 0x14003936c
cmp r14d, 0x17
jne 0x14003934a
mov ebp, r14d
movzx ecx, bx
mov word [rsp + 0x50], bp
call qword [sym.imp.WS2_32.dll_htons]
lea r13d, [r14 + 5]
mov word [rsp + 0x52], ax
jmp 0x14003936c
cmp r14d, 2
jne 0x14003936c
mov eax, r14d
movzx ecx, bx
mov word [rsp + 0x50], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r13d, reloc.WS2_32.dll_recv
mov word [rsp + 0x52], ax
mov rdi, qword [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov r8d, r13d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x1400393ed
nop word [rax + rax]
dec r12d
test r12d, r12d
jle 0x140039463
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.140037d10
inc bx
cmp word [rsp + 0x50], 2
jne 0x1400393ca
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
jmp 0x1400393d8
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
lea rdx, [rsp + 0x50]
mov r8d, r13d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x140039390
lea rcx, [rsp + 0xd0]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x30], 0x80
call fcn.1400717b0
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0xd0]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1400394a2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x1d0]
mov r8d, pe_nt_image_headers64
mov ecx, eax
mov edi, eax
mov dword [rsi + 0x1350], eax
call fcn.140034b60
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.140037e70
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x1400394c2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, pe_nt_image_headers64
mov ecx, eax
mov edi, eax
mov dword [rsi + 0x1350], eax
call fcn.140034b60
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.140037e70
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x1400394c2
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.140037d10
mov dword [r15 + 0x6cc], 1
xor eax, eax
mov rdi, qword [rsp + 0x2e8]
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.14006d1b0
add rsp, 0x2f0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret