Function at 0x180206580
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 - 0x80]
sub rsp, 0x180
mov rax, qword [0x18049d0e0]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rax, qword [rcx + 0x18]
mov rsi, r8
mov r14, qword [r8 + 0xcd0]
mov rdi, rdx
mov qword [rsp + 0x40], rax
mov rbx, rcx
movabs rax, 0x6e776f6e6b6e75
lea rcx, [rsp + 0x78]
xor edx, edx
mov qword [rsp + 0x70], rax
mov r8d, 0xf8
call fcn.18020d280
mov r8, qword [rsp + 0x40]
movsxd rax, dword [rbx + 0x20]
mov rdx, qword [rdi + 0x18]
mov rax, qword [r8 + rax*8 + 0x1b8]
mov qword [rsp + 0x38], rax
movzx eax, byte [r8 + 0xe4]
cmp al, 5
mov byte [rsp + 0x31], al
sete byte [rsp + 0x30]
or r12, 0xffffffffffffffff
mov r13, r12
nop dword [rax + rax]
inc r13
cmp byte [rdx + r13], 0
jne 0x180206620
mov eax, dword [rdi]
xor ebx, ebx
movzx r15d, byte [rsi + 0x20c]
dec eax
mov qword [rsp + 0x48], rbx
cmp eax, 0xf
ja case.0x18020665a.5
lea r9, [0x180000000]
cdqe
mov ecx, dword [r9 + rax*4 + 0x206fd8]
add rcx, r9
jmp rcx
cmp byte [r8 + 0x330], bl
je 0x18020667b
mov r9d, dword [rdi + 0x20]
mov r8, rdx
lea rdx, str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d
mov rcx, rsi
call fcn.1801cdb50
cmp byte [rsp + 0x31], 5
je 0x1802066a2
cmp r13, 0xff
jbe 0x1802066a2
mov r8, r13
lea rdx, str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu_
mov rcx, rsi
call fcn.1801cdb50
mov byte [rsp + 0x30], 1
movzx r8d, r15b
test r8d, 0xfffffffa
je 0x1802066be
lea rdx, str.warning:_unsupported_value_passed_to_CURLOPT_SOCKS5_AUTH:__u
mov rcx, rsi
call fcn.1801cdb50
test r15b, 1
jne 0x1802066c8
mov qword [rdi + 0x28], rbx
mov byte [r14], 5
mov ecx, 3
mov byte [r14 + 2], bl
cmp qword [rdi + 0x28], rbx
je 0x1802066e5
mov byte [r14 + 3], 2
mov ecx, 4
mov rdx, qword [rsp + 0x38]
lea eax, [rcx - 2]
movsxd r15, ecx
mov r8, r14
mov byte [r14 + 1], al
mov r9, r15
lea rax, [rsp + 0x50]
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1801cdf50
test eax, eax
je 0x18020672e
cmp eax, 0x51
je 0x18020672e
lea rdx, str.Unable_to_send_initial_SOCKS5_request.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, Ordinal_33
jmp 0x180206faf
mov rax, qword [rsp + 0x50]
cmp rax, r15
je 0x180206756
cmp dword [rdi], 2
je 0x180206743
mov dword [rdi], 2
sub r15, rax
add rax, r14
mov qword [rdi + 8], r15
mov qword [rdi + 0x10], rax
jmp 0x180206fad
cmp dword [rdi], 4
je case.0x18020665a.3
mov dword [rdi], 4
mov qword [rdi + 8], 2
mov qword [rdi + 0x10], r14
mov r9, qword [rdi + 8]
lea rax, [rsp + 0x58]
mov r8, qword [rdi + 0x10]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.1801cdc70
mov rcx, qword [rsp + 0x58]
test eax, eax
je 0x180206805
cmp eax, 0x51
je 0x180206823
lea rdx, str.Unable_to_receive_initial_SOCKS5_response.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, reloc.WS2_32.dll_ntohs
jmp 0x180206faf
mov r9, qword [rdi + 8]
lea rax, [rsp + 0x50]
mov r8, qword [rdi + 0x10]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.1801cdf50
test eax, eax
je 0x1802067e3
cmp eax, 0x51
jne 0x180206715
mov rax, qword [rdi + 8]
mov rcx, qword [rsp + 0x50]
cmp rcx, rax
je case.0x18020665a.3
sub rax, rcx
add qword [rdi + 0x10], rcx
mov qword [rdi + 8], rax
jmp 0x180206fad
test rcx, rcx
jne 0x180206823
lea rdx, str.Connection_to_proxy_closed
mov rcx, rsi
call fcn.1801cd9c0
mov eax, 3
jmp 0x180206faf
mov rax, qword [rdi + 8]
cmp rcx, rax
jne 0x1802067f5
cmp byte [r14], 5
je 0x18020684b
lea rdx, str.Received_invalid_version_in_initial_SOCKS5_response.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, 2
jmp 0x180206faf
movzx eax, byte [r14 + 1]
test al, al
je 0x180206a90
cmp al, 2
jne 0x18020689c
cmp dword [rdi], 6
je case.0x18020665a.6
mov dword [rdi], 6
mov rax, qword [rdi + 0x28]
test rax, rax
je 0x1802068e9
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x1802068e9
mov rbx, r12
nop dword [rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x180206880
mov r15, r12
nop dword [rax]
inc r15
cmp byte [rcx + r15], 0
jne 0x180206890
jmp 0x1802068ec
mov rcx, rsi
cmp al, 1
jne 0x1802068b9
lea rdx, str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
call fcn.1801cd9c0
mov eax, 5
jmp 0x180206faf
cmp al, 0xff
jne 0x1802068d3
lea rdx, str.No_authentication_method_was_acceptable.
call fcn.1801cd9c0
mov eax, listen
jmp 0x180206faf
lea rdx, str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
call fcn.1801cd9c0
mov eax, reloc.WLDAP32.dll_Ordinal_32
jmp 0x180206faf
mov r15, rbx
mov byte [r14], 1
mov byte [r14 + 1], bl
mov rdx, qword [rdi + 0x28]
test rdx, rdx
je 0x180206930
test rbx, rbx
je 0x180206930
cmp rbx, 0xff
jbe 0x180206924
lea rdx, str.Excessive_user_name_length_for_proxy_auth
mov rcx, rsi
call fcn.1801cd9c0
mov eax, reloc.WS2_32.dll_inet_addr
jmp 0x180206faf
lea rcx, [r14 + 2]
mov r8, rbx
call fcn.18020cd80
mov byte [rbx + r14 + 2], r15b
add rbx, 3
mov rdx, qword [rdi + 0x30]
test rdx, rdx
je 0x180206975
test r15, r15
je 0x180206975
cmp r15, 0xff
jbe 0x180206969
lea rdx, str.Excessive_password_length_for_proxy_auth
mov rcx, rsi
call fcn.1801cd9c0
mov eax, 0xa
jmp 0x180206faf
lea rcx, [rbx + r14]
mov r8, r15
call fcn.18020cd80
add rbx, r15
cmp dword [rdi], 7
je 0x180206983
mov dword [rdi], 7
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], r14
mov r9, qword [rdi + 8]
lea rax, [rsp + 0x50]
mov r8, qword [rdi + 0x10]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.1801cdf50
test eax, eax
je 0x1802069cc
cmp eax, 0x51
je 0x1802069cc
lea rdx, str.Failed_to_send_SOCKS5_sub_negotiation_request.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, Ordinal_32
jmp 0x180206faf
mov rax, qword [rdi + 8]
mov rcx, qword [rsp + 0x50]
cmp rax, rcx
jne 0x1802067f5
cmp dword [rdi], 8
mov qword [rdi + 0x10], r14
mov qword [rdi + 8], 2
je case.0x18020665a.8
mov dword [rdi], 8
mov r9, qword [rdi + 8]
lea rax, [rsp + 0x58]
mov r8, qword [rdi + 0x10]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.1801cdc70
mov rcx, qword [rsp + 0x58]
test eax, eax
je 0x180206a3b
cmp eax, 0x51
je 0x180206a59
lea rdx, str.Unable_to_receive_SOCKS5_sub_negotiation_response.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, select
jmp 0x180206faf
test rcx, rcx
jne 0x180206a59
lea rdx, str.connection_to_proxy_closed
mov rcx, rsi
call fcn.1801cd9c0
mov eax, 3
jmp 0x180206faf
mov rax, qword [rdi + 8]
cmp rcx, rax
jne 0x1802067f5
movzx eax, byte [r14 + 1]
test al, al
je 0x180206a90
movzx r8d, byte [r14]
lea rdx, str.User_was_rejected_by_the_SOCKS5_server___d__d_.
movzx r9d, al
mov rcx, rsi
call fcn.1801cd9c0
mov eax, reloc.WLDAP32.dll_Ordinal_33
jmp 0x180206faf
cmp dword [rdi], 9
mov r8, qword [rsp + 0x40]
je case.0x18020665a.9
mov dword [rdi], 9
movzx eax, byte [rsp + 0x30]
test al, al
je 0x180206ce0
mov r8d, dword [rdi + 0x20]
lea rax, [rsp + 0x48]
mov rdx, qword [rdi + 0x18]
xor r9d, r9d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1801d6910
cmp eax, 0xffffffff
je 0x180206cd1
cmp eax, 1
jne 0x180206aec
cmp dword [rdi], 0xa
je 0x180206fad
mov dword [rdi], 0xa
jmp 0x180206fad
cmp dword [rdi], 0xb
je 0x180206af7
mov dword [rdi], reloc.WS2_32.dll_inet_addr
mov rax, qword [rsp + 0x48]
test rax, rax
je case.0x18020665a.11
mov r15, qword [rax]
test r15, r15
je case.0x18020665a.11
mov ebx, 0x100
lea rdx, [rsp + 0x70]
mov r8d, ebx
mov rcx, r15
call fcn.1801d68d0
lea rax, [rsp + 0x70]
nop dword [rax + rax]
inc r12
cmp byte [rax + r12], 0
jne 0x180206b30
mov r9d, dword [rdi + 0x20]
lea rcx, [rsp + 0x70]
sub rbx, r12
lea r8, [0x18040873c]
add rcx, r12
mov rdx, rbx
call sym.gcm64.dll_curl_msnprintf
mov word [r14], 0x105
mov ebx, 3
mov byte [r14 + 2], 0
mov eax, dword [r15 + 4]
cmp eax, 2
jne 0x180206c37
mov byte [r14 + 3], 1
lea r8, [rsp + 0x70]
mov rcx, qword [r15 + 0x20]
lea rdx, str.SOCKS5_connect_to_IPv4__s__locally_resolved_
mov ebx, 8
movzx eax, byte [rcx + 4]
mov byte [r14 + 4], al
movzx eax, byte [rcx + 5]
mov byte [r14 + 5], al
movzx eax, byte [rcx + 6]
mov byte [r14 + 6], al
movzx eax, byte [rcx + 7]
mov rcx, rsi
mov byte [r14 + 7], al
call fcn.1801cdb50
mov rdx, qword [rsp + 0x48]
mov rcx, rsi
call fcn.1801d6c80
jmp case.0x18020665a.13
mov r8d, dword [rdi + 0x20]
mov rcx, rsi
call fcn.1801d6010
mov qword [rsp + 0x48], rax
test rax, rax
je 0x180206c0e
mov qword [rsi + 0xe40], rax
lea rdx, str.SOCKS5:_hostname__s_found
mov byte [rsi + 0xe60], 1
mov rcx, rsi
mov r8, qword [rdi + 0x18]
call fcn.1801cdb50
mov rax, qword [rsp + 0x48]
test rax, rax
jne 0x180206b05
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.1801d6c10
mov ecx, eax
mov rax, qword [rsp + 0x48]
test rax, rax
jne 0x180206b05
neg ecx
sbb eax, eax
and eax, 0x1b
jmp 0x180206faf
cmp eax, 0x17
jne 0x180206c98
mov byte [r14 + 3], 4
lea rcx, [r14 + 4]
mov r8, qword [r15 + 0x20]
lea edx, [rax - 7]
sub r8, r14
lea ebx, [rax - 3]
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rcx + 4]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x180206c60
lea r8, [rsp + 0x70]
mov rcx, rsi
lea rdx, str.SOCKS5_connect_to_IPv6__s__locally_resolved_
call fcn.1801cdb50
mov rdx, qword [rsp + 0x48]
mov rcx, rsi
call fcn.1801d6c80
jmp case.0x18020665a.13
lea r8, [rsp + 0x70]
mov rcx, rsi
lea rdx, str.SOCKS5_connection_to__s_not_supported
call fcn.1801cd9c0
mov rdx, qword [rsp + 0x48]
mov rcx, rsi
call fcn.1801d6c80
jmp case.0x18020665a.13
mov r8, qword [rdi + 0x18]
lea rdx, str.Failed_to_resolve___s__for_SOCKS5_connect.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, reloc.WLDAP32.dll_Ordinal_27
jmp 0x180206faf
movzx eax, byte [rsp + 0x30]
mov word [r14], 0x105
mov ebx, 3
mov byte [r14 + 2], 0
test al, al
jne case.0x18020665a.13
mov rdx, qword [rdi + 0x18]
cmp byte [r8 + 0x33b], al
je 0x180206d30
lea r8, [rsp + 0x60]
lea ecx, [rbx + 0x14]
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x180206f76
movups xmm0, xmmword [rsp + 0x60]
mov byte [r14 + 3], 4
lea ebx, [rax + 0x13]
movups xmmword [r14 + 4], xmm0
jmp 0x180206d74
lea r8, [rsp + 0x40]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x180206d58
mov byte [r14 + 3], al
mov ebx, 8
mov eax, dword [rsp + 0x40]
mov dword [r14 + 4], eax
jmp 0x180206d74
mov byte [r14 + 3], bl
lea rcx, [r14 + 5]
mov byte [r14 + 4], r13b
mov r8, r13
mov rdx, qword [rdi + 0x18]
call fcn.18020cd80
lea rbx, [r13 + 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.1801cdb50
mov eax, dword [rdi + 0x20]
sar eax, 8
mov byte [rbx + r14], al
movzx eax, byte [rdi + 0x20]
mov byte [rbx + r14 + 1], al
lea rax, [rbx + 2]
cmp dword [rdi], 0xe
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], r14
je case.0x18020665a.14
mov dword [rdi], select
mov r9, qword [rdi + 8]
lea rax, [rsp + 0x50]
mov r8, qword [rdi + 0x10]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.1801cdf50
test eax, eax
je 0x180206df6
cmp eax, 0x51
je 0x180206df6
lea rdx, str.Failed_to_send_SOCKS5_connect_request.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, reloc.WLDAP32.dll_Ordinal_30
jmp 0x180206faf
mov rax, qword [rdi + 8]
mov rcx, qword [rsp + 0x50]
cmp rax, rcx
jne 0x1802067f5
cmp dword [rdi], 0xf
mov qword [rdi + 8], 0xa
mov qword [rdi + 0x10], r14
je case.0x18020665a.15
mov dword [rdi], reloc.WS2_32.dll_ntohs
mov r9, qword [rdi + 8]
lea rax, [rsp + 0x58]
mov r8, qword [rdi + 0x10]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.1801cdc70
mov rcx, qword [rsp + 0x58]
test eax, eax
je 0x180206e65
cmp eax, 0x51
je 0x180206e6e
lea rdx, str.Failed_to_receive_SOCKS5_connect_request_ack.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, reloc.WS2_32.dll_recv
jmp 0x180206faf
test rcx, rcx
je 0x180206a40
mov rax, qword [rdi + 8]
cmp rcx, rax
jne 0x1802067f5
cmp byte [r14], 5
je 0x180206e9a
lea rdx, str.SOCKS5_reply_has_wrong_version__version_should_be_5.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, 2
jmp 0x180206faf
movzx eax, byte [r14 + 1]
test al, al
je 0x180206ede
mov r8, qword [rdi + 0x18]
lea rdx, str.Cant_complete_SOCKS5_connection_to__s.___d_
movzx ebx, al
mov rcx, rsi
mov r9d, ebx
mov r14d, Ordinal_27
call fcn.1801cd9c0
cmp ebx, 9
jae 0x180206ed6
lea rcx, [0x180000000]
mov r14d, dword [rcx + rbx*4 + 0x408330]
mov eax, r14d
jmp 0x180206faf
movzx eax, byte [r14 + 3]
cmp al, 3
jne 0x180206efc
movzx eax, byte [r14 + 4]
add rax, 7
cmp rax, 0xa
jbe 0x180206f93
jmp 0x180206f05
cmp al, 4
jne 0x180206f63
mov eax, reloc.WLDAP32.dll_Ordinal_22
add rax, 0xfffffffffffffff6
cmp dword [rdi], 0x10
mov qword [rdi + 8], rax
lea rax, [r14 + 0xa]
mov qword [rdi + 0x10], rax
je case.0x18020665a.16
mov dword [rdi], reloc.WS2_32.dll_recv
mov r9, qword [rdi + 8]
lea rax, [rsp + 0x58]
mov r8, qword [rdi + 0x10]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.1801cdc70
mov rcx, qword [rsp + 0x58]
test eax, eax
je 0x180206f7d
cmp eax, 0x51
je 0x180206f86
lea rdx, str.Failed_to_receive_SOCKS5_connect_request_ack.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, reloc.WS2_32.dll_listen
jmp 0x180206faf
cmp al, 1
je 0x180206f93
lea rdx, str.SOCKS5_reply_has_wrong_address_type.
mov rcx, rsi
call fcn.1801cd9c0
mov eax, 1
jmp 0x180206faf
test rcx, rcx
je 0x180206a40
mov rax, qword [rdi + 8]
cmp rcx, rax
jne 0x1802067f5
cmp dword [rdi], 0x11
je case.0x18020665a.5
mov dword [rdi], reloc.WS2_32.dll_recvfrom
lea rdx, str.SOCKS5_request_granted.
mov rcx, rsi
call fcn.1801cdb50
xor eax, eax
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.1800b7d20
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret