Function at 0x40d6e0
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x42d084]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
mov dword [ebp - 4], 0x10
mov eax, dword [0x42f5cc]
and eax, 1
je 0x40d72d
push str.sorecvfrom
push 0x427144
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414be4
add esp, 0xc
mov edx, dword [0x42f5c8]
push edx
call fcn.00414b88
add esp, 4
mov eax, dword [0x42f5cc]
and eax, 1
je 0x40d77f
mov ecx, dword [0x42f5c8]
push ecx
push 0x20
call fcn.00415811
add esp, 8
mov edx, dword [ebp + 8]
push edx
push 0x42714c
mov eax, dword [0x42f5c8]
push eax
call fcn.00414be4
add esp, 0xc
mov ecx, dword [0x42f5c8]
push ecx
push 0xa
call fcn.00415811
add esp, 8
mov edx, dword [0x42f5c8]
push edx
call fcn.00414b88
add esp, 4
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x26]
cmp ecx, 1
jne 0x40d8ce
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x18]
push eax
push 0
push 0x100
lea ecx, [ebp - 0x118]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0xffffffff
jne 0x40d7ec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2746
jne 0x40d7ec
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
call fcn.00404fb0
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 0
jmp 0x40d8bd
cmp dword [ebp - 0x11c], 0xffffffff
je 0x40d802
cmp dword [ebp - 0x11c], 0
jne 0x40d8a4
mov byte [ebp - 0x11d], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2751
jne 0x40d81f
mov byte [ebp - 0x11d], 1
jmp 0x40d833
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2743
jne 0x40d833
mov byte [ebp - 0x11d], 0
mov ecx, dword [0x42f5cc]
and ecx, 2
je 0x40d877
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0041528e
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._udp_icmp_rx_errno___d__s_n
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0x10
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0041528e
add esp, 4
push eax
push 0
movzx ecx, byte [ebp - 0x11d]
push ecx
push 3
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
call fcn.00404ad0
add esp, 0x14
jmp 0x40d8bd
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
call fcn.00404fb0
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00414680
add esp, 4
jmp 0x40dbc8
call fcn.00406c70
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
jne 0x40d8e7
jmp 0x40dbc8
mov edx, dword [ebp - 0x12c]
mov eax, dword [edx + 0x1c]
add eax, dword [0x42f270]
mov ecx, dword [ebp - 0x12c]
mov dword [ecx + 0x1c], eax
mov edx, dword [ebp - 0x12c]
mov eax, dword [edx + 0x10]
and eax, 1
je 0x40d930
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ecx + 0x24]
mov eax, dword [ebp - 0x12c]
add edx, dword [eax + 0x14]
mov ecx, dword [ebp - 0x12c]
sub edx, dword [ecx + 0x1c]
mov dword [ebp - 0x134], edx
jmp 0x40d952
mov edx, dword [ebp - 0x12c]
mov eax, dword [edx + 0x14]
mov ecx, dword [ebp - 0x12c]
lea edx, [ecx + eax + 0x24]
mov eax, dword [ebp - 0x12c]
sub edx, dword [eax + 0x1c]
mov dword [ebp - 0x134], edx
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ebp - 0x134]
sub edx, dword [ecx + 0x20]
mov dword [ebp - 0x128], edx
lea eax, [ebp - 0x124]
push eax
push 0x4004667f
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0x124]
cmp eax, dword [ebp - 0x128]
jbe 0x40da3d
mov ecx, dword [ebp - 0x12c]
add ecx, 0x24
mov edx, dword [ebp - 0x12c]
mov eax, dword [edx + 0x1c]
sub eax, ecx
mov ecx, dword [ebp - 0x12c]
add eax, dword [ecx + 0x20]
mov edx, dword [ebp - 0x124]
lea eax, [eax + edx + 1]
mov dword [ebp - 0x124], eax
mov ecx, dword [ebp - 0x124]
push ecx
mov edx, dword [ebp - 0x12c]
push edx
call fcn.00406fa0
add esp, 8
mov eax, dword [ebp - 0x12c]
mov ecx, dword [eax + 0x10]
and ecx, 1
je 0x40da06
mov edx, dword [ebp - 0x12c]
mov eax, dword [edx + 0x24]
mov ecx, dword [ebp - 0x12c]
add eax, dword [ecx + 0x14]
mov edx, dword [ebp - 0x12c]
sub eax, dword [edx + 0x1c]
mov dword [ebp - 0x138], eax
jmp 0x40da28
mov eax, dword [ebp - 0x12c]
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp - 0x12c]
lea eax, [edx + ecx + 0x24]
mov ecx, dword [ebp - 0x12c]
sub eax, dword [ecx + 0x1c]
mov dword [ebp - 0x138], eax
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x138]
sub eax, dword [edx + 0x20]
mov dword [ebp - 0x128], eax
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x18]
push edx
push 0
mov eax, dword [ebp - 0x128]
push eax
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, dword [ebp - 0x12c]
mov dword [edx + 0x20], eax
mov eax, dword [0x42f5cc]
and eax, 2
je 0x40dabb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0041528e
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ecx + 0x20]
push edx
push str._did_recvfrom__d__errno___d__s_n
mov eax, dword [0x42f5c8]
push eax
call fcn.00414be4
add esp, 0x14
mov ecx, dword [0x42f5c8]
push ecx
call fcn.00414b88
add esp, 4
mov edx, dword [ebp - 0x12c]
cmp dword [edx + 0x20], 0
jge 0x40db6c
mov byte [ebp - 0x12d], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2751
jne 0x40dae8
mov byte [ebp - 0x12d], 1
jmp 0x40dafc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2743
jne 0x40dafc
mov byte [ebp - 0x12d], 0
mov eax, dword [0x42f5cc]
and eax, 2
je 0x40db30
movzx ecx, byte [ebp - 0x12d]
push ecx
push str._rx_error__tx_icmp_ICMP_UNREACH:_i_n
mov edx, dword [0x42f5c8]
push edx
call fcn.00414be4
add esp, 0xc
mov eax, dword [0x42f5c8]
push eax
call fcn.00414b88
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0041528e
add esp, 4
push eax
push 0
movzx ecx, byte [ebp - 0x12d]
push ecx
push 3
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
call fcn.00404ad0
add esp, 0x14
mov ecx, dword [ebp - 0x12c]
push ecx
call fcn.00406de0
add esp, 4
jmp 0x40dbc8
mov edx, dword [ebp + 8]
cmp dword [edx + 0x2f], 0
je 0x40dbb1
mov eax, dword [ebp + 8]
movzx esi, word [eax + 0x20]
push 0x35
call dword [sym.imp.WS2_32.dll_htons]
movzx ecx, ax
cmp esi, ecx
jne 0x40db9f
mov edx, dword [0x42f398]
add edx, 0x2710
mov eax, dword [ebp + 8]
mov dword [eax + 0x2f], edx
jmp 0x40dbb1
mov ecx, dword [0x42f398]
add ecx, 0x3a980
mov edx, dword [ebp + 8]
mov dword [edx + 0x2f], ecx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x12c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004144d0
add esp, 0xc
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004149ef
mov esp, ebp
pop ebp
ret