Function at 0x1400c7040
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 [0x1402581e0]
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 0x1400c70c6
or ecx, 2
dec ecx
je 0x1400c70e1
dec ecx
je 0x1400c70dd
dec ecx
jne 0x1400c70e4
mov ebx, edx
cmp r8d, edx
cmovl ebx, r8d
jmp 0x1400c70e4
mov ebx, edx
jmp 0x1400c70e4
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 0x1400c716c
lea rdx, [0x14025bbc8]
mov rcx, r14
call fcn.1400b8ac0
mov eax, 0x1c
jmp 0x1400c7434
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.1400b89e0
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 0x1400c72fb
lea r9, [rsp + 0x50]
mov r8d, edi
mov rdx, r15
mov rcx, r12
call fcn.1400b73e0
cmp eax, 0xffffffff
jne 0x1400c71dd
mov eax, 5
jmp 0x1400c7434
cmp eax, 1
jne 0x1400c71ef
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.1400b7de0
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x1400c72df
mov rbx, qword [rdi]
test rbx, rbx
je 0x1400c72df
mov eax, dword [rbx + 4]
cmp eax, 2
je 0x1400c7220
cmp eax, 0x17
jne 0x1400c725f
mov rcx, qword [rbx + 0x20]
add rcx, 8
jmp 0x1400c7228
mov rcx, qword [rbx + 0x20]
add rcx, 4
cmp eax, 2
je 0x1400c7250
cmp eax, 0x17
je 0x1400c723f
mov ecx, 0x273f
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400c725f
lea rdx, [rbp + 0x70]
mov r8d, 0x40
call fcn.1400ca180
jmp 0x1400c725f
lea rdx, [rbp + 0x70]
mov r8d, 0x40
call fcn.1400ca0b0
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 0x1400c72b9
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 0x1400c72bc
mov rbx, r13
lea r8, [rbp + 0x70]
lea rdx, str.SOCKS4_connect_to__s__locally_resolved__n
mov rcx, r14
call fcn.1400b89e0
mov rdx, rdi
mov rcx, r14
call fcn.1400b75a0
test rbx, rbx
jne 0x1400c72fb
lea rdx, str.Failed_to_resolve___s__for_SOCKS4_connect.
mov r8, r15
mov rcx, r14
call fcn.1400b8ac0
mov eax, 6
jmp 0x1400c7434
or rdi, 0xffffffffffffffff
mov byte [rsp + 0x68], r13b
test rsi, rsi
je 0x1400c733e
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rsi + r8], r13b
jne 0x1400c7310
cmp r8, 0xfe
jb 0x1400c732e
lea rdx, str.Too_long_SOCKS_proxy_name__cant_use__n
jmp 0x1400c7427
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 0x1400c7350
add esi, 9
cmp dword [rsp + 0x40], ebx
je 0x1400c73b4
mov dword [rsp + 0x64], 0x1000000
mov rbx, rdi
nop dword [rax]
inc rbx
cmp byte [r15 + rbx], r13b
jne 0x1400c7370
inc rbx
movsxd rdx, esi
lea rax, [rdx + rbx]
cmp rax, 0x106
jg 0x1400c73b1
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 0x1400c73a0
jmp 0x1400c73b4
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 0x1400c745e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
je 0x1400c7420
mov edx, eax
mov rcx, r12
call fcn.1400ca7f0
mov rcx, qword [r12]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b8ac0
mov rcx, qword [r12]
mov dword [rcx + 0x88d4], ebx
lea rdx, [0x14025bca0]
mov rcx, r14
call fcn.1400b8ac0
mov eax, 7
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.1401bddc0
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 0x1400c7420
mov esi, dword [rsp + 0x40]
test esi, esi
je 0x1400c74c6
test rbx, rbx
jne 0x1400c74c6
inc rdi
cmp byte [r15 + rdi], r13b
jne 0x1400c7476
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.1400b8bc0
cmp dword [rsp + 0x50], 0
jne 0x1400c74ba
cmp rax, rdi
je 0x1400c74c6
lea rdx, str.Failed_to_send_SOCKS4_connect_request.
jmp 0x1400c7427
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.1400c6ec0
test eax, eax
jne 0x1400c7644
cmp qword [rsp + 0x50], 8
jne 0x1400c7644
cmp byte [rsp + 0x60], al
je 0x1400c7511
lea rdx, str.SOCKS4_reply_has_wrong_version__version_should_be_4.
jmp 0x1400c7427
movzx r10d, byte [rsp + 0x61]
mov ecx, r10d
sub ecx, 0x5a
je 0x1400c75ff
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 0x1400c75d2
dec ecx
je 0x1400c75a5
dec ecx
movzx ecx, byte [rsp + 0x66]
je 0x1400c757d
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.1400b8ac0
jmp 0x1400c742f
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.1400b8ac0
jmp 0x1400c742f
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.1400b8ac0
jmp 0x1400c742f
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.1400b8ac0
jmp 0x1400c742f
lea rax, [0x14025a194]
lea r8, [0x1402ddb44]
test esi, esi
lea rdx, str.SOCKS4_s_request_granted._n
mov rcx, r14
cmovne r8, rax
call fcn.1400b89e0
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 0x1400c7434
lea rdx, str.Failed_to_receive_SOCKS4_connect_request_ack.
jmp 0x1400c7427