Function at 0x4018b0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov eax, 0x1318
call fcn.0040f7b0
push ebx
mov ebx, dword [esp + 0x1320]
push ebp
mov ebp, ecx
push esi
push edi
lea eax, [ebp + 0xdf]
push ebx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x3f
lea edi, [esp + 0x25]
mov byte [esp + 0x24], al
mov byte [esp + 0x124], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x125]
mov byte [esp + 0x328], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x329]
mov edx, dword [ebp + 4]
rep stosd dword es:[edi], eax
mov cx, word [ebp + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0xc]
push eax
push ecx
push ebx
push edx
call fcn.0040df60
mov ecx, 1
add esp, 0x10
cmp eax, ecx
jge 0x40198e
cmp dword [0x41679c], ecx
jbe 0x40197f
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push str._s__d_Closed__n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1318
ret 4
mov eax, dword [ebp + 4]
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x228], eax
xor edi, edi
mov dword [esp + 0x224], ecx
inc eax
mov ecx, ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], eax
call fcn.00401d10
test eax, eax
jne 0x4019c9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1318
ret 4
lea ebx, [ebp + 0x10]
push edi
mov ecx, ebx
call fcn.00403090
push eax
push edi
mov ecx, ebx
call fcn.004031c0
mov esi, dword [sym.imp.WS2_32.dll_send]
push eax
mov eax, dword [ebp + 4]
push eax
call esi
cmp eax, 0xffffffff
jne 0x401a3e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Send_Error:__d_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1318
ret 4
test eax, eax
je 0x401ce9
push 0
mov ecx, ebx
call fcn.00403090
push eax
push 0
mov ecx, ebx
call fcn.004031c0
mov edx, dword [ebp + 4]
push eax
push edx
call esi
cmp eax, 0xffffffff
je 0x4019ef
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push 0
lea edx, [esp + 0x22c]
push 0
push edx
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x401ce9
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x224]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je case.default.0x401a84
cmp edi, 3
ja case.default.0x401a84
jmp dword [edi*4 + 0x401cf8]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x328]
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x32c]
push 0x1000
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x401c44
mov ecx, ebp
mov dword [esp + 0x10], 1
call fcn.00401f70
jmp 0x401a13
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x328]
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x32c]
push 0x1000
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x401c44
mov eax, dword [esp + 0x331]
mov dword [esp + 0x10], 2
test eax, eax
jne 0x401ce9
mov ecx, dword [esp + 0x353]
lea esi, [esp + 0x355]
and ecx, 0xffff
lea edi, [esp + 0x24]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
mov cl, byte [esp + eax + 0x24]
test cl, cl
je 0x401b52
inc eax
cmp eax, 0x400
jl 0x401b40
jmp 0x401b57
mov byte [esp + eax + 0x24], 0x20
mov eax, dword [esp + 0x348]
mov ecx, ebp
and eax, 0xffff
mov dword [ebp + 0x3c], eax
call fcn.00402170
test eax, eax
je 0x401ce9
push 0
mov ecx, ebx
call fcn.00403090
push eax
push 0
mov ecx, ebx
call fcn.004031c0
mov ecx, dword [ebp + 4]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4019ef
mov edi, dword [esp + 0x10]
mov esi, dword [sym.imp.WS2_32.dll_send]
jmp 0x401a3e
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x328]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 4]
lea edx, [esp + 0x32c]
push 0x1000
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x401c44
mov ecx, dword [esp + 0x344]
mov dword [esp + 0x10], 3
and ecx, 0xffff
mov dword [ebp + 0x40], ecx
mov ecx, ebp
call fcn.00402310
jmp 0x401a13
cmp edi, 4
jb 0x401a3e
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1318
ret 4
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x328]
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x32c]
push 0x1000
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x401c68
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Recv_Error:__d_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1318
ret 4
cmp dword [esp + 0x331], 0xc0000205
jne 0x401cb6
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push str.Vulnerable__n
push edx
push eax
lea ecx, [esp + 0x130]
push str._s_t_s_t_t_s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [esp + 0x138]
push edx
call fcn.0040ebf0
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1318
ret 4
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x24]
push str.Patched___n
push eax
push ecx
lea edx, [esp + 0x130]
push str._s_t_s_t_t_s
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x138]
push eax
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x18
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1318
ret 4