Function at 0x40acd0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x4a2300]
xor eax, esp
mov dword [esp + 0x130], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov esi, edx
mov dword [esp + 0x30], eax
push edi
test ebx, ebx
je 0x40af2b
test esi, esi
je 0x40af2b
cmp esi, 0x5a0
ja 0x40af2b
call fcn.0040ee00
mov ecx, edx
mov dword [esp + 0x24], eax
or eax, ecx
mov dword [esp + 0x20], ecx
je 0x40af2b
xor edi, edi
xorps xmm0, xmm0
mov dword [esp + 0x10], edi
movq qword [esp + 0x14], xmm0
mov dword [esp + 0x1c], edi
cmp dword [0x6afdb0], edi
jbe 0x40ad84
push 0xec
lea eax, [esp + 0x40]
push edi
push eax
call fcn.00451650
mov eax, dword [0x6afdb0]
lea edx, [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x38]
call fcn.0040a8a0
mov edi, dword [esp + 0x10]
neg eax
sbb eax, eax
and dword [0x6afdb0], eax
cmp dword [esp + 0x14], 0
jne 0x40adad
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x10]
call fcn.0040a8a0
test eax, eax
je 0x40af2b
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov dword [0x6afdb0], eax
push dword [esp + 0x1c]
mov edx, esi
mov ecx, ebx
push dword [esp + 0x1c]
call fcn.0040f310
add esp, 8
test eax, eax
je 0x40af2b
push 0
push esi
push ebx
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp dword [esp + 0xc], 0
je 0x40ae39
cmp dword [ebp + 0xc], 0
jbe 0x40ae39
xorps xmm0, xmm0
movdqu xmmword [esp + 0x12c], xmm0
call fcn.0040ee00
sub eax, dword [esp + 0x24]
sbb edx, dword [esp + 0x20]
test edx, edx
jg 0x40ae39
jl 0x40ae07
cmp eax, 0xbb8
ja 0x40ae39
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ecx]
push 2
push 4
lea eax, [esp + 0x134]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x40ae39
cmp eax, 0xffffffff
jne 0x40ae5d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40aeb5
xor ebx, ebx
test edi, edi
je 0x40ae46
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0045094b
mov esp, ebp
pop ebp
ret
cmp eax, 4
jne 0x40ae39
push dword [esp + 0x1c]
mov edx, eax
lea ecx, [esp + 0x130]
push dword [esp + 0x1c]
call fcn.0040f4c0
add esp, 8
test eax, eax
je 0x40ae39
mov esi, dword [esp + 0x12c]
cmp esi, 0x11
jb 0x40ae39
cmp esi, dword [ebp + 0xc]
ja 0x40ae39
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
push eax
push 0x4004667f
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x40ae39
mov eax, dword [esp + 0x34]
cmp eax, esi
jae 0x40aee6
push 1
call ebx
call fcn.0040ee00
sub eax, dword [esp + 0x24]
sbb edx, dword [esp + 0x20]
mov dword [esp + 0x2c], edx
js 0x40ae10
jg 0x40ae39
cmp eax, 0xbb8
jbe 0x40ae10
jmp 0x40ae39
jne 0x40ae39
push 0
push esi
push dword [esp + 0x14]
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
cmp ebx, esi
jne 0x40ae3b
push dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov edx, ebx
push dword [esp + 0x1c]
mov ecx, esi
call fcn.0040f4c0
add esp, 8
test eax, eax
je 0x40ae3b
mov dword [esi], ebx
jmp 0x40ae3b
mov ecx, dword [esp + 0x13c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045094b
mov esp, ebp
pop ebp
ret