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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x12c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], 0x10
cmp byte [edi + 0x26], 1
je 0x4077b3
call fcn.004093d0
test eax, eax
mov esi, eax
je 0x40779c
mov edx, dword [eax + 0x1c]
mov eax, dword [0x4134e0]
add edx, eax
test byte [esi + 0x10], 1
mov dword [esi + 0x1c], edx
je 0x4077a4
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x24]
add eax, ebx
sub eax, edx
mov ebx, eax
mov eax, dword [esi + 0x20]
sub esp, 4
sub ebx, eax
lea eax, [ebp - 0x14]
push eax
push 0x4004667f
mov eax, dword [edi + 8]
push eax
call sub.WS2_32.DLL_ioctlsocket
mov edx, dword [ebp - 0x14]
cmp ebx, edx
pop eax
jb 0x407868
sub esp, 8
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x24]
push eax
push 0
push ebx
mov eax, dword [esi + 0x1c]
push eax
mov ebx, dword [edi + 8]
push ebx
call sub.WS2_32.DLL_recvfrom
mov dword [esi + 0x20], eax
test eax, eax
pop edx
pop ecx
js 0x4078de
mov eax, dword [edi + 0x30]
test eax, eax
jne 0x4078a8
sub esp, 4
lea eax, [ebp - 0x24]
push eax
push esi
push edi
call fcn.00406050
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esi + 0x14]
lea eax, [esi + 0x24]
add eax, ecx
sub eax, edx
jmp 0x407730
sub esp, 8
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x24]
push eax
push 0
push 0x100
lea eax, [ebp - 0x124]
push eax
mov ebx, dword [edi + 8]
push ebx
call sub.WS2_32.DLL_recvfrom
pop edx
cmp eax, 0xffffffff
pop ecx
je 0x40780c
inc eax
cmp eax, 1
jbe 0x407820
mov eax, dword [edi + 0xc]
sub esp, 0xc
push eax
call fcn.00406c50
add esp, 0x10
mov dword [edi + 0xc], 0
sub esp, 0xc
push edi
call fcn.00405d30
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.WS2_32.DLL_WSAGetLastError
cmp eax, 0x2746
je 0x4077e2
nop
lea esi, [esi]
call sub.WS2_32.DLL_WSAGetLastError
mov ebx, 1
cmp eax, 0x2751
nop
je 0x407844
call sub.WS2_32.DLL_WSAGetLastError
xor ebx, ebx
cmp eax, 0x2743
setne bl
lea ebx, [ebx + ebx*2]
call sub.WS2_32.DLL_WSAGetLastError
sub esp, 0xc
push eax
call sub.msvcrt.dll_strerror
mov dword [esp], eax
push 0
push ebx
push 3
mov eax, dword [edi + 0xc]
push eax
call fcn.00406d30
add esp, 0x20
jmp 0x4077f8
mov eax, dword [esi + 0x1c]
lea ebx, [esi + 0x24]
sub esp, 8
mov ecx, dword [esi + 0x20]
sub eax, ebx
add eax, ecx
lea eax, [edx + eax + 1]
mov dword [ebp - 0x14], eax
push eax
push esi
call fcn.00409230
add esp, 0x10
test byte [esi + 0x10], 1
je 0x4078d0
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 0x24]
mov ebx, dword [esi + 0x1c]
add eax, edx
sub eax, ebx
mov ebx, eax
mov eax, dword [esi + 0x20]
sub ebx, eax
jmp 0x407758
sub esp, 0xc
movzx ebx, word [edi + 0x20]
push 0x35
call sub.WS2_32.DLL_htons
add esp, 0xc
cmp ax, bx
je 0x407931
mov eax, dword [0x413580]
add eax, 0x3a980
mov dword [edi + 0x30], eax
jmp 0x40778b
mov ecx, dword [esi + 0x14]
mov eax, ebx
mov edx, dword [esi + 0x1c]
add eax, ecx
sub eax, edx
jmp 0x40789c
call sub.WS2_32.DLL_WSAGetLastError
mov ebx, 1
cmp eax, 0x2751
je 0x407901
call sub.WS2_32.DLL_WSAGetLastError
xor ebx, ebx
cmp eax, 0x2743
setne bl
lea ebx, [ebx + ebx*2]
call sub.WS2_32.DLL_WSAGetLastError
sub esp, 0xc
push eax
call sub.msvcrt.dll_strerror
mov dword [esp], eax
push 0
push ebx
push 3
mov eax, dword [edi + 0xc]
push eax
call fcn.00406d30
add esp, 0x14
push esi
call fcn.004092c0
add esp, 0x10
jmp 0x40779c
mov eax, dword [0x413580]
add eax, 0x2710
mov dword [edi + 0x30], eax
jmp 0x40778b