Function at 0x140157580
Capabilities:
Convert ip address from string

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x168
mov rdi, rcx
mov rbx, rdx
test rcx, rcx
je 0x1401575b2
movzx edx, byte [rcx]
test rbx, rbx
setne bpl
test dl, dl
setne al
and bpl, al
jne 0x1401575d0
xor ebp, ebp
mov eax, ebp
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movzx r12d, byte [rbx]
test r12b, r12b
je 0x1401575b2
cmp r12b, 0x2a
jne 0x1401575e5
cmp byte [rbx + 1], 0
je 0x1401575b4
cmp dl, 0x5b
jne 0x14015762c
mov edx, 0x5d
mov rcx, rdi
call sub.msvcrt.dll_strchr
mov r9, rax
test rax, rax
je 0x1401575b2
lea rdx, [rdi + 1]
sub r9, rdx
mov r13, r9
cmp r9, 0x7f
ja 0x1401575b2
lea rdi, [rsp + 0x60]
mov r8, r9
mov rcx, rdi
call sub.msvcrt.dll_memcpy
mov byte [rsp + r13 + 0x60], 0
mov edx, 2
jmp 0x140157674
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov rdx, rdi
mov ecx, 2
lea r8, [rsp + 0xe0]
mov r13, rax
call qword [sym.imp.WS2_32.dll_inet_pton]
mov edx, 1
cmp eax, 1
je 0x140157667
lea rax, [r13 - 1]
xor edx, edx
cmp byte [rdi + r13 - 1], 0x2e
cmove r13, rax
movzx r12d, byte [rbx]
test r12b, r12b
je 0x1401575b2
lea r15d, [rdx - 1]
mov dword [rsp + 0x20], edx
movabs rsi, 0xffffeffefffffdff
mov byte [rsp + 0x27], bpl
mov eax, r15d
mov r15, rbx
mov ebx, eax
nop dword [rax + rax]
mov rcx, r15
jmp 0x1401576b2
movzx r12d, byte [rcx + 1]
add rcx, 1
test r12b, r12b
je 0x1401575b2
cmp r12b, 0x20
je 0x1401576a0
cmp r12b, 9
je 0x1401576a0
movzx eax, byte [rcx]
test al, al
je 0x1401575b2
mov r15, rcx
xor ebp, ebp
jmp 0x1401576e1
movzx eax, byte [r15 + 1]
add r15, 1
add rbp, 1
test al, al
je 0x1401576eb
cmp al, 0x2c
ja 0x1401576d0
bt rsi, rax
jb 0x1401576d0
test rbp, rbp
je 0x14015772c
cmp ebx, 1
jbe 0x140157748
cmp byte [rcx + rbp - 1], 0x2e
lea r8, [rbp - 1]
je 0x140157810
cmp r12b, 0x2e
jne 0x140157712
add rcx, 1
sub rbp, 1
cmp rbp, r13
je 0x14015797d
jae 0x14015772c
jmp 0x14015784b
add r15, 1
movzx r12d, byte [r15]
cmp r12b, 0x2c
je 0x140157728
test r12b, r12b
jne 0x140157698
jmp 0x1401575b2
cmp rbp, 0x7f
ja 0x14015772c
lea r14, [rsp + 0xe0]
mov r8, rbp
mov rdx, rcx
mov rcx, r14
call sub.msvcrt.dll_memcpy
mov edx, 0x2f
mov rcx, r14
mov byte [rsp + rbp + 0xe0], 0
call sub.msvcrt.dll_strchr
mov rbp, rax
test rax, rax
je 0x140157856
lea rcx, [rax + 1]
call sub.msvcrt.dll_atoi
cmp dword [rsp + 0x20], 2
mov byte [rbp], 0
mov r12d, eax
je 0x140157879
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x50], 0
cmp eax, 0x20
ja 0x14015772c
mov rbp, qword [sym.imp.WS2_32.dll_inet_pton]
lea r8, [rsp + 0x40]
mov rdx, rdi
mov ecx, 2
call rbp
cmp eax, 1
jne 0x14015772c
lea r8, [rsp + 0x50]
mov rdx, r14
mov ecx, 2
call rbp
cmp eax, 1
jne 0x14015772c
mov ecx, dword [rsp + 0x40]
test r12d, 0xffffffdf
jne 0x1401579a0
cmp dword [rsp + 0x50], ecx
jne 0x14015772c
jmp 0x140157841
test r8, r8
jne 0x140157998
test r13, r13
je 0x14015797d
mov rax, r13
cmp byte [rdi + rax - 1], 0x2e
jne 0x14015772c
lea rdx, [rdi + rax]
call fcn.140124300
test eax, eax
je 0x14015772c
movzx ebp, byte [rsp + 0x27]
jmp 0x1401575b4
mov rax, r13
mov r8, rbp
sub rax, rbp
jmp 0x140157825
cmp dword [rsp + 0x20], 2
je 0x140157960
mov dword [rsp + 0x40], 0
xor r12d, r12d
mov dword [rsp + 0x50], 0
jmp 0x1401577b9
test eax, eax
je 0x140157960
mov ebp, eax
and r12d, 7
shr ebp, 3
mov dword [rsp + 0x34], r12d
mov dword [rsp + 0x30], ebp
mov r11, qword [sym.imp.WS2_32.dll_inet_pton]
lea rax, [rsp + 0x40]
mov rdx, rdi
mov ecx, 0x17
mov qword [rsp + 0x38], rax
mov r8, rax
mov qword [rsp + 0x28], r11
call r11
mov r11, qword [rsp + 0x28]
cmp eax, 1
jne 0x14015772c
lea r9, [rsp + 0x50]
mov rdx, r14
mov ecx, 0x17
mov qword [rsp + 0x28], r9
mov r8, r9
call r11
cmp eax, 1
jne 0x14015772c
cmp ebp, 0x10
ja 0x14015772c
cmp dword [rsp + 0x30], 0x10
mov r9, qword [rsp + 0x28]
jne 0x140157904
test r12d, r12d
jne 0x14015772c
test ebp, ebp
je 0x140157927
mov r8d, ebp
mov rcx, qword [rsp + 0x38]
mov rdx, r9
and r8d, 0x1fffffff
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x14015772c
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140157841
movsxd rax, dword [rsp + 0x30]
mov ecx, 8
sub ecx, r12d
movzx edx, byte [rsp + rax + 0x40]
xor dl, byte [rsp + rax + 0x50]
movzx eax, dl
mov edx, 0xff
shl edx, cl
test eax, edx
jne 0x140157841
jmp 0x14015772c
mov dword [rsp + 0x34], 0
xor r12d, r12d
mov ebp, 0x10
mov dword [rsp + 0x30], 0x10
jmp 0x140157893
mov r8, r13
mov rdx, rdi
call fcn.140124300
test eax, eax
je 0x14015772c
jmp 0x140157841
mov rbp, r8
jmp 0x140157704
mov r14, qword [sym.imp.WS2_32.dll_htonl]
call r14
mov ecx, dword [rsp + 0x50]
mov ebp, eax
call r14
mov ecx, 0x20
mov edx, eax
sub ecx, r12d
mov eax, 0xffffffff
shl eax, cl
xor ebp, edx
test eax, ebp
jne 0x14015772c
jmp 0x140157841