Function at 0x40b9a0
Capabilities:
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x40ee8b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5d0
push ebp
push esi
push edi
mov esi, ecx
mov edi, 1
lea ecx, [esp + 0xc]
mov dword [esi + 8], edi
call fcn.0040dcaa
xor ebp, ebp
push ebp
push 2
push 2
mov dword [esp + 0x5f0], ebp
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x20], eax
mov eax, dword [0x41371c]
mov dword [esp + 0x28], ebp
mov word [esp + 0x24], 2
mov cx, word [eax + 0x12d8]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov eax, dword [esi + 0x20]
lea edx, [esp + 0x24]
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x40ba64
lea ecx, [esp + 0xc]
push 0x8037
push ecx
call sub.MFC42.DLL_CString::Format_1
mov edx, dword [esp + 0x14]
push edx
call fcn.00403d70
mov eax, dword [esi + 0x20]
add esp, 0xc
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0xc]
mov dword [esi + 8], ebp
mov dword [esp + 0x5e4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, edi
jmp 0x40bc70
mov edx, dword [esi + 0x20]
lea ecx, [esp + 0x20]
push ebx
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x30], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
mov dword [esi + 4], edi
mov dword [esp + 0x20], 0x10
mov edx, dword [esi + 0x20]
lea eax, [esp + 0x20]
push eax
lea eax, [esi + 0x10]
push eax
push ebp
lea ecx, [esp + 0x44]
push 0x5a8
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jle 0x40bc34
mov eax, dword [esp + 0x38]
and eax, 0xff
sub eax, 9
je 0x40bae2
sub eax, 2
jne 0x40bc3c
lea eax, [esp + 0x3c]
push eax
push 0x413240
call fcn.00403d70
add esp, 8
jmp 0x40bc3c
mov eax, dword [esi + 0xc]
push ebp
add eax, 0x1c0
push ebp
push 0x1009
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x38]
xor edx, edx
mov dword [esp + 0x15], edx
mov ecx, eax
mov dword [esp + 0x19], edx
mov byte [esp + 0x14], 0
and cl, dl
mov word [esp + 0x1d], dx
cmp ecx, 0xa00
mov edi, 0xa
jbe 0x40bbef
movsx edx, byte [esp + 0x45]
movsx eax, byte [esp + 0x44]
push edx
push eax
lea ecx, [esp + 0x1c]
push 0x4135f4
push ecx
call ebx
mov ecx, dword [esi + 0xc]
add esp, 0x10
lea edx, [esp + 0x14]
add ecx, 0x1c0
push 0
push 0
push 0
push 0
push edx
push 0xffff
push 1
call sub.MFC42.DLL_CListCtrl::InsertItem
movsx ecx, byte [esp + edi + 0x49]
movsx edx, byte [esp + edi + 0x48]
mov ebp, eax
movsx eax, byte [esp + edi + 0x4a]
push eax
push ecx
movsx eax, byte [esp + edi + 0x4f]
movsx ecx, byte [esp + edi + 0x4e]
push edx
push eax
movsx edx, byte [esp + edi + 0x55]
push ecx
push edx
lea eax, [esp + 0x2c]
push 0x4135e4
push eax
call ebx
add esp, 0x20
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0xc]
push 1
push ebp
add ecx, 0x1c0
call sub.MFC42.DLL_CListCtrl::SetItemText
movsx edx, byte [esp + edi + 0x44]
push edx
lea eax, [esp + 0x18]
push 0x4135e0
push eax
call ebx
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0xc]
push 2
push ebp
add ecx, 0x1c0
call sub.MFC42.DLL_CListCtrl::SetItemText
mov eax, dword [esp + 0x38]
add edi, 7
mov edx, eax
shr edx, 8
cmp edi, edx
jb 0x40bb28
and al, 0
cmp eax, 0xa00
jbe 0x40bc16
lea eax, [esp + 0x10]
push 0x8038
push eax
call sub.MFC42.DLL_CString::Format_1
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00403d70
add esp, 0xc
jmp 0x40bc3c
lea edx, [esp + 0x10]
push 0x8039
push edx
call sub.MFC42.DLL_CString::Format_1
mov eax, dword [esp + 0x18]
push eax
call fcn.00403d70
add esp, 0xc
jmp 0x40bc3c
push 0x14
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov eax, dword [esi + 4]
xor ebp, ebp
cmp eax, ebp
jne 0x40ba8e
mov ecx, dword [esi + 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x10]
mov dword [esi + 8], ebp
mov dword [esp + 0x5e8], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x5dc]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x5dc
ret