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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x278]
mov eax, 0x398
call fcn.1401ef830
sub rsp, rax
mov rax, qword [0x140310170]
xor rax, rsp
mov qword [rbp + 0x260], rax
mov rsi, qword [rbp + 0x2e8]
mov r12, rcx
movsxd rax, dword [rbp + 0x2e0]
mov dword [rbp - 0x70], r9d
mov qword [rbp - 0x58], r8
mov ebx, dword [rsi + 0x134]
cmp ebx, 5
mov rdi, qword [rsi + rax*8 + 0x230]
mov r14, qword [rsi]
sete byte [rbp - 0x80]
or r15, 0xffffffffffffffff
mov qword [rbp - 0x68], rdx
mov r13, r15
mov qword [rbp - 0x60], rdi
mov qword [rbp - 0x48], r14
nop word [rax + rax]
inc r13
cmp byte [r8 + r13], 0
jne 0x140079bb0
cmp byte [rsi + 0x3ce], 0
je 0x140079bd2
lea rdx, str.SOCKS5:_connecting_to_HTTP_proxy__s_port__d_n
mov rcx, r14
call fcn.140059720
cmp ebx, 5
je 0x140079bf6
cmp r13, 0xff
jbe 0x140079bf6
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
mov r8, r13
call fcn.140059720
mov byte [rbp - 0x80], 1
movsxd r8, dword [r14 + 0x328]
xor ecx, ecx
movsxd rdx, dword [r14 + 0x32c]
test r8d, r8d
mov ebx, 0x493e0
setg cl
test edx, edx
jle 0x140079c18
or ecx, 2
sub ecx, 1
je 0x140079c38
sub ecx, 1
je 0x140079c33
cmp ecx, 1
jne 0x140079c3b
cmp r8d, edx
cmovl edx, r8d
movsxd rbx, edx
jmp 0x140079c3b
mov rbx, rdx
jmp 0x140079c3b
mov rbx, r8
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
mov r9d, edx
shr r9d, 6
imul ecx, r9d, 0x3e8
mov dword [rbp - 0x78], r9d
sub r8d, ecx
mov rcx, qword [r14 + 0x8b8]
imul eax, r8d, 0x3e8
sub r9d, ecx
mov rdx, rcx
shr rdx, 0x20
mov dword [rbp - 0x74], eax
mov rax, qword [rbp - 0x78]
shr rax, 0x20
sub eax, edx
movsxd rdx, eax
movabs rax, 0x20c49ba5e353f7cf
imul rdx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul eax, r9d, 0x3e8
sub rbx, rdx
movsxd rcx, eax
sub rbx, rcx
mov qword [rbp - 0x50], rbx
je 0x14007a559
test rbx, rbx
js 0x14007a559
lea r8, [rbp - 0x78]
mov dword [rbp - 0x78], 1
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r9, rbx
mov r8, rdi
mov rdx, r15
mov rcx, r15
call fcn.14005bc60
cmp eax, 0xffffffff
jne 0x140079d0f
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_no_connection_here
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
test eax, eax
jne 0x140079d22
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_connection_timeout
jmp 0x14007a563
test al, 4
je 0x140079d3f
mov rcx, qword [rsi]
lea rdx, str.SOCKS5:_error_occurred_during_connection
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
test r12, r12
mov byte [rbp - 0x40], 5
lea r8, [rbp - 0x78]
mov word [rbp - 0x3e], 0x200
setne al
mov edx, 0x8004667e
inc al
xor ebx, ebx
mov rcx, rdi
mov byte [rbp - 0x3f], al
mov dword [rbp - 0x78], ebx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r9d, dword [rbp - 0x70]
lea rdx, str.SOCKS5_communication_to__s:_d_n
mov r8, qword [rbp - 0x58]
mov rcx, r14
call fcn.140059720
mov rcx, qword [rbp - 0x60]
mov eax, ebx
cmp rcx, qword [rsi + 0x238]
mov rcx, rsi
movzx edi, byte [rbp - 0x3f]
sete al
mov edx, eax
mov rbx, qword [rsi + rdx*8 + 0x230]
call fcn.140059570
xor r9d, r9d
lea r8d, [rdi + 2]
lea rdx, [rbp - 0x40]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x140079e12
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
je 0x140079df9
mov edx, eax
mov rcx, rsi
call fcn.1400755c0
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140059810
mov rcx, qword [rsi]
mov dword [rcx + 0x89e4], ebx
lea rdx, str.Unable_to_send_initial_SOCKS5_request.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
movzx eax, byte [rbp - 0x3f]
add rax, 2
cmp rcx, rax
jne 0x140079df9
mov rbx, qword [rbp - 0x60]
lea r8, [rbp - 0x78]
mov rcx, rbx
mov dword [rbp - 0x78], 1
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r9, qword [rbp - 0x50]
mov r8, r15
mov rdx, r15
mov rcx, rbx
call fcn.14005bc60
cmp eax, 0xffffffff
jne 0x140079e6c
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_nothing_to_read
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
test eax, eax
jne 0x140079e7f
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_read_timeout
jmp 0x14007a563
test al, 4
je 0x140079e9c
mov rcx, qword [rsi]
lea rdx, str.SOCKS5_read_error_occurred
call fcn.140059810
mov eax, Ordinal_60
jmp 0x14007a56d
xor edi, edi
lea r8, [rbp - 0x78]
mov edx, 0x8004667e
mov dword [rbp - 0x78], edi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rax, [rbp - 0x78]
mov rdx, rbx
lea r9d, [rdi + 2]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x40]
mov rcx, rsi
call fcn.140079330
test eax, eax
jne 0x14007a543
cmp qword [rbp - 0x78], 2
jne 0x14007a543
cmp byte [rbp - 0x40], 5
je 0x140079eff
lea rdx, str.Received_invalid_version_in_initial_SOCKS5_response.
mov rcx, r14
call fcn.140059810
lea eax, [rdi + 7]
jmp 0x14007a56d
movzx eax, byte [rbp - 0x3f]
test al, al
je 0x14007a0f5
cmp al, 2
jne 0x14007a090
test r12, r12
je 0x140079f3b
mov rax, qword [rbp - 0x68]
test rax, rax
je 0x140079f3b
mov rbx, r15
inc rbx
cmp byte [r12 + rbx], dil
jne 0x140079f24
nop dword [rax]
inc r15
cmp byte [rax + r15], dil
jne 0x140079f30
jmp 0x140079f41
mov rbx, rdi
mov r15, rdi
mov byte [rbp - 0x40], 1
mov byte [rbp - 0x3f], bl
test r12, r12
je 0x140079f61
test rbx, rbx
je 0x140079f61
mov r8, rbx
lea rcx, [rbp - 0x3e]
mov rdx, r12
call fcn.14020f990
mov rax, qword [rbp - 0x68]
lea rdi, [rbx + 2]
mov byte [rbp + rdi - 0x40], r15b
inc rdi
test rax, rax
je 0x140079f8d
test r15, r15
je 0x140079f8d
lea rcx, [rbp - 0x40]
mov r8, r15
add rcx, rdi
mov rdx, rax
call fcn.14020f990
xor eax, eax
add rdi, r15
mov r15, qword [rbp - 0x60]
mov rcx, rsi
cmp r15, qword [rsi + 0x238]
sete al
mov edx, eax
mov rbx, qword [rsi + rdx*8 + 0x230]
call fcn.140059570
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov r8d, edi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x14007a01b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
je 0x14007a002
mov edx, eax
mov rcx, rsi
call fcn.1400755c0
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140059810
mov rcx, qword [rsi]
mov dword [rcx + 0x89e4], ebx
lea rdx, str.Failed_to_send_SOCKS5_sub_negotiation_request.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
cmp rdi, rcx
jne 0x14007a002
lea rax, [rbp - 0x78]
mov r9d, 2
lea r8, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov rdx, r15
mov rcx, rsi
call fcn.140079330
test eax, eax
jne 0x14007a077
cmp qword [rbp - 0x78], 2
jne 0x14007a077
movzx eax, byte [rbp - 0x3f]
test al, al
je 0x14007a0f8
movzx r8d, byte [rbp - 0x40]
lea rdx, str.User_was_rejected_by_the_SOCKS5_server___d__d_.
movzx r9d, al
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
lea rdx, str.Unable_to_receive_SOCKS5_sub_negotiation_response.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
cmp al, 1
jne 0x14007a0ad
lea rdx, str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
cmp al, 0xff
jne 0x14007a0dc
test r12, r12
je 0x14007a0c3
lea rdx, str.No_authentication_method_was_acceptable.
cmp byte [r12], dil
jne 0x14007a0ca
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._
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
lea rdx, str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
mov r15, rbx
cmp byte [rbp - 0x80], 0
mov edi, 3
mov word [rbp - 0x40], 0x105
mov byte [rbp - 0x3e], 0
jne 0x14007a12e
mov rdx, qword [rbp - 0x58]
lea rcx, [rbp - 0x3b]
mov r8, r13
mov byte [rbp - 0x3d], dil
mov byte [rbp - 0x3c], r13b
call fcn.14020f990
lea rdi, [r13 + 5]
jmp 0x14007a214
mov r12, qword [rbp - 0x58]
lea r9, [rbp - 0x68]
mov r8d, dword [rbp - 0x70]
mov rdx, r12
mov rcx, rsi
call fcn.14005c820
cmp eax, 0xffffffff
je 0x14007a53c
cmp eax, 1
jne 0x14007a167
lea rdx, [rbp - 0x68]
mov rcx, rsi
call fcn.140068050
test eax, eax
jne 0x14007a56d
mov r13, qword [rbp - 0x68]
test r13, r13
je 0x14007a52a
mov rbx, qword [r13]
test rbx, rbx
je 0x14007a52a
cmp dword [rbx + 4], 2
jne 0x14007a1e8
mov rcx, qword [rbx + 0x20]
lea rdx, [rbp + 0x220]
add rcx, 4
mov r8d, 0x40
call fcn.1400757c0
cmp dword [rbx + 4], 2
jne 0x14007a1e8
mov byte [rbp - 0x3d], 1
lea r8, [rbp + 0x220]
mov rcx, qword [rbx + 0x20]
lea rdx, str.SOCKS5_connect_to_IPv4__s__locally_resolved__n
mov edi, 8
movzx eax, byte [rcx + 4]
mov byte [rbp - 0x3c], al
movzx eax, byte [rcx + 5]
mov byte [rbp - 0x3b], al
movzx eax, byte [rcx + 6]
mov byte [rbp - 0x3a], al
movzx eax, byte [rcx + 7]
mov rcx, r14
mov byte [rbp - 0x39], al
call fcn.140059720
jmp 0x14007a200
xor ebx, ebx
lea r8, [rbp + 0x220]
lea rdx, str.SOCKS5_connection_to__s_not_supported_n
mov rcx, r14
call fcn.140059810
mov rdx, r13
mov rcx, r14
call fcn.14005c9b0
test rbx, rbx
je 0x14007a52a
mov ecx, dword [rbp - 0x70]
mov eax, ecx
sar eax, 8
mov byte [rbp + rdi - 0x40], al
mov eax, 0
mov byte [rbp + rdi - 0x3f], cl
add rdi, 2
cmp r15, qword [rsi + 0x238]
mov rcx, rsi
sete al
mov eax, eax
mov edx, eax
mov rbx, qword [rsi + rax*8 + 0x230]
call fcn.140059570
xor r9d, r9d
lea rdx, [rbp - 0x40]
mov r8d, edi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x14007a2b4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
je 0x14007a29b
mov edx, eax
mov rcx, rsi
call fcn.1400755c0
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140059810
mov rcx, qword [rsi]
mov dword [rcx + 0x89e4], ebx
lea rdx, str.Failed_to_send_SOCKS5_connect_request.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
cmp rdi, rcx
jne 0x14007a29b
lea rax, [rbp - 0x78]
mov ebx, 0xa
mov r9d, ebx
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x40]
mov rdx, r15
mov rcx, rsi
call fcn.140079330
test eax, eax
jne 0x14007a514
cmp qword [rbp - 0x78], rbx
jne 0x14007a514
cmp byte [rbp - 0x40], 5
je 0x14007a308
lea rdx, str.SOCKS5_reply_has_wrong_version__version_should_be_5.
mov rcx, r14
call fcn.140059810
lea eax, [rbx - 3]
jmp 0x14007a56d
movzx eax, byte [rbp - 0x3d]
cmp al, 3
jne 0x14007a321
movzx r8d, byte [rbp - 0x3c]
lea rbx, [r8 + 7]
cmp rbx, 0xa
jle 0x14007a364
jmp 0x14007a32a
cmp al, 4
jne 0x14007a35f
mov ebx, reloc.WS2_32.dll_shutdown
lea rax, [rbp - 0x78]
mov rdx, r15
lea rdi, [rbx - 0xa]
mov qword [rsp + 0x20], rax
mov r9, rdi
lea r8, [rbp - 0x36]
mov rcx, rsi
call fcn.140079330
test eax, eax
jne 0x14007a514
cmp rdi, qword [rbp - 0x78]
jne 0x14007a514
movzx eax, byte [rbp - 0x3d]
movzx r8d, byte [rbp - 0x3c]
movzx ecx, byte [rbp - 0x3f]
test cl, cl
je 0x14007a4e8
cmp al, 1
jne 0x14007a3c2
movzx eax, byte [rbp - 0x37]
movzx r10d, byte [rbp - 0x38]
movzx r9d, byte [rbp - 0x3b]
movzx edx, cl
movzx ecx, byte [rbp - 0x3a]
mov dword [rsp + 0x38], edx
lea rdx, str.Cant_complete_SOCKS5_connection_to__d._d._d._d:_d.___d_
shl r10d, 8
or r10d, eax
movzx r8d, r8b
movzx eax, byte [rbp - 0x39]
mov dword [rsp + 0x30], r10d
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
cmp al, 3
jne 0x14007a415
movzx edi, byte [rbp + rbx - 0x42]
lea rax, [rbx - 2]
cmp rax, 0x258
jae 0x14007a590
mov byte [rbp + rax - 0x40], 0
lea r8, [rbp - 0x3b]
movzx ecx, byte [rbp - 0x3f]
lea rdx, str.Cant_complete_SOCKS5_connection_to__s:_d.___d_
movzx r9d, byte [rbp + rbx - 0x41]
movzx eax, dil
shl eax, 8
mov dword [rsp + 0x20], ecx
or r9d, eax
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
cmp al, 4
jne 0x14007a4de
movzx ecx, byte [rbp - 0x2c]
movzx eax, byte [rbp - 0x2b]
movzx edx, byte [rbp - 0x2f]
movzx r10d, byte [rbp - 0x30]
movzx r11d, byte [rbp - 0x31]
movzx ebx, byte [rbp - 0x32]
movzx edi, byte [rbp - 0x33]
movzx esi, byte [rbp - 0x34]
movzx r14d, byte [rbp - 0x35]
movzx r15d, byte [rbp - 0x36]
movzx r12d, byte [rbp - 0x37]
movzx r13d, byte [rbp - 0x38]
movzx r9d, byte [rbp - 0x3b]
movzx r8d, byte [rbp - 0x3c]
shl ecx, 8
or ecx, eax
movzx eax, byte [rbp - 0x3f]
mov dword [rsp + 0x98], eax
mov dword [rbp - 0x78], ecx
mov eax, dword [rbp - 0x78]
movzx ecx, byte [rbp - 0x2e]
mov dword [rsp + 0x90], eax
movzx eax, byte [rbp - 0x2d]
mov dword [rsp + 0x88], eax
movzx eax, byte [rbp - 0x39]
mov dword [rsp + 0x80], ecx
mov rcx, qword [rbp - 0x48]
mov dword [rsp + 0x78], edx
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 + 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], r12d
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], eax
movzx eax, byte [rbp - 0x3a]
mov dword [rsp + 0x20], eax
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
lea rdx, str.SOCKS5_request_granted._n
mov rcx, r14
call fcn.140059720
lea r8, [rbp - 0x78]
mov dword [rbp - 0x78], 1
mov edx, 0x8004667e
mov rcx, r15
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x14007a56d
lea rdx, str.Failed_to_receive_SOCKS5_connect_request_ack.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
mov r8, r12
lea rdx, str.Failed_to_resolve___s__for_SOCKS5_connect.
mov rcx, r14
call fcn.140059810
mov eax, 6
jmp 0x14007a56d
lea rdx, str.Unable_to_receive_initial_SOCKS5_response.
mov rcx, r14
call fcn.140059810
mov eax, 7
jmp 0x14007a56d
lea rdx, str.Connection_time_out
mov rcx, r14
call fcn.140059810
mov eax, Ordinal_30
mov rcx, qword [rbp + 0x260]
xor rcx, rsp
call fcn.1401ef4e0
add rsp, 0x398
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.1401ef60c
int3