Function at 0x140133060
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 - 0x238]
sub rsp, 0x338
mov rax, qword [0x140232230]
xor rax, rsp
mov qword [rbp + 0x220], rax
mov rbx, qword [rbp + reloc.SHELL32.dll_IsUserAnAdmin]
movsxd rax, dword [rbp + 0x2a0]
xor r12d, r12d
mov rdi, qword [rbx + rax*8 + 0x188]
cmp dword [rbx + 0x168], 5
mov rsi, qword [rbx]
mov eax, r12d
sete al
or r14, 0xffffffffffffffff
mov dword [rsp + 0x48], r9d
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x50], rdx
mov r15, r14
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0x70], eax
nop word [rax + rax]
inc r15
cmp byte [r8 + r15], r12b
jne 0x1401330e0
mov r13d, 1
test eax, eax
jne 0x140133113
cmp r15, 0xff
jbe 0x140133113
lea rdx, str.SOCKS5:_server_resolving_disabled_for_hostnames_of_length___255__actual_len_zu__n
mov r8, r15
mov rcx, rsi
call fcn.140125a80
mov dword [rsp + 0x70], r13d
mov r8d, dword [rsi + 0x270]
mov edx, 1
mov ecx, r12d
test r8d, r8d
mov r13d, 0x493e0
cmovg ecx, edx
mov edx, dword [rsi + 0x274]
test edx, edx
jle 0x14013313b
or ecx, 2
dec ecx
je 0x140133158
dec ecx
je 0x140133153
dec ecx
jne 0x14013315b
mov r13d, edx
cmp r8d, edx
cmovl r13d, r8d
jmp 0x14013315b
mov r13d, edx
jmp 0x14013315b
mov r13d, r8d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
mov r9d, edx
shr r9d, 6
mov ecx, r9d
mov dword [rsp + 0x40], r9d
imul ecx, ecx, 0x3e8
sub r8d, ecx
mov rcx, qword [rsi + 0x6b8]
mov rax, rcx
sub ecx, r9d
shr rax, 0x20
imul r8d, r8d, 0x3e8
mov dword [rsp + 0x44], r8d
mov rdx, qword [rsp + 0x40]
imul ecx, ecx, 0x3e8
shr rdx, 0x20
sub edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
sub ecx, edx
add r13d, ecx
test r13d, r13d
jg 0x1401331e6
lea rdx, str.Connection_time_out
mov rcx, rsi
call fcn.140125b60
mov eax, 0x1c
jmp 0x140133300
mov eax, 1
lea r8, [rsp + 0x40]
mov edx, 0x8004667e
mov rcx, rdi
mov dword [rsp + 0x40], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r8d, r13d
mov rdx, rdi
mov rcx, r14
call fcn.140135d10
cmp eax, 0xffffffff
jne 0x140133224
mov rcx, qword [rbx]
lea rdx, str.SOCKS5:_no_connection_here
jmp 0x1401332f6
test eax, eax
jne 0x140133241
mov rcx, qword [rbx]
lea rdx, str.SOCKS5:_connection_timeout
call fcn.140125b60
mov eax, 0x1c
jmp 0x140133300
test al, 4
je 0x140133254
mov rcx, qword [rbx]
lea rdx, str.SOCKS5:_error_occurred_during_connection
jmp 0x1401332f6
cmp qword [rsp + 0x68], r12
lea r8, [rsp + 0x40]
mov edx, 0x8004667e
setne al
mov rcx, rdi
mov byte [rbp - 0x40], 5
inc al
mov word [rbp - 0x3e], 0x200
mov dword [rsp + 0x40], r12d
mov byte [rbp - 0x3f], al
call qword [sym.imp.WS2_32.dll_ioctlsocket]
movzx eax, byte [rbp - 0x3f]
add eax, 2
cmp rdi, qword [rbx + 0x190]
lea rdx, [rbp - 0x40]
movsxd r8, eax
mov rax, r12
sete al
mov rcx, qword [rbx + rax*8 + 0x188]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x140133323
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp eax, 0x2733
je 0x1401332ec
mov edx, eax
mov rcx, rbx
call fcn.14013f050
mov rcx, qword [rbx]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140125b60
mov rcx, qword [rbx]
mov dword [rcx + 0x87ac], edi
lea rdx, str.Unable_to_send_initial_SOCKS5_request.
mov rcx, rsi
call fcn.140125b60
mov eax, 7
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.140166980
add rsp, 0x338
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
movzx eax, byte [rbp - 0x3f]
add eax, 2
cdqe
cmp rcx, rax
jne 0x1401332ec
mov eax, 1
lea r8, [rsp + 0x40]
mov edx, 0x8004667e
mov rcx, rdi
mov dword [rsp + 0x40], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, qword [rsp + 0x60]
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x4c], r12d
mov edi, r12d
cmp rax, 0xffffffffffffffff
jne 0x140133387
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [rbx]
lea rdx, str.SOCKS5_read_timeout
call fcn.140125b60
mov eax, 0x1c
jmp 0x140133300
test r13d, r13d
jle 0x1401333d2
mov edi, r13d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [rsp + 0x40], edx
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
mov dword [rsp + 0x44], ecx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rax
mov ecx, dword [rsp + 0x44]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x60]
mov dword [rsp + 0x4c], ecx
mov qword [rbp - 0x80], rax
mov dword [rbp - 0x78], 0x300
movsxd rax, r13d
test rax, rax
jns 0x1401333ea
mov edi, r14d
jmp 0x1401333ee
cmove edi, r12d
lea rcx, [rbp - 0x80]
mov r8d, edi
mov edx, 1
call qword [sym.imp.WS2_32.dll_WSAPoll]
cmp eax, 0xffffffff
jne 0x14013348d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x14013341a
cmp eax, 0x2714
jne 0x14013347e
movsxd rax, r13d
test r13d, r13d
jle 0x1401333e0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [rsp + 0x40]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
mov eax, 0x10624dd3
mov r9d, edx
shr r9d, 6
sub edi, r9d
mov ecx, r9d
imul edi, edi, 0x3e8
imul ecx, ecx, 0x3e8
sub r8d, ecx
imul r8d, r8d, 0x3e8
sub r8d, dword [rsp + 0x4c]
imul r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
sub edi, edx
add edi, r13d
test edi, edi
jg 0x1401333dd
mov rcx, qword [rbx]
lea rdx, str.SOCKS5_nothing_to_read
jmp 0x1401332f6
test eax, eax
js 0x14013347e
je 0x14013336e
mov ecx, 0x303
mov edx, 1
test word [rbp - 0x76], cx
mov ecx, r12d
cmovne ecx, edx
mov edx, 0x204
test word [rbp - 0x76], dx
je 0x1401334b9
or ecx, 4
cmp ecx, 0xffffffff
je 0x14013347e
test ecx, ecx
je 0x14013336e
test cl, 4
je 0x1401334e4
mov rcx, qword [rbx]
lea rdx, str.SOCKS5_read_error_occurred
call fcn.140125b60
mov eax, gethostname
jmp 0x140133300
mov r13, qword [rsp + 0x60]
lea r8, [rsp + 0x40]
mov edx, 0x8004667e
mov rcx, r13
mov dword [rsp + 0x40], r12d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rax, [rsp + 0x40]
lea r8, [rbp - 0x40]
mov r9d, 2
mov rdx, r13
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.1401327e0
test eax, eax
jne 0x1401339e3
cmp qword [rsp + 0x40], 2
jne 0x1401339e3
cmp byte [rbp - 0x40], 5
je 0x140133546
lea rdx, str.Received_invalid_version_in_initial_SOCKS5_response.
jmp 0x1401332f3
movzx eax, byte [rbp - 0x3f]
test al, al
je 0x1401336fb
cmp al, 2
jne 0x1401336b5
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x14013358b
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14013358b
mov rdi, r14
inc rdi
cmp byte [rax + rdi], r12b
jne 0x140133571
nop word [rax + rax]
inc r14
cmp byte [rcx + r14], r12b
jne 0x140133580
jmp 0x140133591
mov rdi, r12
mov r14, r12
mov byte [rbp - 0x40], 1
mov byte [rbp - 0x3f], dil
test rax, rax
je 0x1401335b2
test rdi, rdi
je 0x1401335b2
lea rcx, [rbp - 0x3e]
mov r8, rdi
mov rdx, rax
call fcn.1401669c0
mov rdx, qword [rsp + 0x50]
add edi, 2
movsxd rax, edi
inc edi
mov byte [rbp + rax - 0x40], r14b
test rdx, rdx
je 0x1401335e0
test r14, r14
je 0x1401335e0
movsxd rax, edi
lea rcx, [rbp - 0x40]
mov r8, r14
add rcx, rax
call fcn.1401669c0
mov rax, r12
add edi, r14d
cmp r13, qword [rbx + 0x190]
sete al
lea rdx, [rbp - 0x40]
xor r9d, r9d
mov rcx, qword [rbx + rax*8 + 0x188]
mov r8d, edi
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x140133651
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp eax, 0x2733
je 0x140133645
mov edx, eax
mov rcx, rbx
call fcn.14013f050
mov rcx, qword [rbx]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140125b60
mov rcx, qword [rbx]
mov dword [rcx + 0x87ac], edi
lea rdx, str.Failed_to_send_SOCKS5_sub_negotiation_request.
jmp 0x1401332f3
movsxd rax, edi
cmp rax, rcx
jne 0x140133645
lea rax, [rsp + 0x40]
lea r8, [rbp - 0x40]
mov r9d, 2
mov rdx, r13
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.1401327e0
test eax, eax
jne 0x1401336a9
cmp qword [rsp + 0x40], 2
jne 0x1401336a9
movzx eax, byte [rbp - 0x3f]
test al, al
je 0x1401336fb
movzx r8d, byte [rbp - 0x40]
lea rdx, str.User_was_rejected_by_the_SOCKS5_server___d__d_.
movzx r9d, al
mov rcx, rsi
call fcn.140125b60
jmp 0x1401332fb
lea rdx, str.Unable_to_receive_SOCKS5_sub_negotiation_response.
jmp 0x1401332f3
cmp al, 1
jne 0x1401336c5
lea rdx, str.SOCKS5_GSSAPI_per_message_authentication_is_not_supported.
jmp 0x1401332f3
cmp al, 0xff
jne 0x1401336ef
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x1401336e3
lea rdx, str.No_authentication_method_was_acceptable.
cmp byte [rax], r12b
jne 0x1401332f3
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 0x1401332f3
lea rdx, str.Undocumented_SOCKS5_mode_attempted_to_be_used_by_server.
jmp 0x1401332f3
mov word [rbp - 0x40], 0x105
mov byte [rbp - 0x3e], r12b
cmp dword [rsp + 0x70], r12d
jne 0x140133743
mov rdx, qword [rsp + 0x58]
lea rcx, [rbp - 0x3b]
mov r8, r15
lea rdi, [r15 + 7]
mov byte [rbp - 0x3d], 3
mov byte [rbp - 0x3c], r15b
call fcn.1401669c0
mov r8d, dword [rsp + 0x48]
mov eax, r8d
mov byte [rbp + r15 - 0x3a], r8b
sar eax, 8
mov byte [rbp + r15 - 0x3b], al
jmp 0x140133844
mov r15, qword [rsp + 0x58]
mov r8d, dword [rsp + 0x48]
lea r9, [rsp + 0x50]
mov rdx, r15
mov rcx, rbx
call fcn.140124f30
mov qword [rsp + 0x58], 0xa
mov byte [rbp - 0x3d], 1
cmp eax, 0xffffffff
je 0x1401339d9
cmp eax, 1
jne 0x14013378d
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.140125660
test eax, eax
jne 0x140133300
mov r14, qword [rsp + 0x50]
test r14, r14
je 0x1401339c7
mov rdi, qword [r14]
test rdi, rdi
je 0x1401339c7
cmp dword [rdi + 4], 2
jne 0x1401337c4
mov rcx, qword [rdi + 0x20]
lea rdx, [rbp - 0x80]
mov r8d, 0x40
add rcx, 4
call fcn.14013eba0
lea rax, [rsp + 0x76]
lea r9, [rsp + 0x72]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x74]
lea rdx, str._hu._hu._hu._hu
lea rcx, [rbp - 0x80]
mov qword [rsp + 0x20], rax
call fcn.14016743c
cmp eax, 4
jne 0x140133819
movzx eax, byte [rsp + 0x70]
mov byte [rbp - 0x3c], al
movzx eax, byte [rsp + 0x72]
mov byte [rbp - 0x3b], al
movzx eax, byte [rsp + 0x74]
mov byte [rbp - 0x3a], al
movzx eax, byte [rsp + 0x76]
mov byte [rbp - 0x39], al
jmp 0x14013381c
mov rdi, r12
mov rdx, r14
mov rcx, rsi
call fcn.140125110
test rdi, rdi
je 0x1401339c7
mov ecx, dword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
mov eax, ecx
mov byte [rbp - 0x37], cl
sar eax, 8
mov byte [rbp - 0x38], al
cmp r13, qword [rbx + 0x190]
lea rdx, [rbp - 0x40]
mov r8d, edi
sete r12b
xor r9d, r9d
mov rcx, qword [rbx + r12*8 + 0x188]
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x1401338b0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp eax, 0x2733
je 0x1401338a4
mov edx, eax
mov rcx, rbx
call fcn.14013f050
mov rcx, qword [rbx]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140125b60
mov rcx, qword [rbx]
mov dword [rcx + 0x87ac], edi
lea rdx, str.Failed_to_send_SOCKS5_connect_request.
jmp 0x1401332f3
cmp rcx, rdi
jne 0x1401338a4
lea rax, [rsp + 0x40]
lea r8, [rbp - 0x40]
mov r9d, 0xa
mov rdx, r13
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.1401327e0
test eax, eax
jne 0x1401339bb
cmp qword [rsp + 0x40], 0xa
jne 0x1401339bb
cmp byte [rbp - 0x40], 5
je 0x1401338fa
lea rdx, str.SOCKS5_reply_has_wrong_version__version_should_be_5.
jmp 0x1401332f3
movzx eax, byte [rbp - 0x3f]
test al, al
je 0x14013394c
movzx ecx, byte [rbp - 0x3a]
movzx r10d, byte [rbp - 0x38]
movzx r9d, byte [rbp - 0x3b]
movzx r8d, byte [rbp - 0x3c]
movzx edx, al
movzx eax, byte [rbp - 0x37]
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 - 0x39]
mov dword [rsp + 0x30], r10d
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, rsi
call fcn.140125b60
jmp 0x1401332fb
movzx eax, byte [rbp - 0x3d]
cmp al, 3
jne 0x140133987
movzx eax, byte [rbp - 0x3c]
add eax, 7
movsxd rdi, eax
cmp rdi, 0xa
jg 0x140133990
mov eax, 1
lea r8, [rsp + 0x70]
mov edx, 0x8004667e
mov rcx, r13
mov dword [rsp + 0x70], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x140133300
cmp al, 4
jne 0x140133964
mov edi, socket
lea rax, [rsp + 0x40]
sub rdi, 0xa
lea r8, [rbp - 0x36]
mov rdx, r13
mov rcx, rbx
mov r9, rdi
mov qword [rsp + 0x20], rax
call fcn.1401327e0
test eax, eax
jne 0x1401339bb
cmp qword [rsp + 0x40], rdi
je 0x140133964
lea rdx, str.Failed_to_receive_SOCKS5_connect_request_ack.
jmp 0x1401332f3
lea rdx, str.Failed_to_resolve___s__for_SOCKS5_connect.
mov r8, r15
mov rcx, rsi
call fcn.140125b60
mov eax, 6
jmp 0x140133300
lea rdx, str.Unable_to_receive_initial_SOCKS5_response.
jmp 0x1401332f3