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

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
lea edi, [esi + 0xbd0]
mov dword [esi + 0xbf4], ebx
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebp, dword [esi + 0xbc8]
push edi
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x43c8]
push eax
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
cmp dword [esi + 0x43c0], ebx
jne 0x40a7cd
mov dword [esi + 0xbc4], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
cmp edx, 0x32
jg 0x40aa3e
xor ebx, ebx
lea edi, [esi + 0xbd0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xbc4]
push edi
mov cx, word [esi + eax*4 + 0x3f4]
mov word [esi + 0x43db], cx
mov dl, byte [esi + eax*4 + 0x7dc]
mov byte [esi + 0x43da], dl
mov eax, dword [esi + eax*4 + 0xc]
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ax, word [esi + 0xbcc]
mov cx, word [esi + 0x43db]
mov word [esi + 0x43d8], ax
inc eax
mov word [esi + 0xbcc], ax
add cx, 5
lea eax, [esi + 0x43d0]
mov word [esi + 0x43d6], cx
mov dword [esp + 0x24], 0xd
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [esi + 0x43c0]
mov dword [esp + 0x14], eax
dec edi
cmp edi, 0xffffffff
jle 0x40a927
lea edx, [edi*8]
sub edx, edi
lea ebp, [esi + edx*8 + 0xc10]
cmp dword [ebp - 0x14], ebx
jne 0x40a88f
mov eax, dword [esi + 0x43c0]
dec eax
cmp edi, eax
jne 0x40a90c
mov dword [esi + 0x43c0], eax
jmp 0x40a90c
mov eax, dword [esp + 0x14]
mov edx, dword [ebp - 8]
sub eax, edx
cmp eax, 0x3a98
jbe 0x40a8a4
mov dword [ebp - 0x14], ebx
jmp 0x40a90c
cmp dword [ebp], ebx
je 0x40a8b6
mov al, byte [esi + 0x43da]
test al, al
jne 0x40a90c
mov dword [ebp], ebx
lea eax, [ebp + 0xc]
xor ecx, ecx
mov edx, eax
push ebx
push eax
lea eax, [ebp - 0x18]
mov dword [edx], ecx
push 0x10
push eax
push ebx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov dword [edx + 0x10], ecx
mov eax, dword [esi + 0xbec]
lea ecx, [esp + 0x30]
lea edx, [esp + 0x38]
push ecx
push 1
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, ebx
je 0x40a90c
cmp eax, 0xffffffff
jne 0x40a90c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40a908
mov dword [ebp - 0x14], ebx
jmp 0x40a90c
inc dword [esp + 0x10]
dec edi
sub ebp, 0x38
cmp edi, 0xffffffff
jg 0x40a873
cmp dword [esp + 0x10], ebx
jle 0x40a927
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0x10], ebx
xor eax, eax
mov ax, word [esi + 0x43db]
sub eax, ebx
cmp eax, 0x1000
mov dword [esp + 0x24], eax
jbe 0x40a94a
mov eax, 0x1000
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x18]
xor ebp, ebp
lea edx, [ebx + ecx]
add ebx, eax
mov eax, dword [esi + 0x43c0]
mov dword [esp + 0x28], edx
test eax, eax
jle 0x40a9d5
lea edi, [esi + 0xc1c]
mov eax, dword [edi - 0x20]
test eax, eax
je 0x40a9c7
mov ecx, edi
xor eax, eax
lea edx, [edi - 0x24]
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
push eax
push edi
push 0x10
push edx
mov dword [ecx + 0x10], eax
mov edx, dword [esi + 0xbec]
push eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x3c]
push 1
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSASendTo]
test eax, eax
je 0x40a9c7
cmp eax, 0xffffffff
jne 0x40a9c7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40a9c3
mov dword [edi - 0x20], 0
jmp 0x40a9c7
inc dword [esp + 0x10]
mov eax, dword [esi + 0x43c0]
inc ebp
add edi, 0x38
cmp ebp, eax
jl 0x40a969
xor eax, eax
mov ax, word [esi + 0x43db]
cmp ebx, eax
jl 0x40a92b
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x40a9f6
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi + 0xbc4]
inc ecx
mov eax, ecx
mov dword [esi + 0xbc4], ecx
cmp eax, 0xfa
jl 0x40aa16
mov dword [esi + 0xbc4], 0
mov eax, dword [esi + 0xbc4]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jge 0x40aa2d
mov edx, ecx
sub edx, eax
jmp 0x40a7c2
jle 0x40aa44
mov edx, ecx
sub edx, eax
add edx, 0xfa
jmp 0x40a7c2
mov dword [esi + 0xbc4], ecx
mov eax, dword [esi + 0x43c0]
test eax, eax
jne 0x40aa5f
mov eax, dword [esi + 8]
mov ecx, dword [0x4237c0]
push 0
push eax
call fcn.004065d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret