Function at 0x1400c7650
Capabilities:
Check for time delay via gettickcount
Send data
Send data on socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x248]
sub rsp, 0x368
mov rax, qword [0x1402581e0]
xor rax, rsp
mov qword [rbp + 0x230], rax
mov rsi, qword [rbp + 0x2b8]
mov dword [rbp - 0x70], r9d
xor r9d, r9d
cmp dword [rsi + 0x188], 5
mov r14, qword [rsi + 0x1a8]
mov rdi, qword [rsi]
sete r9b
or r13, 0xffffffffffffffff
mov qword [rbp - 0x60], r8
mov qword [rbp - 0x50], rdx
mov r12, rcx
mov qword [rbp - 0x48], rsi
mov r15, r13
mov qword [rbp - 0x68], r14
mov qword [rbp - 0x40], rdi
mov dword [rbp - 0x78], r9d
inc r15
cmp byte [r8 + r15], 0
jne 0x1400c76c2
mov ebx, 1
test r9d, r9d
jne 0x1400c76f4
cmp r15, 0xff
jbe 0x1400c76f4
lea rdx, str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
mov r8, r15
mov rcx, rdi
call fcn.1400b89e0
mov dword [rbp - 0x78], ebx
mov r8d, dword [rdi + 0x338]
mov edx, dword [rdi + 0x33c]
xor ecx, ecx
test r8d, r8d
mov eax, 1
mov ebx, 0x493e0
cmovg ecx, eax
test edx, edx
jle 0x1400c771a
or ecx, 2
dec ecx
je 0x1400c7735
dec ecx
je 0x1400c7731
dec ecx
jne 0x1400c7738
mov ebx, edx
cmp r8d, edx
cmovl ebx, r8d
jmp 0x1400c7738
mov ebx, edx
jmp 0x1400c7738
mov ebx, r8d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
mov eax, 0x10624dd3
mov r9d, edx
shr r9d, 6
mov dword [rbp - 0x80], r9d
imul ecx, r9d, 0x3e8
sub r8d, ecx
imul ecx, r8d, 0x3e8
mov dword [rbp - 0x7c], ecx
mov rcx, qword [rdi + 0x7d0]
mov r8, qword [rbp - 0x80]
mov rdx, rcx
shr r8, 0x20
sub ecx, r9d
shr rdx, 0x20
sub r8d, edx
imul r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, ecx, 0x3e8
sub eax, edx
add ebx, eax
test ebx, ebx
jg 0x1400c77bd
lea rdx, str.Connection_time_out
mov rcx, rdi
call fcn.1400b8ac0
mov eax, 0x1c
jmp 0x1400c8022
mov eax, 1
lea r8, [rbp - 0x80]
mov edx, 0x8004667e
mov rcx, r14
mov dword [rbp - 0x80], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r9d, ebx
mov r8, r14
mov rcx, r13
call fcn.1400b8290
cmp eax, 0xffffffff
jne 0x1400c77f9
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_no_connection_here
jmp 0x1400c8018
test eax, eax
jne 0x1400c7816
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_connection_timeout
call fcn.1400b8ac0
mov eax, 0x1c
jmp 0x1400c8022
test al, 4
je 0x1400c7829
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_error_occurred_during_connection
jmp 0x1400c8018
test r12, r12
lea r8, [rbp - 0x80]
mov edx, 0x8004667e
setne al
mov rcx, r14
mov byte [rbp - 0x30], 5
add al, 2
mov word [rbp - 0x2e], 0x100
mov byte [rbp - 0x2c], 2
mov byte [rbp - 0x2f], al
mov dword [rbp - 0x80], 0
call qword [sym.imp.WS2_32.dll_ioctlsocket]
movzx eax, byte [rbp - 0x2f]
lea rdx, [rbp - 0x30]
add eax, 2
movsxd r8, eax
xor eax, eax
cmp r14, qword [rsi + 0x1b0]
sete al
xor r9d, r9d
mov rcx, qword [rsi + rax*8 + 0x1a8]
call qword [sym.imp.WS2_32.dll_send]
xor r14d, r14d
movsxd r13, eax
mov qword [rbp - 0x58], r13
cmp r13, 0xffffffffffffffff
jne 0x1400c78d6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
cmp eax, 0x2733
je 0x1400c800e
mov edx, eax
mov rcx, rsi
call fcn.1400ca7f0
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b8ac0
mov rcx, qword [rsi]
mov dword [rcx + 0x88d4], r14d
mov r14d, 0x37
test r14d, r14d
jne 0x1400c800e
movzx eax, byte [rbp - 0x2f]
add eax, 2
cdqe
cmp r13, rax
jne 0x1400c800e
mov r13, qword [rbp - 0x68]
mov eax, 1
lea r8, [rbp - 0x80]
mov edx, 0x8004667e
mov rcx, r13
mov dword [rbp - 0x80], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r9d, ebx
or r8, 0xffffffffffffffff
mov rcx, r13
call fcn.1400b8290
cmp eax, 0xffffffff
jne 0x1400c7932
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_nothing_to_read
jmp 0x1400c8018
test eax, eax
jne 0x1400c794f
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_read_timeout
call fcn.1400b8ac0
mov eax, 0x1c
jmp 0x1400c8022
test al, 4
je 0x1400c796c
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_read_error_occurred
call fcn.1400b8ac0
mov eax, 0x38
jmp 0x1400c8022
lea r8, [rbp - 0x80]
mov edx, 0x8004667e
mov rcx, r13
mov dword [rbp - 0x80], 0
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rax, [rbp - 0x80]
lea r8, [rbp - 0x30]
mov r9d, 2
mov rdx, r13
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1400c6ec0
test eax, eax
jne 0x1400c8005
cmp qword [rbp - 0x80], 2
jne 0x1400c8005
cmp byte [rbp - 0x30], 5
je 0x1400c79c8
lea rdx, str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x1400c8015
movzx eax, byte [rbp - 0x2f]
test al, al
je 0x1400c7b94
cmp al, 1
jne 0x1400c79f7
mov rdx, rsi
call fcn.1400d2bb0
mov r14d, eax
test eax, eax
je 0x1400c7b94
lea rdx, str.Unable_to_negotiate_SOCKS5_GSS_API_context.
jmp 0x1400c8015
cmp al, 2
jne 0x1400c7b61
mov r13, qword [rbp - 0x50]
test r12, r12
je 0x1400c7a2e
test r13, r13
je 0x1400c7a2e
or rax, 0xffffffffffffffff
mov rbx, rax
inc rbx
cmp byte [r12 + rbx], 0
jne 0x1400c7a14
mov r14, rax
inc r14
cmp byte [r13 + r14], 0
jne 0x1400c7a21
jmp 0x1400c7a33
xor ebx, ebx
xor r14d, r14d
mov byte [rbp - 0x30], 1
mov byte [rbp - 0x2f], bl
test r12, r12
je 0x1400c7a53
test rbx, rbx
je 0x1400c7a53
lea rcx, [rbp - 0x2e]
mov r8, rbx
mov rdx, r12
call sub.MSVCR120.dll_memcpy
mov byte [rbp + rbx - 0x2e], r14b
add rbx, 3
test r13, r13
je 0x1400c7a78
test r14, r14
je 0x1400c7a78
lea rcx, [rbp - 0x30]
mov r8, r14
mov rdx, r13
add rcx, rbx
call sub.MSVCR120.dll_memcpy
mov r12, qword [rbp - 0x68]
xor eax, eax
add rbx, r14
cmp r12, qword [rsi + 0x1b0]
lea rdx, [rbp - 0x30]
mov r8d, ebx
sete al
xor r9d, r9d
mov rcx, qword [rsi + rax*8 + 0x1a8]
call qword [sym.imp.WS2_32.dll_send]
xor r14d, r14d
movsxd r13, eax
mov qword [rbp - 0x58], r13
cmp r13, 0xffffffffffffffff
jne 0x1400c7af3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
cmp eax, 0x2733
je 0x1400c7b55
mov edx, eax
mov rcx, rsi
call fcn.1400ca7f0
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b8ac0
mov rcx, qword [rsi]
mov dword [rcx + 0x88d4], r14d
mov r14d, 0x37
test r14d, r14d
jne 0x1400c7b55
cmp rbx, r13
jne 0x1400c7b55
lea rax, [rbp - 0x80]
lea r9d, [r14 + 2]
lea r8, [rbp - 0x30]
mov rdx, r12
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1400c6ec0
test eax, eax
jne 0x1400c7b49
cmp qword [rbp - 0x80], 2
jne 0x1400c7b49
movzx eax, byte [rbp - 0x2f]
test al, al
je 0x1400c7b94
movzx r8d, byte [rbp - 0x30]
lea rdx, str.User_was_rejected_by_the_SOCKS5_server___d__d_.
movzx r9d, al
mov rcx, rdi
call fcn.1400b8ac0
jmp 0x1400c801d
lea rdx, str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x1400c8015
lea rdx, str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x1400c8015
cmp al, 0xff
jne 0x1400c7b88
test r12, r12
je 0x1400c7b7c
cmp byte [r12], 0
lea rdx, str.No_authentication_method_was_acceptable.
jne 0x1400c8015
lea rdx, str.No_authentication_method_was_acceptable.__It_is_quite_likely_that_the_SOCKS5_server_wanted_a_username_password__since_none_was_supplied_to_the_server_on_this_connection._
jmp 0x1400c8015
lea rdx, str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x1400c8015
cmp dword [rbp - 0x78], 0
mov word [rbp - 0x30], 0x105
mov ebx, 3
mov byte [rbp - 0x2e], 0
jne 0x1400c7bcc
mov r13, qword [rbp - 0x60]
lea rcx, [rbp - 0x2b]
mov r8, r15
mov rdx, r13
mov byte [rbp - 0x2d], bl
mov byte [rbp - 0x2c], r15b
call sub.MSVCR120.dll_memcpy
lea rbx, [r15 + 5]
jmp 0x1400c7ce3
mov r15, qword [rbp - 0x60]
mov r8d, dword [rbp - 0x70]
lea r9, [rbp - 0x78]
mov rdx, r15
mov rcx, rsi
call fcn.1400b73e0
cmp eax, 0xffffffff
je 0x1400c7ffe
cmp eax, 1
jne 0x1400c7c08
lea rdx, [rbp - 0x78]
mov rcx, rsi
call fcn.1400b7de0
mov r14d, eax
test eax, eax
jne 0x1400c8022
mov rax, qword [rbp - 0x78]
test rax, rax
je 0x1400c7fec
mov r13, qword [rax]
test r13, r13
je 0x1400c7fec
mov eax, dword [r13 + 4]
cmp eax, 2
jne 0x1400c7c88
mov ebx, 4
mov byte [rbp - 0x2d], 1
mov r12, qword [r13 + 0x20]
lea rcx, [rbp - 0x2c]
mov r15d, ebx
sub r12, rcx
add r12, rbx
or rsi, 0xffffffffffffffff
nop dword [rax + rax]
lea rax, [r12 + rbx]
inc rbx
lea rdx, [0x14025a1bc]
movzx ecx, byte [rbp + rax - 0x30]
lea rax, [rsi + rbx]
mov byte [rbp + rbx - 0x31], cl
movzx r8d, byte [rbp + rax - 0x30]
mov rcx, rdi
call fcn.1400b89e0
dec r15
jne 0x1400c7c50
mov rsi, qword [rbp - 0x48]
mov r15, qword [rbp - 0x60]
jmp 0x1400c7cca
cmp eax, 0x17
jne 0x1400c7cc7
mov byte [rbp - 0x2d], 4
mov r8, qword [r13 + 0x20]
lea rcx, [rbp - 0x2c]
sub r8, rcx
lea ebx, [rax - 0x13]
lea edx, [rax - 7]
add r8, 8
nop word [rax + rax]
lea rax, [r8 + rbx]
inc rbx
movzx ecx, byte [rbp + rax - 0x30]
mov byte [rbp + rbx - 0x31], cl
dec rdx
jne 0x1400c7cb0
jmp 0x1400c7cca
xor r13d, r13d
mov rdx, qword [rbp - 0x78]
mov rcx, rdi
call fcn.1400b75a0
test r13, r13
je 0x1400c7fec
mov r13, qword [rbp - 0x60]
mov ecx, dword [rbp - 0x70]
add rbx, 2
mov eax, ecx
sar eax, 8
cmp dword [rsi + 0x7b0], 0
mov byte [rbp + rbx - 0x32], al
mov byte [rbp + rbx - 0x31], cl
je 0x1400c7d19
lea rdx, [0x14025c320]
mov rcx, rdi
call fcn.1400b8ac0
mov r15, qword [rbp - 0x58]
mov r12, qword [rbp - 0x68]
jmp 0x1400c7d92
mov r12, qword [rbp - 0x68]
xor eax, eax
lea rdx, [rbp - 0x30]
cmp r12, qword [rsi + 0x1b0]
mov r8d, ebx
sete al
xor r9d, r9d
mov rcx, qword [rsi + rax*8 + 0x1a8]
call qword [sym.imp.WS2_32.dll_send]
xor r14d, r14d
movsxd r15, eax
cmp r15, 0xffffffffffffffff
jne 0x1400c7d92
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
cmp eax, 0x2733
jne 0x1400c7d66
xor r15d, r15d
lea r14d, [r15 + 0x51]
jmp 0x1400c7d92
mov edx, eax
mov rcx, rsi
call fcn.1400ca7f0
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b8ac0
mov rax, qword [rsi]
mov dword [rax + 0x88d4], r14d
mov r14d, 0x37
test r14d, r14d
jne 0x1400c7fe3
cmp rbx, r15
jne 0x1400c7fe3
lea ebx, [r14 + 0xa]
cmp dword [rsi + 0x7b0], r14d
je 0x1400c7dcc
lea rdx, str.SOCKS5_GSS_API_protection_not_yet_implemented.
mov rcx, rdi
call fcn.1400b8ac0
lea rdx, [0x14025c3a8]
jmp 0x1400c8015
lea rax, [rbp - 0x80]
lea r8, [rbp - 0x30]
mov r9, rbx
mov rdx, r12
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1400c6ec0
test eax, eax
jne 0x1400c7dc0
cmp qword [rbp - 0x80], rbx
jne 0x1400c7dc0
cmp byte [rbp - 0x30], 5
je 0x1400c7e03
lea rdx, str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x1400c8015
movzx r8d, byte [rbp - 0x2f]
movzx eax, byte [rbp - 0x2d]
test r8b, r8b
je 0x1400c7f69
cmp al, 1
jne 0x1400c7e64
movzx eax, byte [rbp - 0x27]
movzx ecx, byte [rbp - 0x2a]
movzx r10d, byte [rbp - 0x28]
movzx r9d, byte [rbp - 0x2b]
movzx edx, r8b
movzx r8d, byte [rbp - 0x2c]
mov dword [rsp + 0x38], edx
shl r10d, 8
lea rdx, str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
or r10d, eax
movzx eax, byte [rbp - 0x29]
mov dword [rsp + 0x30], r10d
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, rdi
call fcn.1400b8ac0
jmp 0x1400c801d
cmp al, 3
jne 0x1400c7e97
movzx r9d, byte [rbp - 0x28]
movzx eax, byte [rbp - 0x27]
movzx ecx, r8b
shl r9d, 8
mov dword [rsp + 0x20], ecx
lea rdx, str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
mov r8, r13
mov rcx, rdi
or r9d, eax
call fcn.1400b8ac0
jmp 0x1400c801d
cmp al, 4
jne 0x1400c801d
movzx ecx, byte [rbp - 0x27]
movzx r12d, byte [rbp - 0x2f]
movzx edx, byte [rbp - 0x1f]
movzx eax, byte [rbp - 0x28]
movzx r10d, byte [rbp - 0x20]
movzx r11d, byte [rbp - 0x21]
movzx ebx, byte [rbp - 0x22]
movzx edi, byte [rbp - 0x23]
movzx esi, byte [rbp - 0x24]
movzx r14d, byte [rbp - 0x25]
movzx r15d, byte [rbp - 0x26]
movzx r13d, byte [rbp - 0x2a]
movzx r9d, byte [rbp - 0x2b]
movzx r8d, byte [rbp - 0x2c]
mov dword [rsp + 0x98], r12d
shl eax, 8
or eax, ecx
movzx ecx, byte [rbp - 0x1e]
mov dword [rbp - 0x80], eax
movzx eax, byte [rbp - 0x1d]
mov r12d, dword [rbp - 0x80]
mov dword [rsp + 0x90], r12d
movzx r12d, byte [rbp - 0x29]
mov dword [rsp + 0x88], eax
movzx eax, byte [rbp - 0x27]
mov dword [rsp + 0x80], ecx
mov rcx, qword [rbp - 0x40]
mov dword [rsp + 0x78], edx
mov dword [rsp + 0x70], r10d
mov dword [rsp + 0x68], r11d
mov dword [rsp + 0x60], ebx
mov dword [rsp + 0x58], edi
mov dword [rsp + 0x50], esi
mov dword [rsp + 0x48], r14d
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x38], eax
movzx eax, byte [rbp - 0x28]
lea rdx, str.Cant_complete_SOCKS5_connection_to__02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_02x_02x:_d.___d_
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r13d
call fcn.1400b8ac0
jmp 0x1400c801d
cmp al, 3
jne 0x1400c7f79
movzx eax, byte [rbp - 0x2c]
add eax, 7
movsxd rbx, eax
jmp 0x1400c7f84
mov ecx, reloc.WS2_32.dll_shutdown
cmp al, 4
cmove rbx, rcx
cmp dword [rsi + 0x7b0], 0
jne 0x1400c7fc5
cmp rbx, 0xa
jle 0x1400c7fc5
lea rax, [rbp - 0x80]
sub rbx, 0xa
lea r8, [rbp - 0x26]
mov rdx, r12
mov rcx, rsi
mov r9, rbx
mov qword [rsp + 0x20], rax
call fcn.1400c6ec0
test eax, eax
jne 0x1400c7fbc
cmp rbx, qword [rbp - 0x80]
je 0x1400c7fc5
lea rdx, str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x1400c8015
mov eax, 1
lea r8, [rbp - 0x80]
mov edx, 0x8004667e
mov rcx, r12
mov dword [rbp - 0x80], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x1400c8022
lea rdx, str.Failed_to_send_SOCKS5_connect_request.
jmp 0x1400c8015
lea rdx, str.Failed_to_resolve___s__for_SOCKS5_connect.
mov r8, r15
mov rcx, rdi
call fcn.1400b8ac0
mov eax, 6
jmp 0x1400c8022
lea rdx, str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x1400c8015
lea rdx, str.Unable_to_send_initial_SOCKS5_request.
mov rcx, rdi
call fcn.1400b8ac0
mov eax, 7
mov rcx, qword [rbp + 0x230]
xor rcx, rsp
call fcn.1401bddc0
add rsp, 0x368
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret