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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45ac48
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x46b00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 0xc]
push 0
push 0
push 0xfffffffffffffff1
push dword [edi + 0x58]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [edi + 0x48]
push 0x20
push 0x20
push 0
push dword [ebx + 0x1c]
call eax
mov eax, dword [ebx + 0x20]
mov esi, 1
mov dword [ebp - 0x18], eax
lock xadd dword [0x46bdac], esi
inc esi
mov dword [ebp - 0x40], esi
jne 0x40f617
mov esi, 1
lock xadd dword [0x46bdac], esi
inc esi
mov dword [ebp - 0x40], esi
push eax
push esi
mov ecx, edi
call fcn.0040dd40
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x14], esi
movups xmm0, xmmword [ecx]
movups xmmword [eax + 4], xmm0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [ebp - 0x3c]
lea esi, [edi + 0xd8]
mov dword [ebp - 0x1c], esi
mov dword [ecx + 0x1c], eax
mov dword [ecx + 0x20], eax
mov ecx, esi
call fcn.0040c760
mov dword [ebp - 4], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [edi + 0xf4]
call fcn.0040c1a0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 0xc], ecx
mov dword [ebp - 4], 0xffffffff
mov ecx, esi
call fcn.0040c8c0
mov eax, dword [ebp + 8]
mov esi, dword [ebp - 0x18]
push 4
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 0x700b
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [edi + 0x30]
test ecx, ecx
je 0x40f6b4
cmp dword [edi + 0x34], 0
jbe 0x40f6b4
mov eax, 1
jmp 0x40f6b6
xor eax, eax
push 0
push 0
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x34]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x28]
mov dword [ebp - 0x24], ecx
push eax
push 0x98000004
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
jne 0x40f6eb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, dword [edi]
mov ecx, edi
push esi
push dword [ebp - 0x40]
call dword [eax + 0xe4]
push 0
cmp eax, 2
je 0x40f77e
mov esi, dword [ebp - 0x3c]
push esi
push dword [edi + 0x58]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov eax, dword [edi + 0x18]
lea edx, [ebp - 0x14]
push 0
push ebx
push edx
lea edx, [ebp - 0x18]
mov dword [ebx + 0x18], eax
mov eax, dword [esi + 0x60]
lea ecx, [ebx + 0x18]
push edx
push 1
push ecx
push eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x14], 4
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x40f756
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x40f758
xor eax, eax
xor ecx, ecx
cmp eax, 0x3e5
cmovne ecx, eax
test ecx, ecx
je 0x40f794
cmp ecx, 0x2736
je 0x40f78c
cmp ecx, 0x3e3
je 0x40f78c
push ecx
push 4
push 2
push esi
jmp 0x40f785
push 0
push 0
push dword [ebp - 0x3c]
mov ecx, edi
call fcn.0040dec0
push ebx
mov ecx, edi
call fcn.0040e320
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041150d
mov esp, ebp
pop ebp
ret 8