Function at 0x1400c8040
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 [0x140264330]
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 0x1400c80c6
or ecx, 2
dec ecx
je 0x1400c80e1
dec ecx
je 0x1400c80dd
dec ecx
jne 0x1400c80e4
mov ebx, edx
cmp r8d, edx
cmovl ebx, r8d
jmp 0x1400c80e4
mov ebx, edx
jmp 0x1400c80e4
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 0x1400c816c
lea rdx, [0x140267d18]
mov rcx, r14
call fcn.1400b9ac0
mov eax, 0x1c
jmp 0x1400c8434
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.1400b99e0
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 0x1400c82fb
lea r9, [rsp + 0x50]
mov r8d, edi
mov rdx, r15
mov rcx, r12
call fcn.1400b83e0
cmp eax, 0xffffffff
jne 0x1400c81dd
mov eax, 5
jmp 0x1400c8434
cmp eax, 1
jne 0x1400c81ef
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.1400b8de0
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x1400c82df
mov rbx, qword [rdi]
test rbx, rbx
je 0x1400c82df
mov eax, dword [rbx + 4]
cmp eax, 2
je 0x1400c8220
cmp eax, 0x17
jne 0x1400c825f
mov rcx, qword [rbx + 0x20]
add rcx, 8
jmp 0x1400c8228
mov rcx, qword [rbx + 0x20]
add rcx, 4
cmp eax, 2
je 0x1400c8250
cmp eax, 0x17
je 0x1400c823f
mov ecx, 0x273f
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400c825f
lea rdx, [rbp + 0x70]
mov r8d, 0x40
call fcn.1400cb190
jmp 0x1400c825f
lea rdx, [rbp + 0x70]
mov r8d, 0x40
call fcn.1400cb0c0
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 0x1400c82b9
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 0x1400c82bc
mov rbx, r13
lea r8, [rbp + 0x70]
lea rdx, str.SOCKS4_connect_to__s__locally_resolved__n
mov rcx, r14
call fcn.1400b99e0
mov rdx, rdi
mov rcx, r14
call fcn.1400b85a0
test rbx, rbx
jne 0x1400c82fb
lea rdx, str.Failed_to_resolve___s__for_SOCKS4_connect.
mov r8, r15
mov rcx, r14
call fcn.1400b9ac0
mov eax, 6
jmp 0x1400c8434
or rdi, 0xffffffffffffffff
mov byte [rsp + 0x68], r13b
test rsi, rsi
je 0x1400c833e
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rsi + r8], r13b
jne 0x1400c8310
cmp r8, 0xfe
jb 0x1400c832e
lea rdx, str.Too_long_SOCKS_proxy_name__cant_use__n
jmp 0x1400c8427
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 0x1400c8350
add esi, 9
cmp dword [rsp + 0x40], ebx
je 0x1400c83b4
mov dword [rsp + 0x64], 0x1000000
mov rbx, rdi
nop dword [rax]
inc rbx
cmp byte [r15 + rbx], r13b
jne 0x1400c8370
inc rbx
movsxd rdx, esi
lea rax, [rdx + rbx]
cmp rax, 0x106
jg 0x1400c83b1
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 0x1400c83a0
jmp 0x1400c83b4
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 0x1400c845e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
je 0x1400c8420
mov edx, eax
mov rcx, r12
call fcn.1400cb800
mov rcx, qword [r12]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400b9ac0
mov rcx, qword [r12]
mov dword [rcx + 0x88d4], ebx
lea rdx, [0x140267df0]
mov rcx, r14
call fcn.1400b9ac0
mov eax, 7
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.1401bb2c0
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 0x1400c8420
mov esi, dword [rsp + 0x40]
test esi, esi
je 0x1400c84c6
test rbx, rbx
jne 0x1400c84c6
inc rdi
cmp byte [r15 + rdi], r13b
jne 0x1400c8476
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.1400b9bc0
cmp dword [rsp + 0x50], 0
jne 0x1400c84ba
cmp rax, rdi
je 0x1400c84c6
lea rdx, str.Failed_to_send_SOCKS4_connect_request.
jmp 0x1400c8427
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.1400c7ec0
test eax, eax
jne 0x1400c8644
cmp qword [rsp + 0x50], 8
jne 0x1400c8644
cmp byte [rsp + 0x60], al
je 0x1400c8511
lea rdx, str.SOCKS4_reply_has_wrong_version__version_should_be_4.
jmp 0x1400c8427
movzx r10d, byte [rsp + 0x61]
mov ecx, r10d
sub ecx, 0x5a
je 0x1400c85ff
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 0x1400c85d2
dec ecx
je 0x1400c85a5
dec ecx
movzx ecx, byte [rsp + 0x66]
je 0x1400c857d
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.1400b9ac0
jmp 0x1400c842f
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.1400b9ac0
jmp 0x1400c842f
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.1400b9ac0
jmp 0x1400c842f
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.1400b9ac0
jmp 0x1400c842f
lea rax, [0x1402662e4]
lea r8, [0x1402ead44]
test esi, esi
lea rdx, str.SOCKS4_s_request_granted._n
mov rcx, r14
cmovne r8, rax
call fcn.1400b99e0
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 0x1400c8434
lea rdx, str.Failed_to_receive_SOCKS4_connect_request_ack.
jmp 0x1400c8427