Function at 0x40424a
Capabilities:
Get socket status
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0x3e8
lea eax, [ebp - 0x48]
mov dword [esp], eax
call sym._time
mov dword [esp], 1
call sym.__isatty
test eax, eax
jne 0x404290
mov dword [esp + 4], 0x8000
mov dword [esp], 1
call sym.__setmode
mov dword [esp], 0
call sym.__isatty
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x4042b9
mov dword [esp + 4], 0x8000
mov dword [esp], 0
call sym.__setmode
mov dword [ebp - 0x24], 0
jmp 0x4042d6
mov eax, dword [0x40a1c8]
mov edx, dword [ebp - 0x24]
mov eax, dword [eax + edx*4 + 4]
cmp eax, dword [ebp + 8]
je 0x4042e2
inc dword [ebp - 0x24]
mov eax, dword [0x40a1c8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x24]
ja 0x4042c2
mov eax, dword [0x40a1c8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x24]
jne 0x404313
mov eax, dword [0x40a1c8]
mov eax, dword [eax]
cmp eax, 0x3f
ja 0x404313
mov eax, dword [0x40a1c8]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp + 8]
mov dword [eax + edx*4 + 4], ecx
mov eax, dword [0x40a1c8]
mov edx, dword [eax]
inc edx
mov dword [eax], edx
mov word [ebp - 0x32], 2
mov word [ebp - 0x2e], 0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov eax, dword [0x40a08c]
test eax, eax
je 0x4043d2
mov eax, dword [0x40a08c]
mov dword [ebp - 0x3c], eax
mov eax, dword [0x40a1b8]
mov dword [ebp - 0x60], eax
mov word [ebp - 0x2e], 1
mov ax, word [0x407024]
test ax, ax
je 0x404366
mov dword [0x40a08c], 0
jmp 0x4043d2
mov dword [ebp - 0x20], 0
jmp 0x4043ba
mov eax, dword [0x40a1c8]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*4 + 4]
test eax, eax
jne 0x4043b7
jmp 0x40439e
mov eax, dword [0x40a1c8]
mov edx, dword [ebp - 0x20]
mov ecx, dword [0x40a1c8]
mov ebx, dword [ebp - 0x20]
inc ebx
mov ecx, dword [ecx + ebx*4 + 4]
mov dword [eax + edx*4 + 4], ecx
inc dword [ebp - 0x20]
mov eax, dword [0x40a1c8]
mov eax, dword [eax]
dec eax
cmp eax, dword [ebp - 0x20]
ja 0x404381
mov eax, dword [0x40a1c8]
mov edx, dword [eax]
dec edx
mov dword [eax], edx
jmp 0x4043c6
inc dword [ebp - 0x20]
mov eax, dword [0x40a1c8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x20]
ja 0x40436f
mov dword [esp], 0
call sym._close
mov eax, dword [0x40a0bc]
test eax, eax
je 0x4043e8
mov eax, dword [0x40a0bc]
mov dword [esp], eax
call sym.__sleep
call sym.__errno
mov dword [eax], 0
mov dword [esp], 0
call sym._WSASetLastError_4
sub esp, 4
jmp 0x404883
mov word [ebp - 0x30], 0x2008
cmp word [ebp - 0x2e], 0
je 0x40441f
mov word [ebp - 0x2e], 0
jmp 0x40471d
mov edx, dword [0x40a1e8]
mov eax, dword [0x40a1c8]
mov ebx, eax
mov eax, 0x41
mov edi, edx
mov esi, ebx
mov ecx, eax
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x40a098]
test eax, eax
je 0x404461
mov edx, dword [0x40a098]
mov eax, dword [0x40a09c]
mov dword [esp + 8], 8
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [0x40a1e8]
lea edx, [ebp - 0x44]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x10
call sym._select_20
sub esp, 0x14
mov ebx, eax
test ebx, ebx
jns 0x4044e4
call sym._WSAGetLastError_0
cmp eax, 0x2714
je 0x4044e4
call sym._WSAGetLastError_0
mov dword [ebp - 0x28], eax
mov dword [esp], str.select_fuxored
call dbg.holler
mov dword [esp + 4], 2
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov eax, 1
jmp 0x4048cb
test ebx, ebx
jne 0x404573
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._time
mov eax, dword [0x40a0cc]
test eax, eax
je 0x404573
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
sub edx, eax
mov eax, dword [0x40a098]
mov eax, dword [eax]
cmp edx, eax
jle 0x404573
mov ax, word [0x40a0ca]
cmp ax, 1
jbe 0x40452b
mov dword [esp], str.net_timeout
call dbg.holler
mov dword [esp + 4], 2
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov eax, dword [0x40a1c8]
mov dword [eax], 0
mov dword [esp], 0
call sym._WSASetLastError_4
sub esp, 4
mov eax, 0
jmp 0x4048cb
mov eax, dword [0x40a1e8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x40463f
lea eax, [ebp - 0x48]
mov dword [esp], eax
call sym._time
mov eax, dword [0x40a198]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x2000
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._recv_16
sub esp, 0x10
mov ebx, eax
test ebx, ebx
jg 0x404634
mov dword [ebp - 0x1c], 0
jmp 0x40461f
mov eax, dword [0x40a1c8]
mov edx, dword [ebp - 0x1c]
mov eax, dword [eax + edx*4 + 4]
cmp eax, dword [ebp + 8]
jne 0x40461c
jmp 0x404603
mov eax, dword [0x40a1c8]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [0x40a1c8]
mov ebx, dword [ebp - 0x1c]
inc ebx
mov ecx, dword [ecx + ebx*4 + 4]
mov dword [eax + edx*4 + 4], ecx
inc dword [ebp - 0x1c]
mov eax, dword [0x40a1c8]
mov eax, dword [eax]
dec eax
cmp eax, dword [ebp - 0x1c]
ja 0x4045e6
mov eax, dword [0x40a1c8]
mov edx, dword [eax]
dec edx
mov dword [eax], edx
jmp 0x40462b
inc dword [ebp - 0x1c]
mov eax, dword [0x40a1c8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x1c]
ja 0x4045d3
mov dword [ebp - 0x3c], 0
jmp 0x40463f
mov dword [ebp - 0x38], ebx
mov eax, dword [0x40a198]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x3c], 0
jne 0x404716
cmp dword [ebp - 0x2c], 0
je 0x4046b9
call sym._kbhit
test eax, eax
je 0x404719
mov eax, dword [0x40a1b8]
mov dword [esp], eax
call sym._gets
mov eax, dword [0x40a1b8]
mov dword [esp + 4], 0x4089c8
mov dword [esp], eax
call sym._strcat
mov eax, dword [0x40a1b8]
mov dword [esp], eax
call sym._strlen
mov ebx, eax
mov dword [ebp - 0x3c], ebx
mov ecx, dword [0x40a1b8]
mov dword [ebp - 0x60], ecx
mov ax, word [0x407024]
test ax, ax
jne 0x40471c
mov eax, ebx
mov dword [0x40a08c], eax
mov dword [esp], 0
call sym._close
jmp 0x40471d
mov eax, dword [0x40a1b8]
mov dword [esp + 8], 0x2000
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._read
mov ebx, eax
test ebx, ebx
jg 0x4046ea
mov dword [esp], 0
call sym._close
jmp 0x40471d
mov dword [ebp - 0x3c], ebx
mov esi, dword [0x40a1b8]
mov dword [ebp - 0x60], esi
mov ax, word [0x407024]
test ax, ax
jne 0x40471d
mov eax, ebx
mov dword [0x40a08c], eax
mov dword [esp], 0
call sym._close
jmp 0x40471d
nop
jmp 0x40471d
nop
jmp 0x40471d
nop
cmp dword [ebp - 0x3c], 0x2008
ja 0x40472f
cmp dword [ebp - 0x38], 0x2008
jbe 0x404756
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], str.Preposterous_Pointers:__d___d
call dbg.holler
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
cmp word [ebp - 0x30], 0
jne 0x404773
mov dword [esp], str.too_many_output_retries
call dbg.holler
mov eax, 1
jmp 0x4048cb
cmp dword [ebp - 0x38], 0
je 0x4047e2
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], eax
mov edi, dword [ebp - 0x5c]
mov dword [esp + 4], edi
mov dword [esp], 1
call sym._write
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], eax
call sym._fflush
test ebx, ebx
jle 0x4047e2
mov ax, word [0x40a0c4]
test ax, ax
je 0x4047c8
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], eax
mov dword [esp], 1
call dbg.oprint
mov eax, ebx
add dword [ebp - 0x5c], eax
mov eax, ebx
sub dword [ebp - 0x38], eax
mov edx, dword [0x40a090]
mov eax, ebx
lea eax, [edx + eax]
mov dword [0x40a090], eax
cmp dword [ebp - 0x3c], 0
je 0x40484b
mov eax, dword [0x40a0bc]
test eax, eax
je 0x404807
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x60]
mov dword [esp], ecx
call dbg.findline
mov ebx, eax
jmp 0x40480a
mov ebx, dword [ebp - 0x3c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov esi, dword [ebp - 0x60]
mov dword [esp + 4], esi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._send_16
sub esp, 0x10
mov ebx, eax
test ebx, ebx
jle 0x40484b
mov eax, ebx
add dword [ebp - 0x60], eax
mov eax, ebx
sub dword [ebp - 0x3c], eax
mov edx, dword [0x40a094]
mov eax, ebx
lea eax, [edx + eax]
mov dword [0x40a094], eax
mov eax, dword [0x40a0bc]
test eax, eax
je 0x40486e
mov eax, dword [0x40a0bc]
mov dword [esp], eax
call sym.__sleep
call sym.__errno
mov dword [eax], 0
jmp 0x404883
cmp dword [ebp - 0x3c], 0
jne 0x40487a
cmp dword [ebp - 0x38], 0
je 0x404883
dec word [ebp - 0x30]
jmp 0x40471d
mov eax, dword [0x40a1c8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
jne 0x404407
mov dword [esp + 4], 2
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov eax, 0
lea esp, [ebp - 0xc]
add esp, 0
pop ebx
pop esi
pop edi
leave
ret