Function at 0x140061200
Capabilities:
Send data
Send data on socket
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov rax, qword [0x140177090]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r12, qword [rbp + 0x120]
mov eax, dword [rbp + 0x128]
xor r13d, r13d
mov r14, qword [r12]
mov dword [rsp + 0x40], eax
mov rax, qword [r12 + 0x1a8]
mov rsi, rcx
mov edi, r8d
mov r8d, dword [r14 + 0x338]
test r8d, r8d
mov r15, rdx
mov edx, dword [r14 + 0x33c]
mov qword [rsp + 0x48], rax
mov ecx, r13d
mov eax, 1
cmovg ecx, eax
mov ebx, 0x493e0
test edx, edx
jle 0x140061286
or ecx, 2
dec ecx
je 0x1400612a1
dec ecx
je 0x14006129d
dec ecx
jne 0x1400612a4
mov ebx, edx
cmp r8d, edx
cmovl ebx, r8d
jmp 0x1400612a4
mov ebx, edx
jmp 0x1400612a4
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 [rsp + 0x50], r9d
imul ecx, r9d, 0x3e8
sub r8d, ecx
imul ecx, r8d, 0x3e8
mov dword [rsp + 0x54], ecx
mov rcx, qword [r14 + 0x7d0]
mov r8, qword [rsp + 0x50]
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 0x14006132c
lea rdx, [0x14017a728]
mov rcx, r14
call fcn.140052c80
mov eax, 0x1c
jmp 0x1400615f4
mov rcx, qword [rsp + 0x48]
lea r8, [rsp + 0x50]
mov edx, 0x8004667e
mov dword [rsp + 0x50], r13d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rdx, str.SOCKS4_communication_to__s:_d_n
mov r9d, edi
mov r8, r15
mov rcx, r14
call fcn.140052ba0
mov eax, edi
mov word [rsp + 0x60], 0x104
sar eax, 8
mov byte [rsp + 0x63], dil
mov byte [rsp + 0x62], al
cmp dword [rsp + 0x40], r13d
jne 0x1400614bb
lea r9, [rsp + 0x50]
mov r8d, edi
mov rdx, r15
mov rcx, r12
call fcn.1400515a0
cmp eax, 0xffffffff
jne 0x14006139d
mov eax, 5
jmp 0x1400615f4
cmp eax, 1
jne 0x1400613af
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.140051fa0
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x14006149f
mov rbx, qword [rdi]
test rbx, rbx
je 0x14006149f
mov eax, dword [rbx + 4]
cmp eax, 2
je 0x1400613e0
cmp eax, 0x17
jne 0x14006141f
mov rcx, qword [rbx + 0x20]
add rcx, 8
jmp 0x1400613e8
mov rcx, qword [rbx + 0x20]
add rcx, 4
cmp eax, 2
je 0x140061410
cmp eax, 0x17
je 0x1400613ff
mov ecx, 0x273f
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14006141f
lea rdx, [rbp + 0x70]
mov r8d, 0x40
call fcn.140064350
jmp 0x14006141f
lea rdx, [rbp + 0x70]
mov r8d, 0x40
call fcn.140064280
lea rax, [rsp + 0x56]
lea r9, [rsp + 0x52]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x54]
lea rdx, str._hu._hu._hu._hu
lea rcx, [rbp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCR120.dll_sscanf]
cmp eax, 4
jne 0x140061479
movzx eax, byte [rsp + 0x50]
mov byte [rsp + 0x64], al
movzx eax, byte [rsp + 0x52]
mov byte [rsp + 0x65], al
movzx eax, byte [rsp + 0x54]
mov byte [rsp + 0x66], al
movzx eax, byte [rsp + 0x56]
mov byte [rsp + 0x67], al
jmp 0x14006147c
mov rbx, r13
lea r8, [rbp + 0x70]
lea rdx, str.SOCKS4_connect_to__s__locally_resolved__n
mov rcx, r14
call fcn.140052ba0
mov rdx, rdi
mov rcx, r14
call fcn.140051760
test rbx, rbx
jne 0x1400614bb
lea rdx, str.Failed_to_resolve___s__for_SOCKS4_connect.
mov r8, r15
mov rcx, r14
call fcn.140052c80
mov eax, 6
jmp 0x1400615f4
or rdi, 0xffffffffffffffff
mov byte [rsp + 0x68], r13b
test rsi, rsi
je 0x1400614fe
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rsi + r8], r13b
jne 0x1400614d0
cmp r8, 0xfe
jb 0x1400614ee
lea rdx, str.Too_long_SOCKS_proxy_name__cant_use__n
jmp 0x1400615e7
lea rcx, [rsp + 0x68]
inc r8
mov rdx, rsi
call sub.MSVCR120.dll_memcpy
mov rbx, r13
lea rax, [rsp + 0x68]
mov rsi, rdi
nop dword [rax]
inc rsi
cmp byte [rax + rsi], bl
jne 0x140061510
add esi, 9
cmp dword [rsp + 0x40], ebx
je 0x140061574
mov dword [rsp + 0x64], 0x1000000
mov rbx, rdi
nop dword [rax]
inc rbx
cmp byte [r15 + rbx], r13b
jne 0x140061530
inc rbx
movsxd rdx, esi
lea rax, [rdx + rbx]
cmp rax, 0x106
jg 0x140061571
sub rdx, r15
mov rcx, r15
lea rdx, [rsp + rdx + 0x60]
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx + rcx - 1], al
test al, al
jne 0x140061560
jmp 0x140061574
mov rbx, r13
mov rcx, qword [rsp + 0x48]
mov rax, r13
lea r8d, [rbx + rsi]
cmp rcx, qword [r12 + 0x1b0]
lea rdx, [rsp + 0x60]
sete al
xor r9d, r9d
mov rcx, qword [r12 + rax*8 + 0x1a8]
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x14006161e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
je 0x1400615e0
mov edx, eax
mov rcx, r12
call fcn.1400649c0
mov rcx, qword [r12]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140052c80
mov rcx, qword [r12]
mov dword [rcx + 0x88d4], ebx
lea rdx, [0x14017a800]
mov rcx, r14
call fcn.140052c80
mov eax, 7
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.140129b50
mov rbx, qword [rsp + 0x218]
add rsp, 0x1c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
movsxd rax, esi
add rax, rbx
cmp rcx, rax
jne 0x1400615e0
mov esi, dword [rsp + 0x40]
test esi, esi
je 0x140061686
test rbx, rbx
jne 0x140061686
inc rdi
cmp byte [r15 + rdi], r13b
jne 0x140061636
mov rax, qword [rsp + 0x48]
inc rdi
mov r8, r15
cmp rax, qword [r12 + 0x1b0]
lea rax, [rsp + 0x50]
mov r9, rdi
sete r13b
mov rcx, r12
mov qword [rsp + 0x20], rax
mov edx, r13d
call fcn.140052d80
cmp dword [rsp + 0x50], 0
jne 0x14006167a
cmp rax, rdi
je 0x140061686
lea rdx, str.Failed_to_send_SOCKS4_connect_request.
jmp 0x1400615e7
mov rdi, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
lea r8, [rsp + 0x60]
mov r9d, 8
mov rcx, r12
mov rdx, rdi
mov qword [rsp + 0x20], rax
call fcn.140061080
test eax, eax
jne 0x140061804
cmp qword [rsp + 0x50], 8
jne 0x140061804
cmp byte [rsp + 0x60], al
je 0x1400616d1
lea rdx, str.SOCKS4_reply_has_wrong_version__version_should_be_4.
jmp 0x1400615e7
movzx r10d, byte [rsp + 0x61]
mov ecx, r10d
sub ecx, 0x5a
je 0x1400617bf
movzx eax, byte [rsp + 0x69]
movzx edx, byte [rsp + 0x68]
movzx r9d, byte [rsp + 0x65]
movzx r8d, byte [rsp + 0x64]
shl edx, 8
or edx, eax
movzx eax, byte [rsp + 0x67]
dec ecx
je 0x140061792
dec ecx
je 0x140061765
dec ecx
movzx ecx, byte [rsp + 0x66]
je 0x14006173d
mov dword [rsp + 0x38], r10d
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___Unknown.
mov rcx, r14
call fcn.140052c80
jmp 0x1400615ef
mov dword [rsp + 0x38], 0x5d
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_the_client_program_and_identd_report_different_user_ids.
mov rcx, r14
call fcn.140052c80
jmp 0x1400615ef
movzx ecx, byte [rsp + 0x66]
mov dword [rsp + 0x38], 0x5c
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_because_SOCKS_server_cannot_connect_to_identd_on_the_client.
mov rcx, r14
call fcn.140052c80
jmp 0x1400615ef
movzx ecx, byte [rsp + 0x66]
mov dword [rsp + 0x38], 0x5b
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea rdx, str.Cant_complete_SOCKS4_connection_to__d._d._d._d:_d.___d___request_rejected_or_failed.
mov rcx, r14
call fcn.140052c80
jmp 0x1400615ef
lea rax, [0x140178cf4]
lea r8, [0x1401f282c]
test esi, esi
lea rdx, str.SOCKS4_s_request_granted._n
mov rcx, r14
cmovne r8, rax
call fcn.140052ba0
lea r8, [rsp + 0x50]
mov edx, 0x8004667e
mov rcx, rdi
mov dword [rsp + 0x50], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x1400615f4
lea rdx, str.Failed_to_receive_SOCKS4_connect_request_ack.
jmp 0x1400615e7