Function at 0x140005c60
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 - 0x460]
sub rsp, 0x560
xor eax, eax
mov edi, r9d
mov rsi, rdx
mov qword [rsp + 0x70], rax
mov r14, rcx
mov dword [rsp + 0x78], eax
xorps xmm0, xmm0
mov byte [rbp + 0x4b8], al
lea r9, [rax - 1]
mov edx, 0x100
lea rcx, [rbp - 0x30]
movups xmmword [rsp + 0x60], xmm0
call fcn.14003c5c8
mov edx, 0x100
lea rcx, [rbp - 0x30]
call fcn.14003ecb4
cmp word [rbp - 0x30], 0
mov dword [rsp + 0x40], edi
je 0x140006098
lea r9, [rbp + 0x4b8]
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x30]
call fcn.140066370
test al, al
je 0x140006098
lea r8, [rbp + 0x1d0]
mov qword [rsp + 0x5b0], r12
lea rdx, [rbp - 0x30]
call fcn.140061db0
xor r13d, r13d
mov r15d, 2
test al, al
jne 0x140005d20
mov dword [rsp + 0x48], r13d
jmp 0x140005ed4
lea r8, [rsp + 0x50]
mov qword [rsp + 0x50], r13
lea rdx, [0x1401b93ac]
mov r12d, r13d
lea rcx, [rbp + 0x250]
call fcn.140040fdc
mov rdi, rax
test rax, rax
je 0x140005eca
mov r14, r13
mov qword [rsp + 0x48], r13
cmp r12d, 1
jge 0x140005e99
xorps xmm0, xmm0
mov qword [rbp - 0x68], 0
xorps xmm1, xmm1
mov qword [rsp + 0x58], r13
lea r9, [rsp + 0x58]
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 0x140005e99
mov rbx, qword [rsp + 0x58]
test rbx, rbx
je 0x140005e99
imul rax, r14, 0x1c
lea rcx, [rsp + 0x60]
add rcx, rax
lea r13, [rsp + 0x62]
mov qword [rbp - 0x80], rcx
lea rdx, [rsp + 0x64]
lea rcx, [rsp + 0x68]
add r13, rax
add rcx, rax
add rdx, rax
mov qword [rbp - 0x70], rcx
mov qword [rbp - 0x78], rdx
cmp dword [rbx + 4], 2
mov r15, rdi
jne 0x140005e7e
mov rsi, qword [rbx + 0x20]
add rsi, 4
cmp dword [rsi], 0
je 0x140005e7e
cmp r12d, 1
jge 0x140005e7e
movsxd rax, r12d
lea r14, [rsp + 0x60]
imul rdx, rax, 0x1c
xor eax, eax
mov ecx, 7
add r14, rdx
mov rdi, r14
rep stosd dword [rdi], eax
lea rdi, [rsp + 0x64]
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 [rbp - 0x80]
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 - 0x78], 0x1c
inc r14
inc r12d
mov qword [rsp + 0x48], r14
add r13, 0x1c
mov qword [rbp - 0x80], rsi
add qword [rbp - 0x70], 0x1c
mov rdi, r15
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140005de3
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WS2_32.dll_FreeAddrInfoW]
xor r13d, r13d
lea r8, [rsp + 0x50]
xor ecx, ecx
lea rdx, [0x1401b93ac]
call fcn.140040fdc
mov rdi, rax
test rax, rax
jne 0x140005d54
mov r14, qword [rbp + 0x4a0]
lea r15d, [rax + 2]
mov rsi, qword [rbp + 0x4a8]
mov dword [rsp + 0x48], r12d
test r12d, r12d
jne 0x140005f04
mov r8d, dword [rsp + 0x40]
lea rax, [rsp + 0x48]
mov word [rsp + 0x30], r15w
lea r9, [rsp + 0x60]
mov dword [rsp + 0x28], 1
lea rdx, [rbp - 0x30]
mov qword [rsp + 0x20], rax
call fcn.140062500
mov r12d, eax
test eax, eax
mov r12, qword [rsp + 0x5b0]
je 0x140006098
mov r9d, dword [rbp + 0x4c0]
lea rbx, [rsi + 4]
mov rdx, rbx
mov byte [rsp + 0x28], 0
mov r8d, 0x438
mov qword [rsp + 0x20], r13
mov rcx, r14
call fcn.140006d60
test al, al
jne 0x140005f65
lea rcx, [r14 + 0x2ac]
mov qword [rsp + 0x20], rbx
lea r9, str.socks4___connect_to__s_failed
mov edx, 0x100
mov r8, 0xffffffffffffffff
call fcn.140003dd0
jmp 0x1400060b7
xor ecx, ecx
mov word [rbp - 0x68], 0x104
mov word [rbp - 0x60], 0
lea rdi, [rbp - 0x66]
lea rsi, [rsp + 0x62]
mov dword [rsp + 0x40], r13d
rep movsd dword [rdi], dword [rsi]
lea rdi, [rbp - 0x66]
mov rcx, r15
lea rsi, [rsp + 0x62]
mov r8d, 9
rep movsb byte [rdi], byte [rsi]
lea rdi, [rbp - 0x64]
mov ecx, 1
lea rsi, [rsp + 0x64]
rep movsd dword [rdi], dword [rsi]
mov rcx, r14
lea r9, [rsp + 0x40]
lea rdx, [rbp - 0x68]
call fcn.140007f30
test al, al
jne 0x140005fed
lea r9, str.socks4___send_to__s_failed_with__u_error
mov eax, dword [rsp + 0x40]
lea rcx, [r14 + 0x2ac]
mov dword [rsp + 0x28], eax
mov edx, 0xff
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x20], rbx
call fcn.140003dd0
jmp 0x1400060b7
mov byte [rsp + 0x30], 0
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 0x1388
lea r9, [rsp + 0x50]
mov r8d, 8
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x68]
mov qword [rsp + 0x50], r13
mov rcx, r14
call fcn.140007bb0
test al, al
jne 0x14000602d
lea r9, str.socks4___read_from__s_failed_with__u_error
jmp 0x140005fc3
movsx eax, byte [rbp - 0x67]
cmp al, 0x5a
je 0x14000606a
mov ecx, eax
sub ecx, 0x5b
je 0x140006061
sub ecx, 1
je 0x140006058
cmp ecx, 1
je 0x14000604f
lea r8, str.socks4___unknown_error
jmp 0x14000609f
lea r8, str.socks4___request_rejected_because_the_client_program_and_identd_report_have_different_user_ids
jmp 0x14000609f
lea r8, str.socks4___request_rejected_because_SOCKS_server_cannot_connect_to_identd_on_the_client
jmp 0x14000609f
lea r8, str.socks4___request_rejected_or_failed
jmp 0x14000609f
lea rcx, [r14 + 0xac]
mov r9, 0xffffffffffffffff
lea r8, [rbp - 0x30]
mov edx, 0x100
call fcn.14003c5c8
movzx eax, byte [rbp + 0x4b8]
mov byte [r14 + 0x4c8], al
mov al, 1
jmp 0x1400060b9
lea r8, str.socks4___resolve_failed
mov r9, 0xffffffffffffffff
lea rcx, [r14 + 0x2ac]
mov edx, 0x100
call fcn.14003c5c8
xor al, al
add rsp, 0x560
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret