Function at 0x1400394f0
Capabilities:
Convert ip address from string

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf0]
sub rsp, 0x1f0
mov rax, qword [0x1400d59c0]
xor rax, rsp
mov qword [rbp + 0xd0], rax
mov rsi, qword [rcx + 0x810]
xor r13d, r13d
movzx edi, word [rcx + 0x240]
mov r12d, r9d
movzx r15d, word [rcx + 0x242]
mov r14, rcx
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], r13
test rsi, rsi
jne 0x14003955b
test di, di
jne 0x14003955b
xor eax, eax
jmp 0x140039938
mov qword [rsp + 0x1e8], rbx
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
test rsi, rsi
je 0x140039860
mov rbx, 0xffffffffffffffff
mov rax, rbx
nop dword [rax]
inc rax
cmp byte [rsi + rax], r13b
jne 0x1400395a0
cmp rax, 0xff
jae 0x140039860
xor edx, edx
mov byte [rbp - 0x30], r13b
mov r8d, 0xff
lea rcx, [rbp - 0x2f]
call fcn.1400a5550
mov rcx, qword [0x1400d58a0]
mov r8, rbx
inc r8
cmp byte [rcx + r8], r13b
jne 0x1400395d4
mov rdx, rsi
call fcn.140085250
test eax, eax
jne 0x140039600
mov rax, qword [0x1400d58a0]
inc rbx
cmp byte [rax + rbx], r13b
jne 0x1400395f0
add rsi, rbx
mov bl, 1
jmp 0x140039660
mov rcx, qword [str.host_]
mov r8, rbx
nop word [rax + rax]
inc r8
cmp byte [rcx + r8], r13b
jne 0x140039610
mov rdx, rsi
call fcn.140085250
test eax, eax
jne 0x14003965e
mov rax, qword [str.host_]
nop dword [rax]
inc rbx
cmp byte [rax + rbx], r13b
jne 0x140039630
add rsi, rbx
mov rax, qword [rsp + 0x38]
movzx ebx, byte [rax + 0x777]
cmp r12d, 2
jne 0x140039782
mov byte [rax + 0x777], 1
jmp 0x14003978f
xor bl, bl
mov edx, dword [rbp + 0x150]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], 0x100
mov r9, rsi
mov qword [rsp + 0x20], rax
mov ecx, r12d
mov rax, qword [rsp + 0x38]
mov r8d, dword [rax + 0x76c]
call fcn.140007630
test eax, eax
je 0x14003975e
sub eax, 1
je 0x140039836
cmp eax, 1
je 0x1400396cc
test bl, bl
je 0x14003963c
mov r8, rsi
mov byte [r14 + 0x128f], r13b
lea rdx, str.Couldnt_bind_to__s
mov rcx, r14
call fcn.140018910
mov eax, 0x2d
jmp 0x140039930
lea r9, [rbp - 0x30]
mov dword [rsp + 0x20], r12d
mov r8, rsi
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i
mov rcx, r14
call fcn.140018a00
cmp r12d, 0x17
jne 0x140039840
mov edx, 0x25
lea rcx, [rbp - 0x30]
call fcn.1400779a8
mov rbx, rax
test rax, rax
je 0x14003970d
mov byte [rax], r13b
inc rbx
mov esi, reloc.WS2_32.dll_socket
lea r8, [rsp + 0x58]
mov ecx, esi
lea rdx, [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x140039753
movzx ecx, di
mov word [rsp + 0x50], si
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
test rbx, rbx
je 0x140039753
xor edx, edx
mov r8d, 0xa
mov rcx, rbx
call fcn.140081b00
mov dword [rsp + 0x68], eax
mov r13d, 0x1c
jmp 0x1400398a1
test bl, bl
je 0x14003963c
mov r8, rsi
lea rdx, str.Couldnt_bind_to_interface__s
mov rcx, r14
call fcn.140018910
mov eax, 0x2d
jmp 0x140039930
cmp r12d, 0x17
jne 0x14003978f
mov byte [rax + 0x777], 2
lea rax, [rsp + 0x30]
xor r9d, r9d
mov r8d, 0x50
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, r14
call fcn.14003faf0
cmp eax, 1
jne 0x1400397bf
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.14002a090
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
mov byte [rax + 0x777], bl
test rcx, rcx
je 0x1400396a9
mov rcx, qword [rcx]
lea rdx, [rbp - 0x30]
mov r8d, 0x100
call fcn.14003fab0
mov rax, qword [rsp + 0x30]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i
mov r9d, r12d
mov r8, rsi
mov rcx, qword [rax]
mov eax, dword [rcx + 4]
mov rcx, r14
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
call fcn.140018a00
mov rdx, qword [rsp + 0x30]
mov rcx, r14
call fcn.140040100
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
cmp r12d, dword [rcx + 4]
je 0x1400396e7
mov eax, 1
jmp 0x140039930
cmp r12d, 2
jne 0x1400398a1
mov ebx, r12d
lea r8, [rsp + 0x54]
mov ecx, ebx
lea rdx, [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1400398a1
jmp 0x140039888
cmp r12d, 0x17
jne 0x14003987f
mov esi, r12d
movzx ecx, di
mov word [rsp + 0x50], si
call qword [sym.imp.WS2_32.dll_htons]
mov r13d, 0x1c
jmp 0x14003989c
cmp r12d, 2
jne 0x1400398a1
mov ebx, r12d
movzx ecx, di
mov word [rsp + 0x50], bx
call qword [sym.imp.WS2_32.dll_htons]
mov r13d, reloc.WS2_32.dll_recv
mov word [rsp + 0x52], ax
mov rbx, qword [rsp + 0x40]
lea rdx, [rsp + 0x50]
mov rcx, rbx
mov r8d, r13d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x14003990f
nop dword [rax + rax]
dec r15d
test r15d, r15d
jle 0x14003995a
add di, 1
je 0x14003995a
movzx r8d, di
lea rdx, str.Bind_to_local_port__d_failed__trying_next
dec r8d
mov rcx, r14
call fcn.140018a00
movzx ecx, di
call qword [sym.imp.WS2_32.dll_ntohs]
mov r8d, r13d
lea rdx, [rsp + 0x50]
mov rcx, rbx
mov word [rsp + 0x52], ax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1400398c0
movzx r8d, di
lea rdx, str.Local_port:__hu
mov rcx, r14
call fcn.140018a00
mov rax, qword [rsp + 0x38]
mov byte [rax + 0x355], 1
xor eax, eax
mov rbx, qword [rsp + 0x1e8]
mov rcx, qword [rbp + 0xd0]
xor rcx, rsp
call fcn.140075840
add rsp, 0x1f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp - 0x30]
mov ecx, eax
mov dword [r14 + 0xc8c], eax
mov ebx, eax
call fcn.14003e290
mov r9, rax
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, ebx
mov rcx, r14
call fcn.140018910
mov eax, 0x2d
jmp 0x140039930