Function at 0x4085d0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Terminate process

Disassembly:
mov eax, 0x444c
call fcn.00413610
push ebp
push esi
push edi
xor edi, edi
push str.client_listener_routine_entered
or ebp, 0xffffffff
push edi
push 3
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebp
call fcn.00404de0
mov eax, dword [0x41a548]
mov esi, dword [esp + 0x4468]
add esp, 0xc
cmp eax, edi
mov dword [esp + 0x250], edi
mov dword [esp + 0x14c], edi
je 0x408630
lea eax, [esp + 0x250]
push edi
push eax
push esi
call fcn.00408ac0
add esp, 0xc
mov dword [esp + 0xc], eax
mov ebp, eax
cmp dword [0x41e3dc], edi
je 0x408655
lea ecx, [esp + 0x14c]
push 1
push ecx
push esi
call fcn.00408ac0
add esp, 0xc
cmp eax, ebp
jle 0x408655
mov dword [esp + 0xc], eax
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x408671
push str.client_not_listening_on_any_ports____check_tunnel_specifications
push edi
push edi
call fcn.00404de0
add esp, 0xc
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [0x41e3ac]
cmp eax, edi
je 0x4086a7
push eax
push str.spawning_command__s
push edi
push 3
call fcn.00404de0
mov edx, dword [0x41e3ac]
mov ax, word [esi]
push edx
push eax
call fcn.00407710
add esp, 0x18
test eax, eax
jne 0x4086a7
push 1
call dword [sym.imp.MSVCRT.dll_exit]
cmp dword [0x41a534], edi
je 0x4086c4
push str.detaching_from_terminal
push edi
push 3
call fcn.00404de0
add esp, 0xc
call fcn.00407dd0
cmp dword [0x41e3e8], edi
je 0x408724
mov ecx, dword [0x41e3b0]
and ecx, 0xffff
push ecx
push str.listening_for_server_connection_on_port__hu
push edi
push 3
call fcn.00404de0
mov edx, dword [0x41e3e4]
push edi
push edx
push 0x41e3b0
call fcn.00405f60
add esp, 0x1c
cmp eax, 0xffffffff
mov dword [0x41a550], eax
jne 0x408724
push str.cant_create_listener_socket_for_server_connection
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
push edi
call fcn.00404de0
add esp, 0xc
push 1
call dword [sym.imp.MSVCRT.dll_exit]
cmp dword [0x41e3dc], edi
je 0x40873c
push str.listening_for_client_UDP_data
push edi
push 1
call fcn.00404de0
add esp, 0xc
xor esi, esi
cmp ebp, edi
mov dword [esp + 0x48], edi
jl 0x408790
lea ecx, [esp + 0x250]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x408763
mov eax, dword [esp + 0x48]
cmp eax, 0x40
jae 0x40878b
jmp 0x40877e
lea edx, [esp + 0x14c]
push edx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40878b
mov eax, dword [esp + 0x48]
cmp eax, 0x40
jae 0x40878b
mov dword [esp + eax*4 + 0x4c], esi
mov eax, dword [esp + 0x48]
inc eax
mov dword [esp + 0x48], eax
inc esi
cmp esi, ebp
jle 0x408746
push ebx
mov eax, dword [0x41e3dc]
mov ecx, 0x41
lea esi, [esp + 0x4c]
lea edi, [esp + 0x358]
test eax, eax
rep movsd dword es:[edi], dword [esi]
je 0x4087c1
mov eax, dword [esp + 0x14]
and eax, 0xffff
push eax
push str.waiting_for_client_data
push 0
push 5
jmp 0x4087d5
mov ecx, dword [esp + 0x14]
and ecx, 0xffff
push ecx
push str.waiting_for_client_connection
push 0
push 1
call fcn.00404de0
add esp, 0x10
lea edx, [esp + 0x358]
lea eax, [ebp + 1]
push 0
push 0
push 0
push edx
push eax
call sub.WS2_32.dll_select
mov esi, eax
mov eax, dword [0x41e3dc]
neg eax
sbb eax, eax
push esi
and eax, 2
push str.select_returned__d
add eax, 3
push 0
push eax
call fcn.00404de0
add esp, 0x10
test esi, esi
je 0x408a8f
mov edi, dword [sym.imp.MSVCRT.dll__errno]
jge 0x408831
call edi
cmp dword [eax], 4
jne 0x408a7b
xor ebx, ebx
test ebp, ebp
jl 0x4089a1
lea ecx, [esp + 0x358]
push ecx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x408998
lea edx, [esp + 0x150]
push edx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4089bf
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
lea edx, [esp + 0x468]
push 0x3fff
push edx
push ebx
mov dword [esp + 0x30], 0x10
call sub.WS2_32.dll_recvfrom
mov ebp, eax
test ebp, ebp
jle 0x4089b3
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.004083d0
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x408964
push 1
lea edx, [esp + 0x18]
push str.127.0.0.1
push edx
mov dword [esp + 0x20], 0
call fcn.00405f60
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x408994
mov eax, dword [0x41e3a8]
test eax, eax
jne 0x4088f2
mov eax, dword [0x41a540]
test eax, eax
je 0x4088f2
xor eax, eax
jmp 0x4088f7
mov eax, 1
lea ecx, [esp + 0x1c]
push 1
push ecx
push eax
push esi
push ebx
push 0x408c30
call fcn.00408270
mov edi, eax
add esp, 0x18
test edi, edi
je 0x40895e
mov eax, dword [esp + 0x14]
xor edx, edx
mov dword [esp + 0x2c], edx
push eax
mov dword [esp + 0x34], edx
mov word [esp + 0x30], 2
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
call sub.WS2_32.dll_htons
push 0x7f000001
mov word [esp + 0x32], ax
call sub.WS2_32.dll_htonl
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x1c]
push ecx
push esi
push edi
push edx
mov dword [esp + 0x40], eax
call fcn.00408490
add esp, 0x10
mov edi, dword [sym.imp.MSVCRT.dll__errno]
lea eax, [esp + 0x2c]
push 0x10
push eax
push 0
lea ecx, [esp + 0x468]
push ebp
push ecx
push esi
call sub.WS2_32.dll_sendto
cmp eax, ebp
je 0x408994
push str.failed_to_send_data_to_loopback_socket
call edi
mov edx, dword [eax]
push edx
push 0
call fcn.00404de0
add esp, 0xc
mov ebp, dword [esp + 0x10]
inc ebx
cmp ebx, ebp
jle 0x40883b
mov eax, dword [0x41a540]
test eax, eax
je 0x408a8f
jmp 0x408791
push str.cant_read_next_message
call edi
mov eax, dword [eax]
push eax
jmp 0x40898a
push ebx
push str.connection_ready_on_socket__d
push 0
push 5
call fcn.00404de0
xor ecx, ecx
add esp, 0x10
mov dword [esp + 0x1c], ecx
lea edx, [esp + 0x18]
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x1c]
push edx
mov dword [esp + 0x28], ecx
push eax
push ebx
mov dword [esp + 0x24], 0x10
mov dword [esp + 0x34], ecx
call sub.WS2_32.dll_accept
mov esi, eax
test esi, esi
jge 0x408a17
push str.error_on_accept
call edi
mov ecx, dword [eax]
push ecx
push 0
call fcn.00404de0
add esp, 0xc
jmp 0x408998
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x3c]
push edx
push eax
call fcn.00405b50
push eax
push str.accepted_connection_from__s
push 0
push 1
call fcn.00404de0
push esi
call fcn.004060f0
push esi
call fcn.00406140
mov eax, dword [0x41e3a8]
add esp, 0x20
test eax, eax
jne 0x408a5a
mov eax, dword [0x41a540]
test eax, eax
je 0x408a5a
xor eax, eax
jmp 0x408a5f
mov eax, 1
lea ecx, [esp + 0x1c]
push 0
push ecx
push eax
push esi
push ebx
push 0x408c30
call fcn.00408270
add esp, 0x18
jmp 0x408998
push str.error_in_select
call edi
mov edx, dword [eax]
push edx
push 0
call fcn.00404de0
add esp, 0xc
xor esi, esi
pop ebx
test ebp, ebp
jl 0x408ab0
lea eax, [esp + 0x48]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x408aab
push esi
call sub.WS2_32.dll_closesocket
inc esi
cmp esi, ebp
jle 0x408a96
call fcn.00404ce0
pop edi
pop esi
pop ebp
add esp, 0x444c
ret