Function at 0x402640
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], 0
mov byte [ebp - 0x11], 0
mov dword [ebp - 0xc], 4
push 0x41c248
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 8], 0
jge 0x402672
mov dword [ebp - 0x20], 0
jmp 0x402685
mov eax, dword [0x42a4a8]
sub eax, 1
xor ecx, ecx
cmp dword [ebp + 8], eax
setle cl
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
jne 0x4026c6
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 2]
push eax
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 1]
push edx
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push str.error_L2_:_Index__d___x__x__x
call dword [0x41c2a0]
add esp, 0x14
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4029d1
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 8]
imul ecx, ecx, 0x28
movzx edx, byte [ecx + 0x41ccec]
test edx, edx
jne 0x4026ef
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4029d1
mov eax, dword [ebp + 8]
imul eax, eax, 0x28
mov ecx, dword [eax + 0x41ccd4]
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 0x10], 0x1770
jbe 0x402741
push 0x249
push str.IOCP.cpp
mov edx, dword [ebp + 0x10]
push edx
push str.Error_:_Max_msg__d___s__d
call dword [0x41c2a0]
add esp, 0x10
mov eax, dword [ebp + 8]
push eax
call fcn.00402db0
add esp, 4
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4029d1
mov ecx, dword [ebp - 0x10]
add ecx, 0x2f18
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp dword [edx + 0x2f0c], 0
jle 0x402817
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2efc]
add ecx, dword [ebp + 0x10]
cmp ecx, 0x176f
jbe 0x4027c9
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2efc]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2f00]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.__d_error_L2_MAX_BUFFER_OVER__d__d__d
call dword [0x41c2a0]
add esp, 0x14
mov edx, dword [ebp - 4]
mov dword [edx + 0x2f0c], 0
mov eax, dword [ebp + 8]
push eax
call fcn.00402db0
add esp, 4
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x4029d1
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2efc]
mov edx, dword [ebp - 4]
lea eax, [edx + ecx + 0x178c]
push eax
call fcn.00406270
add esp, 0xc
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x2efc]
add edx, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
mov dword [eax + 0x2efc], edx
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x4029d1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x2f00], 0
mov edx, dword [ebp - 4]
cmp dword [edx + 0x2efc], 0
jle 0x402872
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2efc]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x178c
push edx
mov eax, dword [ebp - 4]
add eax, 0x1c
push eax
call fcn.00406270
add esp, 0xc
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2efc]
mov dword [ecx + 0x2f00], eax
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x2efc], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2f00]
add eax, dword [ebp + 0x10]
cmp eax, 0x176f
jbe 0x4028d0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x2f00]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.__d_error_L2_MAX_BUFFER_OVER__d__d
call dword [0x41c2a0]
add esp, 0x10
mov edx, dword [ebp - 4]
mov dword [edx + 0x2f0c], 0
mov eax, dword [ebp + 8]
push eax
call fcn.00402db0
add esp, 4
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4029d1
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2f00]
mov edx, dword [ebp - 4]
lea eax, [edx + ecx + 0x1c]
push eax
call fcn.00406270
add esp, 0xc
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x2f00]
add edx, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
mov dword [eax + 0x2f00], edx
mov ecx, dword [ebp - 4]
add ecx, 0x1c
mov edx, dword [ebp - 4]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x2f00]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 4]
mov dword [eax + 0x2f04], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x2f08], 1
push 0
mov edx, dword [ebp - 4]
push edx
push 0
lea eax, [ebp - 0x1c]
push eax
push 1
mov ecx, dword [ebp - 4]
add ecx, 0x14
push ecx
mov edx, dword [ebp + 8]
imul edx, edx, 0x28
mov eax, dword [edx + 0x41ccd8]
push eax
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x40299f
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40299d
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x2f0c], 0
mov edx, dword [ebp + 8]
push edx
call fcn.00402db0
add esp, 4
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4029d1
jmp 0x4029b4
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x5e28]
add ecx, 1
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x5e28], ecx
mov eax, dword [ebp - 4]
mov dword [eax + 0x2f0c], 1
push 0x41c248
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov esp, ebp
pop ebp
ret