Function at 0x1400060d0
Capabilities:
Resolve dns

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x560]
sub rsp, 0x660
xor eax, eax
mov edi, r9d
mov r14, rdx
mov qword [rsp + 0x68], rax
mov r13, rcx
mov dword [rsp + 0x70], eax
xorps xmm0, xmm0
mov byte [rbp + 0x5b8], al
lea r9, [rax - 1]
mov edx, 0x100
lea rcx, [rbp + 0x360]
movups xmmword [rsp + 0x58], xmm0
call fcn.14003c5c8
mov edx, 0x100
lea rcx, [rbp + 0x360]
call fcn.14003ecb4
cmp word [rbp + 0x360], 0
mov dword [rsp + 0x40], edi
je 0x140006810
lea r9, [rbp + 0x5b8]
lea r8, [rsp + 0x40]
lea rdx, [rbp + 0x360]
call fcn.140066370
test al, al
je 0x140006810
lea r8, [rbp - 0x30]
mov qword [rsp + 0x6b0], r12
lea rdx, [rbp + 0x360]
call fcn.140061db0
xor esi, esi
mov r15d, 2
test al, al
jne 0x14000619a
mov dword [rsp + 0x48], esi
jmp 0x14000634d
lea r8, [rbp - 0x70]
mov qword [rbp - 0x70], rsi
lea rdx, [0x1401b93ac]
mov r12d, esi
lea rcx, [rbp + 0x50]
call fcn.140040fdc
mov rdi, rax
test rax, rax
je 0x140006343
mov r14, rsi
mov qword [rsp + 0x48], rsi
nop dword [rax]
cmp r12d, 1
jge 0x140006313
xorps xmm0, xmm0
mov qword [rbp - 0x68], 0
xorps xmm1, xmm1
mov qword [rsp + 0x50], rsi
lea r9, [rsp + 0x50]
mov dword [rbp - 0x60], 1
lea r8, [rbp - 0x68]
mov dword [rbp - 0x5c], 6
xor edx, edx
mov rcx, rdi
movdqu xmmword [rbp - 0x58], xmm0
movdqu xmmword [rbp - 0x48], xmm1
call qword [sym.imp.WS2_32.dll_GetAddrInfoW]
test eax, eax
jne 0x140006313
mov rbx, qword [rsp + 0x50]
test rbx, rbx
je 0x140006313
imul rax, r14, 0x1c
lea rcx, [rsp + 0x58]
add rcx, rax
lea r13, [rsp + 0x5a]
mov qword [rsp + 0x78], rcx
lea rdx, [rsp + 0x5c]
lea rcx, [rsp + 0x60]
add r13, rax
add rcx, rax
add rdx, rax
mov qword [rbp - 0x78], rcx
mov qword [rbp - 0x80], rdx
cmp dword [rbx + 4], 2
mov r15, rdi
jne 0x1400062f9
mov rsi, qword [rbx + 0x20]
add rsi, 4
cmp dword [rsi], 0
je 0x1400062f9
cmp r12d, 1
jge 0x1400062f9
movsxd rax, r12d
lea r14, [rsp + 0x58]
imul rdx, rax, 0x1c
xor eax, eax
mov ecx, 7
add r14, rdx
mov rdi, r14
rep stosd dword [rdi], eax
lea rdi, [rsp + 0x5c]
mov ecx, 1
add rdi, rdx
rep movsd dword [rdi], dword [rsi]
movzx ecx, word [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_htons]
mov rsi, qword [rsp + 0x78]
mov r8, r14
mov rdx, r15
mov word [r13], ax
mov word [rsi], 2
call fcn.140062390
mov r14, qword [rsp + 0x48]
add rsi, 0x1c
add qword [rbp - 0x80], 0x1c
inc r14
inc r12d
mov qword [rsp + 0x48], r14
add r13, 0x1c
mov qword [rsp + 0x78], rsi
add qword [rbp - 0x78], 0x1c
mov rdi, r15
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140006260
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_FreeAddrInfoW]
xor esi, esi
lea r8, [rbp - 0x70]
xor ecx, ecx
lea rdx, [0x1401b93ac]
call fcn.140040fdc
mov rdi, rax
test rax, rax
jne 0x1400061d0
mov r13, qword [rbp + 0x5a0]
lea r15d, [rax + 2]
mov r14, qword [rbp + 0x5a8]
mov dword [rsp + 0x48], r12d
test r12d, r12d
jne 0x140006380
mov r8d, dword [rsp + 0x40]
lea rax, [rsp + 0x48]
mov word [rsp + 0x30], r15w
lea r9, [rsp + 0x58]
mov dword [rsp + 0x28], 1
lea rdx, [rbp + 0x360]
mov qword [rsp + 0x20], rax
call fcn.140062500
mov r12d, eax
test eax, eax
mov r12, qword [rsp + 0x6b0]
je 0x140006810
mov r9d, dword [rbp + 0x5c0]
lea rbx, [r14 + 4]
mov rdx, rbx
mov byte [rsp + 0x28], 0
mov r8d, 0x438
mov qword [rsp + 0x20], rsi
mov rcx, r13
call fcn.140006d60
test al, al
jne 0x1400063e1
lea r9, str.socks5___connect_to__s_failed
lea rcx, [r13 + 0x2ac]
mov qword [rsp + 0x20], rbx
mov edx, 0x100
mov r8, 0xffffffffffffffff
call fcn.140003dd0
jmp 0x14000682f
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], esi
mov r8d, 4
mov qword [rsp + 0x48], rsi
lea rdx, [rbp - 0x30]
mov dword [rbp - 0x30], 0x2000205
mov rcx, r13
call fcn.140007f30
test al, al
jne 0x14000643d
lea r9, str.socks5___send_init_to__s_failed_with__u_error
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov edx, 0x100
lea rcx, [r13 + 0x2ac]
mov r8, 0xffffffffffffffff
call fcn.140003dd0
jmp 0x14000682f
mov byte [rsp + 0x30], 0
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0x1388
lea r9, [rsp + 0x48]
mov r8, r15
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x30]
mov rcx, r13
call fcn.140007bb0
test al, al
jne 0x140006475
lea r9, str.socks5___read_init_from__s_failed_with__u_error
jmp 0x140006413
movsx eax, byte [rbp - 0x30]
cmp al, 5
je 0x14000648f
mov qword [rsp + 0x28], rbx
lea r9, str.socks5___invalid_version_0x_X_of__s
mov dword [rsp + 0x20], eax
jmp 0x140006420
movsx eax, byte [rbp - 0x2f]
test al, al
je 0x14000665d
cmp al, 2
je 0x1400064b4
mov qword [rsp + 0x28], rbx
lea r9, str.socks5___invalid_authorization_model_0x_X_of__s
mov dword [rsp + 0x20], eax
jmp 0x140006420
lea r8, [r14 + 0x104]
cmp word [r8], 0
je 0x140006651
lea rdi, [r14 + 0x184]
cmp word [rdi], 0
je 0x140006651
mov qword [rsp + 0x38], rsi
lea rax, [rbp + 0x260]
xor edx, edx
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x7f
mov ecx, 0xfde9
mov qword [rsp + 0x20], rax
lea r9d, [rdx - 1]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov qword [rsp + 0x38], rsi
mov r9d, 0xffffffff
movsxd r14, eax
mov r8, rdi
lea rax, [rbp + 0x2e0]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x7f
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, r14
mov byte [rbp + 0x2df], 0
shr rcx, 2
lea rdi, [rbp - 0x2e]
lea rsi, [rbp + 0x260]
mov byte [rbp - 0x30], 1
mov byte [rbp - 0x2f], r14b
mov rdx, r14
rep movsd dword [rdi], dword [rsi]
mov rcx, r14
movsxd r8, eax
mov byte [rbp + 0x35f], 0
and ecx, 3
je 0x14000658f
mov rax, rdx
lea rsi, [rbp + 0x260]
and rax, 0xfffffffffffffffc
lea rdi, [rbp - 0x2e]
add rsi, rax
add rdi, rax
rep movsb byte [rdi], byte [rsi]
lea r9, [rbp - 0x2d]
mov byte [rbp + r14 - 0x2e], r8b
add r9, rdx
lea rsi, [rbp + 0x2e0]
mov rcx, r8
mov rdi, r9
shr rcx, 2
mov rax, r8
rep movsd dword [rdi], dword [rsi]
mov rcx, r8
and ecx, 3
je 0x1400065cd
and rax, 0xfffffffffffffffc
lea rsi, [rbp + 0x2e0]
add rsi, rax
lea rdi, [rax + r9]
rep movsb byte [rdi], byte [rsi]
lea eax, [r8 + 3]
mov rcx, r13
add eax, r14d
lea r9, [rsp + 0x40]
movsxd r8, eax
lea rdx, [rbp - 0x30]
call fcn.140007f30
test al, al
jne 0x1400065f8
lea r9, str.socks5___send_auth_to__s_failed_with__u_error
jmp 0x140006413
mov byte [rsp + 0x30], 0
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0x1388
lea r9, [rsp + 0x48]
mov r8, r15
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x30]
mov rcx, r13
call fcn.140007bb0
test al, al
jne 0x140006633
lea r9, str.socks5___read_auth_from__s_failed_with__u_error
jmp 0x140006413
movsx eax, byte [rbp - 0x30]
cmp al, 1
jne 0x14000647d
cmp byte [rbp - 0x2f], 0
je 0x14000665d
lea r9, str.socks5___invalid_login_password_of__s
jmp 0x1400063bf
lea r8, str.socks5___enter_login__password_to_logon
jmp 0x140006817
mov dword [rbp - 0x30], 0x1000105
lea rdi, [rbp - 0x2c]
lea rsi, [rsp + 0x5c]
mov ecx, 1
rep movsd dword [rdi], dword [rsi]
xor ecx, ecx
lea rdi, [rbp - 0x28]
lea rsi, [rsp + 0x5a]
mov r8d, 0xa
rep movsd dword [rdi], dword [rsi]
lea rdi, [rbp - 0x28]
mov rcx, r15
lea rsi, [rsp + 0x5a]
rep movsb byte [rdi], byte [rsi]
mov rcx, r13
lea r9, [rsp + 0x40]
lea rdx, [rbp - 0x30]
call fcn.140007f30
test al, al
jne 0x1400066b6
lea r9, str.socks5___send_to__s_failed_with__u_error
jmp 0x140006413
mov byte [rsp + 0x30], 0
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0x1388
lea r9, [rsp + 0x48]
mov r8d, 4
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x30]
mov rcx, r13
call fcn.140007bb0
test al, al
jne 0x1400066f4
lea r9, str.socks5___read_from__s_failed_with__u_error
jmp 0x140006413
movsx eax, byte [rbp - 0x30]
cmp al, 5
jne 0x14000647d
movsx eax, byte [rbp - 0x2f]
test al, al
je 0x140006794
dec eax
cmp eax, 7
ja case.default.0x140006726
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x6844]
add rcx, rdx
jmp rcx
lea r8, str.socks5___general_SOCKS_server_failure
jmp 0x140006817
lea r8, str.socks5___connection_is_not_allowed_by_ruleset
jmp 0x140006817
lea r8, str.socks5___network_unreachable
jmp 0x140006817
lea r8, str.socks5___host_unreachable
jmp 0x140006817
lea r8, str.socks5___connection_rejected
jmp 0x140006817
lea r8, str.socks5___TTL_expired
jmp 0x140006817
lea r8, str.socks5___command_not_supported
jmp 0x140006817
lea r8, str.socks5___address_type_not_supported
jmp 0x140006817
lea r8, str.socks5___unknown_error
jmp 0x140006817
mov byte [rsp + 0x30], 0
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0x1388
lea r9, [rsp + 0x48]
mov r8d, 6
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x30]
mov rcx, r13
call fcn.140007bb0
mov edx, 0x100
test al, al
jne 0x1400067e4
mov eax, dword [rsp + 0x40]
lea r9, str.socks5___read_from__s_failed_with__u_error
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
jmp 0x140006425
lea rcx, [r13 + 0xac]
mov r9, 0xffffffffffffffff
lea r8, [rbp + 0x360]
call fcn.14003c5c8
movzx eax, byte [rbp + 0x5b8]
mov byte [r13 + 0x4c8], al
mov al, 1
jmp 0x140006831
lea r8, str.socks5___resolve_failed
mov r9, 0xffffffffffffffff
lea rcx, [r13 + 0x2ac]
mov edx, 0x100
call fcn.14003c5c8
xor al, al
add rsp, 0x660
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret