Function at 0x401ae5
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, 0x1c02b4
call fcn.00408ca0
sub esp, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [0x4423fe4]
test eax, eax
je 0x401b14
cmp dword [ebp - 0x20], 1
jne 0x401b14
mov eax, 0
jmp 0x4020e1
mov dword [0x4423fe4], 1
cmp dword [ebp - 0x20], 1
jne 0x401b2e
mov dword [0x4423fe4], 1
mov dword [ebp - 0xc], 0
mov dword [esp], 0x441e080
call sym._strlen
cmp eax, 0xf
ja 0x401b60
mov dword [esp], 0x441e080
call sym._gethostbyname_4
sub esp, 4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x401ba7
jmp 0x401b6a
mov eax, 0
jmp 0x4020e1
call sym._WSAGetLastError_0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x441e080
mov dword [esp + 4], str.tcpping:_unknown_host__s__error__d__n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov dword [0x4423fe4], 0
mov eax, 0
jmp 0x4020e1
lea eax, [ebp - 0x140060]
mov edx, 0x3fffc
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
lea eax, [ebp - 0x18005c]
mov edx, 0x3fffc
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
lea eax, [ebp - 0x1c0058]
mov edx, 0x3fffc
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0xfffe
jg 0x401c4b
mov eax, dword [ebp - 0x10]
mov dword [ebp + eax*4 - 0x140060], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp + eax*4 - 0x18005c], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp + eax*4 - 0x1c0058], 0
add dword [ebp - 0x10], 1
jmp 0x401c12
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0x1e
jg 0x401e46
mov eax, dword [ebp - 0x14]
imul eax, eax, 0x64
add eax, 0x7530
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
add eax, 1
imul eax, eax, 0x64
add eax, 0x7530
cmp eax, dword [ebp - 0x18]
jl 0x401e2e
lea eax, [ebp - 0x10004c]
mov edx, dword [ebp - 0x18]
shl edx, 4
add eax, edx
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp - 0x18]
shl eax, 4
lea ebx, [ebp - 8]
add eax, ebx
sub eax, 0x100044
mov word [eax], 2
mov eax, dword [ebp - 0x24]
movzx eax, word [eax + 0xa]
movsx edx, ax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
lea ecx, [ebp - 0x10004c]
mov ebx, dword [ebp - 0x18]
shl ebx, 4
add ecx, ebx
add ecx, 4
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call sym._memcpy
mov eax, dword [ebp - 0x18]
movzx eax, ax
mov dword [esp], eax
call sym._htons_4
sub esp, 4
mov edx, eax
mov eax, dword [ebp - 0x18]
shl eax, 4
lea ecx, [ebp - 8]
add eax, ecx
sub eax, 0x100042
mov word [eax], dx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp], eax
call sym._inet_ntoa_4
sub esp, 4
mov dword [esp + 4], eax
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call sym._strcpy
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket_12
sub esp, 0xc
mov edx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x140060], edx
mov dword [ebp - 0x1c0078], 1
mov eax, dword [ebp - 0x18]
mov eax, dword [ebp + eax*4 - 0x140060]
mov edx, eax
lea eax, [ebp - 0x1c0078]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov dword [esp], edx
call sym._ioctlsocket_12
sub esp, 0xc
mov eax, dword [ebp - 0x18]
mov eax, dword [ebp + eax*4 - 0x140060]
cmp eax, 0xffffffff
jne 0x401dea
call sym.__errno
mov eax, dword [eax]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_create__ds_INET_socket__error__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov dword [0x4423fe4], 0
mov eax, 0
jmp 0x4020e1
lea eax, [ebp - 0x10004c]
mov edx, dword [ebp - 0x18]
shl edx, 4
add edx, eax
mov eax, dword [ebp - 0x18]
mov eax, dword [ebp + eax*4 - 0x140060]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._connect_12
sub esp, 0xc
mov edx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x1c0058], edx
add dword [ebp - 0x18], 1
jmp 0x401c6a
mov dword [esp], 0x14
call sym._Sleep_4
sub esp, 4
add dword [ebp - 0x14], 1
jmp 0x401c52
mov dword [esp], 0xc8
call sym._Sleep_4
sub esp, 4
mov dword [ebp - 0x1c], 0x80e8
cmp dword [ebp - 0x1c], 0x752f
jle 0x402069
mov dword [ebp - 0x100064], 0
mov dword [ebp - 0x100060], 0
lea eax, [ebp - 0x1c0290]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [eax], 0
lea eax, [ebp - 0x1c018c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [eax], 0
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x140060]
mov dword [ebp - 0x1c0088], eax
lea eax, [ebp - 0x1c0290]
mov dword [ebp - 0x1c0084], eax
mov eax, dword [ebp - 0x1c0084]
mov eax, dword [eax]
cmp eax, 0x3f
ja 0x401efc
mov eax, dword [ebp - 0x1c0084]
mov edx, dword [ebp - 0x1c0088]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
jne 0x401efc
mov eax, 1
jmp 0x401f01
mov eax, 0
test al, al
je 0x401f22
mov ecx, dword [ebp - 0x1c0084]
mov edx, dword [ebp - 0x1c0084]
mov eax, dword [edx]
lea ebx, [eax + 1]
mov dword [edx], ebx
mov edx, dword [ebp - 0x1c0088]
mov dword [ecx + eax*4 + 4], edx
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x140060]
mov dword [ebp - 0x1c0080], eax
lea eax, [ebp - 0x1c018c]
mov dword [ebp - 0x1c007c], eax
mov eax, dword [ebp - 0x1c007c]
mov eax, dword [eax]
cmp eax, 0x3f
ja 0x401f7d
mov eax, dword [ebp - 0x1c007c]
mov edx, dword [ebp - 0x1c0080]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
jne 0x401f7d
mov eax, 1
jmp 0x401f82
mov eax, 0
test al, al
je 0x401fa3
mov ecx, dword [ebp - 0x1c007c]
mov edx, dword [ebp - 0x1c007c]
mov eax, dword [edx]
lea ebx, [eax + 1]
mov dword [edx], ebx
mov edx, dword [ebp - 0x1c0080]
mov dword [ecx + eax*4 + 4], edx
lea eax, [ebp - 0x100064]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1c018c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1c0290]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._select_20
sub esp, 0x14
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x140060]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x1c0290]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
setne al
test al, al
je 0x40203d
mov eax, dword [ebp - 0x1c]
mov dword [ebp + eax*4 - 0x18005c], 1
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x1c]
mov dword [0x40fa00], eax
cmp dword [ebp - 0x20], 1
jne 0x40204b
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x1c]
mov dword [0x40fa00], eax
jmp 0x40204b
mov eax, dword [ebp - 0x1c]
mov dword [ebp + eax*4 - 0x18005c], 0
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x140060]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
sub dword [ebp - 0x1c], 1
jmp 0x401e5c
cmp dword [ebp - 0xc], 0
jle 0x4020af
cmp dword [ebp - 0x20], 1
je 0x4020cd
mov eax, dword [ebp - 0xc]
mov dword [0x4423b78], eax
mov eax, dword [ebp - 0x162b9c]
cmp eax, 1
jne 0x402092
mov dword [0x40fa00], 0x7530
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x441e080
mov dword [esp], str._n_tServer__s_is_holding_e_40_33_1m_d_matchese_0m_t
call sym._printf
jmp 0x4020cd
mov dword [esp + 4], 0x441e080
mov dword [esp], str._nScanPort_found_no_open_port_on___s
call sym._printf
mov dword [0x40b020], 0xffffffff
mov dword [0x4423fe4], 0
mov dword [0x4423b7c], 1
mov ebx, dword [ebp - 4]
leave
ret