Function at 0x1401b4ce0
Capabilities:
Convert ip address from string
Get local ipv4 addresses
Get socket information

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
xor eax, eax
mov rsi, qword [rcx + 0x708]
mov r12d, dword [rcx + 0x218]
test rsi, rsi
sete r14b
test r12w, r12w
mov qword [rsp + 0x48], rax
sete al
mov rbx, rcx
mov r13, rdx
mov qword [rsp + 0x2b0], r8
mov ebp, r9d
xor r15d, r15d
and r14b, al
jne 0x1401b5144
mov ax, word [rcx + 0x21a]
mov ecx, 0x20
mov word [rsp + 0x3e], ax
lea rax, [rsp + 0x50]
mov rdi, rax
mov qword [rsp + 0x30], rax
mov eax, r15d
rep stosd dword [rdi], eax
test rsi, rsi
je 0x1401b4fc2
mov rcx, rsi
call sym.strlen
cmp rax, 0xfe
ja 0x1401b4fc2
mov eax, r15d
mov ecx, 0x40
mov r8d, 3
mov rdx, rsi
lea rdi, [rsp + 0x150]
rep stosd dword [rdi], eax
lea rcx, [0x1402940da]
lea rdi, [rsp + 0x150]
call sym.strncmp
test eax, eax
jne 0x1401b4daf
add rsi, 3
mov r14b, 1
jmp 0x1401b4dce
mov r8d, 5
mov rdx, rsi
lea rcx, str.host_
call sym.strncmp
test eax, eax
jne 0x1401b4dce
add rsi, 5
jmp 0x1401b4e20
mov dword [rsp + 0x28], 0x100
mov edx, dword [rsp + 0x2c0]
mov r9, rsi
mov ecx, ebp
mov qword [rsp + 0x20], rdi
mov r8d, dword [r13 + 0x4c0]
call sym.Curl_if2ip
cmp eax, 1
je 0x1401b4fb7
cmp eax, 2
je 0x1401b4f0b
test eax, eax
jne 0x1401b4ee4
mov r8, rsi
lea rdx, str.Couldnt_bind_to_interface__s
test r14b, r14b
jne 0x1401b4efe
mov r14b, byte [r13 + 0x4cb]
cmp ebp, 2
jne 0x1401b4e36
mov byte [r13 + 0x4cb], 1
jmp 0x1401b4e43
cmp ebp, 0x17
jne 0x1401b4e43
mov byte [r13 + 0x4cb], 2
lea r15, [rsp + 0x48]
xor r9d, r9d
mov rdx, rsi
mov rcx, rbx
mov qword [rsp + 0x20], r15
mov r8d, 0x50
call sym.Curl_resolv
dec eax
jne 0x1401b4e70
mov rdx, r15
mov rcx, rbx
call sym.Curl_resolver_wait_resolv
mov rax, qword [rsp + 0x48]
mov byte [r13 + 0x4cb], r14b
test rax, rax
je 0x1401b4eed
mov rcx, qword [rax]
mov r8d, 0x100
mov rdx, rdi
call sym.Curl_printable_address
test byte [rbx + 0xa0e], 0x20
je 0x1401b4ec4
mov rax, qword [rsp + 0x48]
mov r9d, ebp
mov r8, rsi
mov rcx, rbx
lea rdx, str.Name__s_family__i_resolved_to__s_family__i
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], eax
call sym.Curl_infof
mov rdx, qword [rsp + 0x48]
mov rcx, rbx
call sym.Curl_resolv_unlock
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
cmp dword [rax + 4], ebp
jne 0x1401b4fb7
jmp 0x1401b4f2d
test r14b, r14b
je 0x1401b4e20
and byte [rbx + 0x12ac], 0xf7
mov r8, rsi
lea rdx, str.Couldnt_bind_to__s
mov rcx, rbx
call sym.Curl_failf
jmp 0x1401b509f
test byte [rbx + 0xa0e], 0x20
je 0x1401b4f2d
mov dword [rsp + 0x20], ebp
mov r9, rdi
mov r8, rsi
mov rcx, rbx
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i
call sym.Curl_infof
cmp ebp, 0x17
jne 0x1401b4f95
mov edx, 0x25
mov rcx, rdi
call sym.strchr
mov rsi, rax
test rax, rax
je 0x1401b4f4d
mov byte [rax], 0
inc rsi
lea r8, [rsp + 0x58]
mov rdx, rdi
mov ecx, 0x17
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1401b4fdd
mov word [rsp + 0x50], 0x17
movzx ecx, r12w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
test rsi, rsi
je 0x1401b4fdd
mov r8d, 0xa
xor edx, edx
mov rcx, rsi
call sym.strtoul
mov dword [rsp + 0x68], eax
jmp 0x1401b4fdd
cmp ebp, 2
je 0x1401b4f9e
xor esi, esi
jmp 0x1401b5006
lea r8, [rsp + 0x54]
mov rdx, rdi
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1401b4f9a
jmp 0x1401b4feb
mov r15d, 1
jmp 0x1401b5144
cmp ebp, 0x17
jne 0x1401b4fe4
mov word [rsp + 0x50], 0x17
movzx ecx, r12w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
mov esi, 0x1c
jmp 0x1401b5006
xor esi, esi
cmp ebp, 2
jne 0x1401b5006
mov word [rsp + 0x50], 2
movzx ecx, r12w
mov esi, 0x10
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
movzx r15d, word [rsp + 0x3e]
mov rbp, qword [sym.imp.WS2_32.dll_bind]
lea r14, str.Bind_to_local_port__d_failed__trying_next
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x2b0]
mov r8d, esi
call rbp
test eax, eax
js 0x1401b50d3
lea rdx, [rsp + 0xd0]
xor eax, eax
mov ecx, 0x20
mov dword [rsp + 0x44], pe_nt_image_headers64
mov rdi, rdx
lea r8, [rsp + 0x44]
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x2b0]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1401b50aa
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x150]
mov r8d, 0x100
mov dword [rbx + 0xccc], eax
mov ecx, eax
mov esi, eax
call sym.Curl_strerror
mov r8d, esi
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r9, rax
mov rcx, rbx
call sym.Curl_failf
mov r15d, 0x2d
jmp 0x1401b5144
test byte [rbx + 0xa0e], 0x20
je 0x1401b50c6
movzx r8d, r12w
lea rdx, str.Local_port:__hu
mov rcx, rbx
call sym.Curl_infof
or byte [r13 + 0x2aa], 4
xor r15d, r15d
jmp 0x1401b5144
dec r15d
test r15d, r15d
jle 0x1401b510f
inc r12w
je 0x1401b510f
movzx edi, r12w
test byte [rbx + 0xa0e], 0x20
je 0x1401b50fd
lea r8d, [rdi - 1]
mov rdx, r14
mov rcx, rbx
call sym.Curl_infof
mov ecx, edi
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
jmp 0x1401b501a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x150]
mov r8d, 0x100
mov dword [rbx + 0xccc], eax
mov ecx, eax
mov esi, eax
call sym.Curl_strerror
mov r8d, esi
lea rdx, str.bind_failed_with_errno__d:__s
mov r9, rax
jmp 0x1401b5097
mov eax, r15d
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret