Function at 0x1400098b0
Capabilities:
Convert ip address from string

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rdi, r8
mov rbx, rdx
mov rbp, rcx
mov r15, qword [rdx]
mov rcx, r8
call sub.msvcrt.dll__strdup
test rax, rax
je 0x140009bed
mov r12, rax
or byte [rbp], 2
cmp byte [rdi], 0
je 0x140009913
lea rdx, [0x14001dc1b]
mov rcx, r12
call sub.msvcrt.dll_strcspn
cmp byte [r12 + rax], 0
mov qword [rsp + 0x28], rbx
je 0x140009922
mov rcx, r12
add rcx, rax
mov byte [rcx], 0
add rcx, 1
jmp 0x140009924
mov rcx, r12
call sub.msvcrt.dll_free
mov al, 1
jmp 0x140009c34
xor ecx, ecx
add rbp, 0x88
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x20], r12
nop word cs:[rax + rax]
nop
mov rdi, rcx
mov rcx, r12
call sub.msvcrt.dll__strdup
mov rsi, rax
mov rcx, r12
lea rdx, [0x14001e027]
call sub.msvcrt.dll_strcspn
cmp byte [r12 + rax], 0
je 0x140009980
mov r14, rax
add r14, r12
mov byte [r14], 0
add r14, 1
jmp 0x140009983
xor r14d, r14d
mov ecx, 1
mov edx, 0x20
call sub.msvcrt.dll_calloc
test rax, rax
je 0x140009bc9
mov rbp, rax
mov rcx, r12
mov edx, 0x3a
call sub.msvcrt.dll_strchr
mov r8, rbp
add r8, 4
test rax, rax
je 0x1400099e0
mov ecx, 0x17
mov rdx, r12
call qword [sym.imp.WS2_32.dll_inet_pton]
mov cx, 0x17
cmp eax, 1
jne 0x1400099f7
mov word [rbp], cx
jmp 0x140009a04
mov ecx, 2
mov rdx, r12
call qword [sym.imp.WS2_32.dll_inet_pton]
mov cx, 2
cmp eax, 1
je 0x1400099ce
movzx ecx, word [rbp]
test cx, cx
je 0x140009bfb
test r14, r14
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rdi
je 0x140009a90
movsx eax, byte [r14]
mov ecx, 0x2f
sub ecx, eax
add eax, 0xffffffc6
test ecx, eax
jns 0x140009b95
mov rcx, r14
lea rdx, [rsp + 0x50]
mov r8d, 0xa
call sub.msvcrt.dll_strtoul
mov rcx, qword [rsp + 0x50]
cmp byte [rcx], 0
jne 0x140009b95
movzx ecx, word [rbp]
cmp eax, 0x21
jb 0x140009a73
cmp cx, 2
je 0x140009b95
cmp eax, 0x81
jb 0x140009a73
cmp cx, 0x17
je 0x140009b95
mov byte [rbp + 0x14], al
cmp cx, 2
je 0x140009aa6
cmp cx, 0x17
je 0x140009ab0
jmp 0x140009b30
cmp cx, 0x17
je 0x140009aaa
cmp cx, 2
jne 0x140009b95
mov byte [rbp + 0x14], 0x20
mov al, 0x20
xor esi, esi
jmp 0x140009ab5
mov byte [rbp + 0x14], 0x80
mov al, 0x80
mov esi, 3
movzx ebx, al
lea rdi, [rsi + 1]
mov eax, esi
shl eax, 5
mov r15d, ebx
sub r15d, eax
shl rsi, 5
nop dword [rax + rax]
lea rax, [rsi + 0x20]
cmp rax, rbx
jle 0x140009b30
mov r13d, 0xffffffff
mov ecx, r15d
shr r13d, cl
cmp rsi, rbx
mov eax, 0xffffffff
cmovge r13d, eax
mov ecx, dword [rbp + rdi*4]
call qword [sym.imp.WS2_32.dll_ntohl]
test eax, r13d
jne 0x140009b10
add r15d, 0x20
add rsi, 0xffffffffffffffe0
add rdi, 0xffffffffffffffff
jg 0x140009ad0
jmp 0x140009b30
mov ecx, 2
call qword [fcn.140002320]
mov rcx, rax
lea rdx, str.Warning:_AllowedIP_has_nonzero_host_part:__s__s_n
mov r8, r12
mov r9, r14
call fcn.1400094d0
mov rcx, qword [rsp + 0x48]
lea rax, [rcx + 0x18]
test rcx, rcx
cmove rax, qword [rsp + 0x30]
mov qword [rax], rbp
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
mov rsi, qword [rsp + 0x38]
test rsi, rsi
je 0x140009bd7
mov rcx, rsi
lea rdx, [0x14001dc1b]
call sub.msvcrt.dll_strcspn
cmp byte [rsi + rax], 0
mov ecx, 0
mov r12, rsi
mov r15, rbp
je 0x140009940
add rax, rsi
mov byte [rax], 0
add rax, 1
mov rcx, rax
mov r12, rsi
mov r15, rbp
jmp 0x140009940
mov rcx, rbp
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
mov ecx, 2
call qword [fcn.140002320]
lea rdx, str.AllowedIP_is_not_in_the_correct_format:___s_n
mov rcx, rax
mov r8, rsi
call fcn.1400094d0
mov rcx, rsi
jmp 0x140009c2d
lea rcx, [0x14001dae8]
call sub.msvcrt.dll_perror
jmp 0x140009c20
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
mov rax, qword [rsp + 0x28]
mov qword [rax], rbp
mov al, 1
jmp 0x140009c34
lea rcx, str.strdup
call sub.msvcrt.dll_perror
jmp 0x140009c32
mov ecx, 2
call qword [fcn.140002320]
lea rdx, str.Unable_to_parse_IP_address:___s_n
mov rcx, rax
mov r8, r12
call fcn.1400094d0
mov rcx, rbp
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
xor eax, eax
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret