Function at 0x40c2d0
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 [0x4a4300]
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 0x40c52b
test esi, esi
je 0x40c52b
cmp esi, 0x5a0
ja 0x40c52b
call fcn.0040fd80
mov ecx, edx
mov dword [esp + 0x24], eax
or eax, ecx
mov dword [esp + 0x20], ecx
je 0x40c52b
xor edi, edi
xorps xmm0, xmm0
mov dword [esp + 0x10], edi
movq qword [esp + 0x14], xmm0
mov dword [esp + 0x1c], edi
cmp dword [0x6b067c], edi
jbe 0x40c384
push 0xec
lea eax, [esp + 0x40]
push edi
push eax
call fcn.004523e0
mov eax, dword [0x6b067c]
lea edx, [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x38]
call fcn.0040bea0
mov edi, dword [esp + 0x10]
neg eax
sbb eax, eax
and dword [0x6b067c], eax
cmp dword [esp + 0x14], 0
jne 0x40c3ad
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x10]
call fcn.0040bea0
test eax, eax
je 0x40c52b
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov dword [0x6b067c], eax
push dword [esp + 0x1c]
mov edx, esi
mov ecx, ebx
push dword [esp + 0x1c]
call fcn.004100a0
add esp, 8
test eax, eax
je 0x40c52b
push 0
push esi
push ebx
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp dword [esp + 0xc], 0
je 0x40c439
cmp dword [ebp + 0xc], 0
jbe 0x40c439
xorps xmm0, xmm0
movdqu xmmword [esp + 0x12c], xmm0
call fcn.0040fd80
sub eax, dword [esp + 0x24]
sbb edx, dword [esp + 0x20]
test edx, edx
jg 0x40c439
jl 0x40c407
cmp eax, 0xbb8
ja 0x40c439
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 0x40c439
cmp eax, 0xffffffff
jne 0x40c45d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40c4b5
xor ebx, ebx
test edi, edi
je 0x40c446
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.004516e1
mov esp, ebp
pop ebp
ret
cmp eax, 4
jne 0x40c439
push dword [esp + 0x1c]
mov edx, eax
lea ecx, [esp + 0x130]
push dword [esp + 0x1c]
call fcn.00410250
add esp, 8
test eax, eax
je 0x40c439
mov esi, dword [esp + 0x12c]
cmp esi, 0x11
jb 0x40c439
cmp esi, dword [ebp + 0xc]
ja 0x40c439
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 0x40c439
mov eax, dword [esp + 0x34]
cmp eax, esi
jae 0x40c4e6
push 1
call ebx
call fcn.0040fd80
sub eax, dword [esp + 0x24]
sbb edx, dword [esp + 0x20]
mov dword [esp + 0x2c], edx
js 0x40c410
jg 0x40c439
cmp eax, 0xbb8
jbe 0x40c410
jmp 0x40c439
jne 0x40c439
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 0x40c43b
push dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov edx, ebx
push dword [esp + 0x1c]
mov ecx, esi
call fcn.00410250
add esp, 8
test eax, eax
je 0x40c43b
mov dword [esi], ebx
jmp 0x40c43b
mov ecx, dword [esp + 0x13c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004516e1
mov esp, ebp
pop ebp
ret