Function at 0x1400c8650
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 [0x140264330]
xor rax, rsp
mov qword [rbp + 0x230], rax
mov rsi, qword [rbp + 0x2b8]
mov dword [rbp - 0x68], 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 - 0x58], r8
mov qword [rbp - 0x50], rdx
mov r12, rcx
mov qword [rbp - 0x48], rsi
mov r15, r13
mov qword [rbp - 0x60], r14
mov qword [rbp - 0x40], rdi
mov dword [rbp - 0x70], r9d
inc r15
cmp byte [r8 + r15], 0
jne 0x1400c86c2
mov ebx, 1
test r9d, r9d
jne 0x1400c86f4
cmp r15, 0xff
jbe 0x1400c86f4
lea rdx, str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
mov r8, r15
mov rcx, rdi
call fcn.1400b99e0
mov dword [rbp - 0x70], 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 0x1400c871a
or ecx, 2
dec ecx
je 0x1400c8735
dec ecx
je 0x1400c8731
dec ecx
jne 0x1400c8738
mov ebx, edx
cmp r8d, edx
cmovl ebx, r8d
jmp 0x1400c8738
mov ebx, edx
jmp 0x1400c8738
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 - 0x78], r9d
imul ecx, r9d, 0x3e8
sub r8d, ecx
imul ecx, r8d, 0x3e8
mov dword [rbp - 0x74], ecx
mov rcx, qword [rdi + 0x7d0]
mov r8, qword [rbp - 0x78]
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 0x1400c87bd
lea rdx, str.Connection_time_out
mov rcx, rdi
call fcn.1400b9ac0
mov eax, 0x1c
jmp 0x1400c9032
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.1400b9290
cmp eax, 0xffffffff
jne 0x1400c87f9
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_no_connection_here
jmp 0x1400c9028
test eax, eax
jne 0x1400c8816
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_connection_timeout
call fcn.1400b9ac0
mov eax, 0x1c
jmp 0x1400c9032
test al, 4
je 0x1400c8829
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_error_occurred_during_connection
jmp 0x1400c9028
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 - 0x78], r13
cmp r13, 0xffffffffffffffff
jne 0x1400c88df
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
cmp eax, 0x2733
jne 0x1400c88b3
xor r13d, r13d
mov qword [rbp - 0x78], r13
lea r14d, [r13 + 0x51]
jmp 0x1400c88df
mov edx, eax
mov rcx, rsi
call fcn.1400cb800
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b9ac0
mov rax, qword [rsi]
mov dword [rax + 0x88d4], r14d
mov r14d, 0x37
test r14d, r14d
jne 0x1400c901e
movzx eax, byte [rbp - 0x2f]
add eax, 2
cdqe
cmp r13, rax
jne 0x1400c901e
mov r13, qword [rbp - 0x60]
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.1400b9290
cmp eax, 0xffffffff
jne 0x1400c893b
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_nothing_to_read
jmp 0x1400c9028
test eax, eax
jne 0x1400c8958
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_read_timeout
call fcn.1400b9ac0
mov eax, 0x1c
jmp 0x1400c9032
test al, 4
je 0x1400c8975
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_read_error_occurred
call fcn.1400b9ac0
mov eax, 0x38
jmp 0x1400c9032
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.1400c7ec0
test eax, eax
jne 0x1400c9015
cmp qword [rbp - 0x80], 2
jne 0x1400c9015
cmp byte [rbp - 0x30], 5
je 0x1400c89d1
lea rdx, str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x1400c9025
movzx eax, byte [rbp - 0x2f]
test al, al
je 0x1400c8bac
cmp al, 1
jne 0x1400c8a00
mov rdx, rsi
call fcn.1400d3bc0
mov r14d, eax
test eax, eax
je 0x1400c8bac
lea rdx, str.Unable_to_negotiate_SOCKS5_GSS_API_context.
jmp 0x1400c9025
cmp al, 2
jne 0x1400c8b79
mov r13, qword [rbp - 0x50]
test r12, r12
je 0x1400c8a3d
test r13, r13
je 0x1400c8a3d
or rax, 0xffffffffffffffff
mov rbx, rax
nop dword [rax]
inc rbx
cmp byte [r12 + rbx], 0
jne 0x1400c8a20
mov r14, rax
nop dword [rax]
inc r14
cmp byte [r13 + r14], 0
jne 0x1400c8a30
jmp 0x1400c8a42
xor ebx, ebx
xor r14d, r14d
mov byte [rbp - 0x30], 1
mov byte [rbp - 0x2f], bl
test r12, r12
je 0x1400c8a62
test rbx, rbx
je 0x1400c8a62
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 0x1400c8a87
test r14, r14
je 0x1400c8a87
lea rcx, [rbp - 0x30]
mov r8, r14
mov rdx, r13
add rcx, rbx
call sub.MSVCR120.dll_memcpy
mov r12, qword [rbp - 0x60]
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 - 0x78], r13
cmp r13, 0xffffffffffffffff
jne 0x1400c8b0b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
cmp eax, 0x2733
jne 0x1400c8adf
xor r13d, r13d
mov qword [rbp - 0x78], r13
lea r14d, [r13 + 0x51]
jmp 0x1400c8b0b
mov edx, eax
mov rcx, rsi
call fcn.1400cb800
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b9ac0
mov rax, qword [rsi]
mov dword [rax + 0x88d4], r14d
mov r14d, 0x37
test r14d, r14d
jne 0x1400c8b6d
cmp rbx, r13
jne 0x1400c8b6d
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.1400c7ec0
test eax, eax
jne 0x1400c8b61
cmp qword [rbp - 0x80], 2
jne 0x1400c8b61
movzx eax, byte [rbp - 0x2f]
test al, al
je 0x1400c8bac
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.1400b9ac0
jmp 0x1400c902d
lea rdx, str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x1400c9025
lea rdx, str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x1400c9025
cmp al, 0xff
jne 0x1400c8ba0
test r12, r12
je 0x1400c8b94
cmp byte [r12], 0
lea rdx, str.No_authentication_method_was_acceptable.
jne 0x1400c9025
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 0x1400c9025
lea rdx, str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x1400c9025
cmp dword [rbp - 0x70], 0
mov word [rbp - 0x30], 0x105
mov ebx, 3
mov byte [rbp - 0x2e], 0
jne 0x1400c8be4
mov r13, qword [rbp - 0x58]
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 0x1400c8cf3
mov r15, qword [rbp - 0x58]
mov r8d, dword [rbp - 0x68]
lea r9, [rbp - 0x70]
mov rdx, r15
mov rcx, rsi
call fcn.1400b83e0
cmp eax, 0xffffffff
je 0x1400c900e
cmp eax, 1
jne 0x1400c8c20
lea rdx, [rbp - 0x70]
mov rcx, rsi
call fcn.1400b8de0
mov r14d, eax
test eax, eax
jne 0x1400c9032
mov rax, qword [rbp - 0x70]
test rax, rax
je 0x1400c8ffc
mov r13, qword [rax]
test r13, r13
je 0x1400c8ffc
mov eax, dword [r13 + 4]
cmp eax, 2
jne 0x1400c8c98
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
lea rax, [r12 + rbx]
inc rbx
lea rdx, [0x14026630c]
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.1400b99e0
dec r15
jne 0x1400c8c60
mov rsi, qword [rbp - 0x48]
mov r15, qword [rbp - 0x58]
jmp 0x1400c8cda
cmp eax, 0x17
jne 0x1400c8cd7
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 0x1400c8cc0
jmp 0x1400c8cda
xor r13d, r13d
mov rdx, qword [rbp - 0x70]
mov rcx, rdi
call fcn.1400b85a0
test r13, r13
je 0x1400c8ffc
mov r13, qword [rbp - 0x58]
mov ecx, dword [rbp - 0x68]
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 0x1400c8d29
lea rdx, [0x140268470]
mov rcx, rdi
call fcn.1400b9ac0
mov r15, qword [rbp - 0x78]
mov r12, qword [rbp - 0x60]
jmp 0x1400c8da2
mov r12, qword [rbp - 0x60]
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 0x1400c8da2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
cmp eax, 0x2733
jne 0x1400c8d76
xor r15d, r15d
lea r14d, [r15 + 0x51]
jmp 0x1400c8da2
mov edx, eax
mov rcx, rsi
call fcn.1400cb800
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b9ac0
mov rax, qword [rsi]
mov dword [rax + 0x88d4], r14d
mov r14d, 0x37
test r14d, r14d
jne 0x1400c8ff3
cmp rbx, r15
jne 0x1400c8ff3
lea ebx, [r14 + 0xa]
cmp dword [rsi + 0x7b0], r14d
je 0x1400c8ddc
lea rdx, str.SOCKS5_GSS_API_protection_not_yet_implemented.
mov rcx, rdi
call fcn.1400b9ac0
lea rdx, [0x1402684f8]
jmp 0x1400c9025
lea rax, [rbp - 0x80]
lea r8, [rbp - 0x30]
mov r9, rbx
mov rdx, r12
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1400c7ec0
test eax, eax
jne 0x1400c8dd0
cmp qword [rbp - 0x80], rbx
jne 0x1400c8dd0
cmp byte [rbp - 0x30], 5
je 0x1400c8e13
lea rdx, str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x1400c9025
movzx r8d, byte [rbp - 0x2f]
movzx eax, byte [rbp - 0x2d]
test r8b, r8b
je 0x1400c8f79
cmp al, 1
jne 0x1400c8e74
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.1400b9ac0
jmp 0x1400c902d
cmp al, 3
jne 0x1400c8ea7
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.1400b9ac0
jmp 0x1400c902d
cmp al, 4
jne 0x1400c902d
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.1400b9ac0
jmp 0x1400c902d
cmp al, 3
jne 0x1400c8f89
movzx eax, byte [rbp - 0x2c]
add eax, 7
movsxd rbx, eax
jmp 0x1400c8f94
mov ecx, reloc.WS2_32.dll_shutdown
cmp al, 4
cmove rbx, rcx
cmp dword [rsi + 0x7b0], 0
jne 0x1400c8fd5
cmp rbx, 0xa
jle 0x1400c8fd5
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.1400c7ec0
test eax, eax
jne 0x1400c8fcc
cmp rbx, qword [rbp - 0x80]
je 0x1400c8fd5
lea rdx, str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x1400c9025
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 0x1400c9032
lea rdx, str.Failed_to_send_SOCKS5_connect_request.
jmp 0x1400c9025
lea rdx, str.Failed_to_resolve___s__for_SOCKS5_connect.
mov r8, r15
mov rcx, rdi
call fcn.1400b9ac0
mov eax, 6
jmp 0x1400c9032
lea rdx, str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x1400c9025
lea rdx, str.Unable_to_send_initial_SOCKS5_request.
mov rcx, rdi
call fcn.1400b9ac0
mov eax, 7
mov rcx, qword [rbp + 0x230]
xor rcx, rsp
call fcn.1401bb2c0
add rsp, 0x368
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret