Function at 0x40c98c
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff938
mov eax, 0x58a29c
push ebx
push esi
push edi
call fcn.0056134c
mov edx, dword [ebp + 8]
push edx
call fcn.004012c0
pop ecx
mov edi, eax
call sub.KERNEL32.DLL_GetCurrentThreadId
mov word [ebp - 0x2e], ax
xor eax, eax
mov dword [ebp - 0x34], 0x10
mov dword [ebp - 0x50], eax
xor edx, edx
mov word [ebp - 0x18], 8
mov dword [ebp - 4], edx
xor ebx, ebx
inc dword [ebp - 0xc]
lea esi, [ebp - 0x490]
mov word [ebp - 0x18], 0x14
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x40ca0a
mov eax, dword [ebp + 0xc]
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebp - 0xc]
call fcn.00583ae8
pop eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x40cd05
push 0
push 0
push 0
push 1
push 3
push 2
call sub.WS2_32.DLL_WSASocketA
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
cmp ecx, 0xffffffff
jne 0x40ca4a
mov eax, dword [ebp + 0xc]
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebp - 0xc]
call fcn.00583ae8
pop eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x40cd05
mov dword [ebp - 0x5c], 0x20
lea ecx, [ebp - 0x4b0]
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x58], ecx
push eax
push edi
call fcn.00401308
add esp, 8
lea edx, [ebp - 0x6c8]
push 0x10
push 0
push edx
call fcn.00560eac
add esp, 0xc
lea ecx, [ebp - 0x7c]
push ecx
call sub.WS2_32.DLL_inet_addr
mov dword [ebp - 0x6c4], eax
xor eax, eax
mov word [ebp - 0x6c8], 2
mov dword [ebp - 0x5b4], eax
xor eax, eax
lea edx, [ebp - 0x5b0]
jmp 0x40cab1
mov ecx, dword [edx]
mov edi, dword [ebp - 0x54]
cmp ecx, edi
je 0x40cabb
inc eax
add edx, 4
mov ecx, dword [ebp - 0x5b4]
cmp eax, ecx
jb 0x40caa4
mov edx, dword [ebp - 0x5b4]
cmp eax, edx
jne 0x40cada
cmp edx, 0x40
jae 0x40cada
mov edx, dword [ebp - 0x54]
mov dword [ebp + eax*4 - 0x5b0], edx
inc dword [ebp - 0x5b4]
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp - 0x48]
mov edx, dword [0x58f288]
cmp eax, edx
jb 0x40cafd
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x4c], ecx
jmp 0x40ccb6
push 4
lea eax, [ebp - 0x44]
push eax
push 4
push 0
mov edx, dword [ebp - 0x54]
push edx
call sub.WS2_32.DLL_setsockopt
mov cx, word [ebp - 0x2e]
push ecx
push ebx
mov eax, dword [ebp - 0x5c]
push eax
mov edx, dword [ebp - 0x58]
push edx
call fcn.004013ac
add esp, 0x10
jmp 0x40cb2b
inc dword [ebp - 0x50]
push 0x10
lea ecx, [ebp - 0x6c8]
push ecx
push 0
mov eax, dword [ebp - 0x5c]
push eax
mov edx, dword [ebp - 0x58]
push edx
mov ecx, dword [ebp - 0x54]
push ecx
call sub.WS2_32.DLL_sendto
inc eax
jne 0x40cb52
mov eax, dword [ebp - 0x50]
cmp eax, 0x14
jl 0x40cb28
mov edx, dword [ebp - 0x50]
cmp edx, 0x14
jne 0x40cb6d
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x44]
cmp ecx, eax
sete dl
and edx, 1
jmp 0x40ccb6
mov ecx, dword [0x58f28c]
mov edi, 0x3e8
mov eax, ecx
xor edx, edx
div edi
mov byte [ebp - 0x3d], 0
mov dword [ebp - 0x3c], eax
mov eax, ecx
mov ecx, 0x3e8
xor edx, edx
div ecx
mov eax, edx
shl eax, 3
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
mov dword [ebp - 0x38], eax
mov dl, byte [ebp - 0x3d]
test dl, dl
jne 0x40cae5
push esi
lea esi, [ebp - 0x5b4]
lea edi, [ebp - 0x6b8]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
pop esi
lea eax, [ebp - 0x3c]
push eax
push 0
push 0
lea edx, [ebp - 0x6b8]
push edx
push 1
call fcn.0040144c
add esp, 0x14
test eax, eax
jne 0x40cbe8
inc dword [ebp - 0x48]
inc ebx
mov byte [ebp - 0x3d], 1
jmp 0x40cba1
lea ecx, [ebp - 0x34]
push ecx
lea eax, [ebp - 0x6c]
push eax
push 0
push 0x414
push esi
mov edx, dword [ebp - 0x54]
push edx
call sub.WS2_32.DLL_recvfrom
mov al, byte [esi]
and eax, 0xf
and eax, 0xff
shl eax, 2
mov word [ebp - 0x18], 0x14
movzx edx, ax
add edx, esi
mov eax, edx
mov cl, byte [eax]
cmp cl, 0xb
jne 0x40cc66
lea edx, [eax + 8]
mov al, byte [edx]
and eax, 0xf
and eax, 0xff
shl eax, 2
movzx ecx, ax
add edx, ecx
mov eax, edx
mov dl, byte [eax]
cmp dl, 8
jne 0x40cba1
mov dx, word [eax + 4]
cmp dx, word [ebp - 0x2e]
jne 0x40cba1
movzx eax, word [eax + 6]
cmp ebx, eax
jg 0x40cba1
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x4c], ecx
jmp 0x40ccb6
mov dx, word [eax + 4]
cmp dx, word [ebp - 0x2e]
jne 0x40cba1
movzx ecx, word [eax + 6]
cmp ebx, ecx
jg 0x40cba1
mov dl, byte [eax]
test dl, dl
jne 0x40cca6
dec dword [ebp - 0x44]
xor eax, eax
mov dword [ebp - 0x48], eax
inc ebx
mov ecx, dword [ebp - 0x44]
test ecx, ecx
jne 0x40cc9d
xor eax, eax
mov dword [ebp - 0x4c], eax
jmp 0x40ccb6
mov byte [ebp - 0x3d], 1
jmp 0x40cba1
mov dl, byte [ebp - 0x3d]
test dl, dl
je 0x40cbac
jmp 0x40cae5
mov ecx, dword [ebp - 0x54]
push ecx
call sub.WS2_32.DLL_closesocket
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x7c]
push eax
lea eax, [ebp - 4]
mov edx, dword [ebp + 0xc]
push edx
push ecx
push str.___PrecHopCount_of__s:_Stima___02d___Real___02d
push eax
call fcn.00583cac
add esp, 0x14
mov edx, dword [ebp - 4]
push edx
call fcn.004115a8
pop ecx
mov eax, dword [ebp - 0x4c]
push eax
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 2
call fcn.00583ae8
pop eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret