Function at 0x140059e40
Capabilities:
Convert ip address from string

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x160
mov rax, qword [0x140098980]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov byte [r8], 0
mov r12, r8
mov rbx, rdx
mov r14, rcx
test rcx, rcx
je 0x14005a1e6
movzx eax, byte [rcx]
test al, al
je 0x14005a1e6
test rdx, rdx
je 0x14005a1e6
cmp byte [rdx], 0
je 0x14005a1e6
xor r13d, r13d
mov ecx, 0x2a
mov r15d, r13d
cmp cl, byte [rdx]
jne 0x140059eb5
cmp r13b, byte [rdx + 1]
je 0x14005a138
mov edi, 0x80
cmp al, 0x5b
jne 0x140059f0d
lea edx, [rdi - 0x23]
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
mov rbp, rax
test rax, rax
je 0x14005a1e6
inc r14
sub rbp, r14
cmp rbp, rdi
jae 0x14005a1e6
mov r8, rbp
lea rcx, [rsp + 0xd0]
mov rdx, r14
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsp + rbp + 0xd0], r13b
lea r14, [rsp + 0xd0]
lea r15d, [rdi - 0x7e]
jmp 0x140059f45
mov rbp, 0xffffffffffffffff
inc rbp
cmp byte [r14 + rbp], r13b
jne 0x140059f14
lea r8, [rsp + 0x28]
mov rdx, r14
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x140059f3a
mov r15d, eax
jmp 0x140059f45
cmp byte [r14 + rbp - 1], 0x2e
jne 0x140059f45
dec rbp
movzx eax, byte [rbx]
test al, al
je 0x14005a1e6
movabs rdx, 0x100100000200
mov rdi, r13
nop dword [rax]
cmp al, 0x20
je 0x140059f6b
movzx ecx, al
cmp al, 9
jne 0x140059f79
movzx eax, byte [rbx + 1]
inc rbx
movzx ecx, al
test al, al
jne 0x140059f60
mov r9, rbx
test cl, cl
je 0x14005a1b4
cmp cl, 0x2c
ja 0x140059f93
movsx rax, cl
bt rdx, rax
jb 0x140059fa1
movzx ecx, byte [rbx + 1]
inc rbx
inc rdi
test cl, cl
jne 0x140059f84
test rdi, rdi
je 0x14005a1b4
mov ecx, r15d
test r15d, r15d
je 0x14005a14c
sub ecx, 1
je 0x140059fc4
cmp ecx, 1
jne 0x14005a1b4
mov eax, 0x80
mov esi, r13d
cmp rdi, rax
jae 0x14005a1b4
mov r8, rdi
lea rcx, [rsp + 0x50]
mov rdx, r9
call sub.VCRUNTIME140.dll_memcpy
mov edx, 0x2f
mov byte [rsp + rdi + 0x50], sil
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_strchr
mov rdi, rax
test rax, rax
je 0x14005a00f
lea rcx, [rax + 1]
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
mov esi, eax
mov byte [rdi], r13b
cmp r15d, 2
jne 0x14005a0bb
mov eax, 0x80
lea r8, [rsp + 0x40]
test esi, esi
mov rdx, r14
cmove esi, eax
mov edi, esi
lea ecx, [rax - 0x69]
shr edi, 3
and esi, 7
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x14005a1aa
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x50]
lea ecx, [rax + 0x16]
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x14005a1aa
cmp edi, 0x10
ja 0x14005a1aa
jne 0x14005a074
test esi, esi
jne 0x14005a1aa
test edi, edi
je 0x14005a092
mov r8d, edi
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
call fcn.140075f46
test eax, eax
jne 0x14005a1aa
test esi, esi
je 0x14005a138
movzx eax, byte [rsp + rdi + 0x40]
mov ecx, 8
movzx edx, byte [rsp + rdi + 0x30]
sub ecx, esi
xor edx, eax
mov eax, 0xff
shl eax, cl
test eax, edx
jmp 0x14005a1a8
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
cmp esi, 0x20
ja 0x14005a1aa
lea r8, [rsp + 0x28]
mov rdx, r14
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x14005a1aa
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x50]
lea ecx, [rax + 1]
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x14005a1aa
test esi, 0xffffffdf
je 0x14005a13f
mov ecx, dword [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [rsp + 0x20]
mov edi, eax
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, 0x20
mov edx, 0xffffffff
sub ecx, esi
xor eax, edi
shl edx, cl
test edx, eax
jne 0x14005a1aa
mov al, 1
jmp 0x14005a1e8
mov eax, dword [rsp + 0x20]
cmp dword [rsp + 0x28], eax
sete al
jmp 0x14005a1a6
cmp byte [r9 + rdi - 1], 0x2e
jne 0x14005a15a
sub rdi, 1
je 0x14005a166
cmp byte [r9], 0x2e
jne 0x14005a166
inc r9
dec rdi
cmp rdi, rbp
jne 0x14005a180
mov r8, rbp
mov rdx, r14
mov rcx, r9
call fcn.140031d00
test eax, eax
setne al
jmp 0x14005a1a6
jae 0x14005a1b4
mov rdx, r14
sub rdx, rdi
add rdx, rbp
cmp byte [rdx - 1], 0x2e
jne 0x14005a1a4
mov r8, rdi
mov rcx, r9
call fcn.140031d00
test eax, eax
je 0x14005a1a4
mov al, 1
jmp 0x14005a1a6
xor al, al
test al, al
jne 0x14005a138
movabs rdx, 0x100100000200
movzx eax, byte [rbx]
cmp al, 0x20
je 0x14005a1bf
cmp al, 9
jne 0x14005a1c4
inc rbx
jmp 0x14005a1b4
test al, al
je 0x14005a1db
cmp al, 0x2c
je 0x14005a1d3
mov byte [r12], 1
jmp 0x14005a1db
inc rbx
cmp byte [rbx], 0x2c
je 0x14005a1d3
movzx eax, byte [rbx]
test al, al
jne 0x140059f5a
xor al, al
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.140074e90
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x160
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret