Function at 0x1800975d8
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
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x1800c86c0]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rbx, qword [rcx + 0x18]
mov rsi, r8
mov r14, qword [r8 + 0xc20]
mov rdi, rdx
mov qword [rsp + 0x38], rcx
movabs rax, 0x6e776f6e6b6e75
xor edx, edx
mov qword [rsp + 0x48], rbx
mov r8d, 0xf8
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll_memset
mov r12b, byte [rbx + 0xd4]
mov rcx, qword [rdi + 0x18]
cmp r12b, 5
sete byte [rsp + 0x30]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, dword [rdi]
xor edx, edx
movzx r15d, byte [rsi + 0x69b]
xor ebx, ebx
xor r13b, r13b
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x40], rdx
mov r8, rax
cmp ecx, 9
jg 0x180097b25
je 0x180097abe
sub ecx, 1
je 0x180097764
sub ecx, 1
je 0x180097728
sub ecx, 1
je 0x180097862
sub ecx, 1
je 0x180097875
sub ecx, 2
je 0x180097906
sub ecx, 1
je 0x1800979de
cmp ecx, 1
jne 0x180097ba5
mov r12, qword [rsp + 0x38]
lea rax, str.SOCKS5_sub_negotiation_response
mov r9d, recv
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, r12
call fcn.18009803c
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], 0
jne 0x180097b09
movzx eax, byte [r14 + 1]
test al, al
je 0x1800978d5
movzx r8d, byte [r14]
lea rdx, str.User_was_rejected_by_the_SOCKS5_server___d__d_.
mov r9d, eax
mov rcx, rsi
call fcn.18007c340
mov eax, 0x21
jmp 0x180097fef
mov r12, qword [rsp + 0x38]
lea rax, str.initial_SOCKS5_request
mov rcx, r12
mov qword [rsp + 0x20], rax
mov r9d, 0x1d
mov r8, rsi
mov rdx, rdi
call fcn.1800980d4
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], rbx
jne 0x180097b09
jmp 0x180097867
mov rax, qword [rsp + 0x48]
cmp byte [rax + 0x2c8], dl
je 0x18009778d
mov r9d, dword [rdi + 0x20]
lea rdx, str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d
mov r8, qword [rdi + 0x18]
mov rcx, rsi
call fcn.18007c40c
mov r8, qword [rsp + 0x50]
cmp r12b, 5
je 0x1800977b0
cmp r8, 0xff
jbe 0x1800977b0
lea rdx, str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu_
mov rcx, rsi
call fcn.18007c40c
mov byte [rsp + 0x30], 1
mov r8d, r15d
test r15d, 0xfffffffa
je 0x1800977cb
lea rdx, str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__u
mov rcx, rsi
call fcn.18007c40c
test r15b, 1
jne 0x1800977d5
and qword [rdi + 0x28], rbx
test r15b, 4
mov byte [r14], 5
mov byte [r14 + 2], bl
mov ecx, 3
setne r13b
test r15b, 4
je 0x1800977fa
mov byte [r14 + 3], 1
mov ecx, 4
cmp qword [rdi + 0x28], rbx
je 0x180097809
mov eax, ecx
inc ecx
mov byte [rax + r14], 2
mov r12, qword [rsp + 0x38]
lea eax, [rcx - 2]
mov byte [r14 + 1], al
mov r9d, 0x1d
mov eax, ecx
mov r8, rsi
mov qword [rdi + 8], rax
mov rdx, rdi
lea rax, str.initial_SOCKS5_request
mov qword [rdi + 0x10], r14
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.1800980d4
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], rbx
jne 0x180097b09
lea r8d, [rax + 4]
mov rdx, rsi
mov rcx, rdi
call fcn.18009816c
jmp 0x180097867
mov r12, qword [rsp + 0x38]
mov qword [rdi + 8], 2
mov qword [rdi + 0x10], r14
jmp 0x18009787a
mov r12, qword [rsp + 0x38]
lea rax, str.initial_SOCKS5_response
mov r9d, reloc.WS2_32.dll_ntohs
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, r12
call fcn.18009803c
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], rbx
jne 0x180097b09
lea ebx, [rax + 5]
cmp byte [r14], bl
je 0x1800978cd
lea rdx, str.Received_invalid_version_in_initial_SOCKS5_response.
mov rcx, rsi
call fcn.18007c340
mov eax, 2
jmp 0x180097fef
mov al, byte [r14 + 1]
test al, al
jne 0x1800978eb
mov r8d, 9
mov rdx, rsi
mov rcx, rdi
call fcn.18009816c
jmp 0x180097ac3
cmp al, 2
jne 0x180097a36
mov r8d, 6
mov rdx, rsi
mov rcx, rdi
call fcn.18009816c
jmp 0x18009790b
mov r12, qword [rsp + 0x38]
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x180097931
cmp qword [rdi + 0x30], 0
je 0x180097931
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rcx, qword [rdi + 0x30]
mov rbx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov r15, rax
jmp 0x180097936
xor ebx, ebx
xor r15d, r15d
mov byte [r14], 1
mov byte [r14 + 1], bl
mov rdx, qword [rdi + 0x28]
test rdx, rdx
je 0x18009797a
test rbx, rbx
je 0x18009797a
cmp rbx, 0xff
jbe 0x18009796e
lea rdx, str.Excessive_user_name_length_for_proxy_auth
mov rcx, rsi
call fcn.18007c340
mov eax, listen
jmp 0x180097fef
lea rcx, [r14 + 2]
mov r8, rbx
call sub.VCRUNTIME140.dll_memcpy
mov byte [rbx + r14 + 2], r15b
add rbx, 3
mov rdx, qword [rdi + 0x30]
test rdx, rdx
je 0x1800979bf
test r15, r15
je 0x1800979bf
cmp r15, 0xff
jbe 0x1800979b3
lea rdx, str.Excessive_password_length_for_proxy_auth
mov rcx, rsi
call fcn.18007c340
mov eax, 0xa
jmp 0x180097fef
lea rcx, [rbx + r14]
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
mov r8d, 7
mov rdx, rsi
mov rcx, rdi
call fcn.18009816c
lea rax, [r15 + rbx]
mov qword [rdi + 0x10], r14
mov qword [rdi + 8], rax
jmp 0x1800979e3
mov r12, qword [rsp + 0x38]
lea rax, str.SOCKS5_sub_negotiation_request
mov r9d, 0x1c
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, r12
call fcn.1800980d4
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], 0
jne 0x180097b09
lea r8d, [rax + 8]
mov qword [rdi + 0x10], r14
mov rdx, rsi
mov qword [rdi + 8], 2
mov rcx, rdi
call fcn.18009816c
jmp 0x1800976c8
cmp al, 1
jne 0x180097a88
test r13b, r13b
je 0x180097a72
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call fcn.18009816c
mov rcx, r12
call fcn.1800a04b8
test eax, eax
je 0x180097aa5
lea rdx, str.Unable_to_negotiate_SOCKS5_GSS_API_context.
mov rcx, rsi
call fcn.18007c340
mov eax, 4
jmp 0x180097fef
lea rdx, str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
mov rcx, rsi
call fcn.18007c340
mov eax, ebx
jmp 0x180097fef
cmp al, 0xff
jne 0x180097aa5
lea rdx, str.No_authentication_method_was_acceptable.
mov rcx, rsi
call fcn.18007c340
mov eax, recv
jmp 0x180097fef
lea rdx, str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
mov rcx, rsi
call fcn.18007c340
mov eax, 0x20
jmp 0x180097fef
mov r12, qword [rsp + 0x38]
mov al, byte [rsp + 0x30]
test al, al
je 0x180097bc2
mov r8d, dword [rdi + 0x20]
lea rax, [rsp + 0x40]
mov rdx, qword [rdi + 0x18]
mov r9b, 1
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.180083390
cmp eax, 0xffffffff
je 0x180097fea
mov rdx, rsi
mov rcx, rdi
cmp eax, 1
jne 0x180097b10
lea r8d, [rax + 9]
call fcn.18009816c
xor eax, eax
jmp 0x180097fef
mov r8d, recv
call fcn.18009816c
mov rdx, qword [rsp + 0x40]
jmp 0x180097d09
sub ecx, 0xa
je 0x180097c98
sub ecx, 1
je 0x180097d04
sub ecx, 1
je 0x180097bb9
sub ecx, 1
je 0x180097e0a
sub ecx, 1
je 0x180097e53
sub ecx, 1
je 0x180097eba
cmp ecx, 1
jne 0x180097ba5
mov r12, qword [rsp + 0x38]
lea rax, str.SOCKS5_connect_request_address
mov r9d, reloc.WS2_32.dll_listen
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, r12
call fcn.18009803c
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], 0
jne 0x180097b09
mov r8d, setsockopt
mov rdx, rsi
mov rcx, rdi
call fcn.18009816c
lea rdx, str.SOCKS5_request_granted.
mov rcx, rsi
call fcn.18007c40c
jmp 0x180097b09
mov r12, qword [rsp + 0x38]
mov al, byte [rsp + 0x30]
mov word [r14], 0x105
mov ebx, 3
mov byte [r14 + 2], 0
test al, al
jne 0x180097e0f
mov rax, qword [rsp + 0x48]
mov rdx, qword [rdi + 0x18]
cmp byte [rax + 0x2d3], 0
je 0x180097c29
lea r8, [rsp + 0x50]
lea ecx, [rbx + 0x14]
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x180097c09
mov eax, 1
jmp 0x180097fef
lea rcx, [r14 + 4]
mov byte [r14 + 3], 4
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memcpy
mov ebx, setsockopt
jmp 0x180097c7c
lea r8, [rsp + 0x38]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x180097c5b
lea r8d, [rax + 3]
mov byte [r14 + 3], al
lea rdx, [rsp + 0x38]
lea rcx, [r14 + 4]
call sub.VCRUNTIME140.dll_memcpy
mov ebx, 8
jmp 0x180097c7c
mov r15, qword [rsp + 0x50]
lea rcx, [r14 + 5]
mov byte [r14 + 3], bl
mov r8, r15
mov byte [r14 + 4], r15b
mov rdx, qword [rdi + 0x18]
call sub.VCRUNTIME140.dll_memcpy
lea rbx, [r15 + 5]
mov r9d, dword [rdi + 0x20]
lea rdx, str.SOCKS5_connect_to__s:_d__remotely_resolved_
mov r8, qword [rdi + 0x18]
mov rcx, rsi
call fcn.18007c40c
jmp 0x180097e0f
mov r8d, dword [rdi + 0x20]
mov rcx, rsi
mov rdx, qword [rdi + 0x18]
call fcn.180082c44
mov qword [rsp + 0x40], rax
mov rdx, rax
test rax, rax
je 0x180097cdb
mov qword [rsi + 0xd70], rax
lea rdx, str.SOCKS5:_hostname__s_found
mov byte [rsi + 0xd90], 1
mov rcx, rsi
mov r8, qword [rdi + 0x18]
call fcn.18007c40c
mov rdx, qword [rsp + 0x40]
test rdx, rdx
jne 0x180097d04
lea rdx, [rsp + 0x40]
mov rcx, rsi
call fcn.1800836a4
mov rdx, qword [rsp + 0x40]
test rdx, rdx
jne 0x180097d04
test eax, eax
je 0x180097b09
jmp 0x180097fea
mov r12, qword [rsp + 0x38]
test rdx, rdx
je 0x180097fd7
mov r15, qword [rdx]
test r15, r15
je 0x180097fd7
mov ebx, 0x100
lea rdx, [rsp + 0x60]
mov r8d, ebx
mov rcx, r15
call fcn.180083350
lea rcx, [rsp + 0x60]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov r9d, dword [rdi + 0x20]
lea rcx, [rsp + 0x60]
sub rbx, rax
lea r8, [0x1800aee1c]
add rcx, rax
mov rdx, rbx
call fcn.180089998
mov word [r14], 0x105
mov ebx, 3
mov byte [r14 + 2], 0
cmp dword [r15 + 4], 2
jne 0x180097da2
mov ebx, 8
mov byte [r14 + 3], 1
mov rdx, qword [r15 + 0x20]
lea rcx, [r14 + 4]
sub rdx, r14
lea r8d, [rbx - 4]
mov al, byte [rdx + rcx]
mov byte [rcx], al
inc rcx
sub r8, 1
jne 0x180097d8b
lea rdx, str.SOCKS5_connect_to_IPv4__s__locally_resolved_
jmp 0x180097dd8
cmp dword [r15 + 4], 0x17
jne 0x180097de7
mov ebx, setsockopt
mov byte [r14 + 3], 4
mov rdx, qword [r15 + 0x20]
lea rcx, [r14 + 4]
sub rdx, r14
lea r8d, [rbx - 4]
mov al, byte [rdx + rcx + 4]
mov byte [rcx], al
inc rcx
sub r8, 1
jne 0x180097dc2
lea rdx, str.SOCKS5_connect_to_IPv6__s__locally_resolved_
lea r8, [rsp + 0x60]
mov rcx, rsi
call fcn.18007c40c
jmp 0x180097dfb
lea r8, [rsp + 0x60]
mov rcx, rsi
lea rdx, str.SOCKS5_connection_to__s_not_supported
call fcn.18007c340
mov rdx, qword [rsp + 0x40]
mov rcx, rsi
call fcn.1800836f4
jmp 0x180097e0f
mov r12, qword [rsp + 0x38]
mov eax, dword [rdi + 0x20]
mov r15, qword [rsp + 0x48]
sar eax, 8
mov byte [rbx + r14], al
mov al, byte [rdi + 0x20]
mov byte [rbx + r14 + 1], al
cmp dword [r15 + 0x5f0], 0
jne 0x180097fc1
lea rax, [rbx + 2]
mov qword [rdi + 0x10], r14
mov r8d, recv
mov qword [rdi + 8], rax
mov rdx, rsi
mov rcx, rdi
call fcn.18009816c
jmp 0x180097e5d
mov r12, qword [rsp + 0x38]
mov r15, qword [rsp + 0x48]
lea rax, str.SOCKS5_connect_request
mov r9d, 0x1e
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, r12
call fcn.1800980d4
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], 0
jne 0x180097b09
cmp dword [r15 + 0x5f0], eax
jne 0x180097fc1
lea r8d, [rax + 0xf]
mov qword [rdi + 8], 0xa
mov rdx, rsi
mov qword [rdi + 0x10], r14
mov rcx, rdi
call fcn.18009816c
jmp 0x180097ec4
mov r12, qword [rsp + 0x38]
mov r15, qword [rsp + 0x48]
lea rax, str.SOCKS5_connect_request_ack
mov r9d, reloc.WS2_32.dll_recv
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, r12
call fcn.18009803c
test eax, eax
jne 0x180097fef
cmp qword [rdi + 8], 0
jne 0x180097b09
cmp byte [r14], 5
je 0x180097f09
lea rdx, str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x1800978bb
movzx eax, byte [r14 + 1]
test al, al
je 0x180097f48
mov r8, qword [rdi + 0x18]
lea rdx, str.Cant_complete_SOCKS5_connection_to__s.___d_
mov r9d, eax
mov rcx, rsi
mov r14d, 0x19
mov ebx, eax
call fcn.18007c340
cmp ebx, 9
jae 0x180097f40
lea r14, [0x1800ae698]
mov r14d, dword [r14 + rbx*4]
mov eax, r14d
jmp 0x180097fef
mov al, byte [r14 + 3]
cmp al, 3
jne 0x180097f5b
movzx eax, byte [r14 + 4]
add rax, 7
jmp 0x180097f6f
cmp al, 4
jne 0x180097f66
mov eax, socket
jmp 0x180097f6f
cmp al, 1
jne 0x180097fad
mov eax, 0xa
cmp dword [r15 + 0x5f0], 0
jne 0x180097b61
cmp rax, 0xa
jbe 0x180097b94
add rax, 0xfffffffffffffff6
mov r8d, reloc.WS2_32.dll_recv
mov qword [rdi + 8], rax
mov rdx, rsi
lea rax, [r14 + 0xa]
mov rcx, rdi
mov qword [rdi + 0x10], rax
call fcn.18009816c
jmp 0x180097b61
lea rdx, str.SOCKS5_reply_has_wrong_address_type.
mov rcx, rsi
call fcn.18007c340
jmp 0x180097bff
lea rdx, str.SOCKS5_GSS_API_protection_not_yet_implemented.
mov rcx, rsi
call fcn.18007c340
mov eax, 6
jmp 0x180097fef
mov r8, qword [rdi + 0x18]
lea rdx, str.Failed_to_resolve___s__for_SOCKS5_connect.
mov rcx, rsi
call fcn.18007c340
mov eax, 0x1b
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.1800a21a0
mov rbx, qword [rsp + 0x1c8]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret