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

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea esi, [ebp + 0xbd0]
mov byte [ebp + 0xbf8], 0
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebp + 0xbc8]
push esi
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 0xc18]
push eax
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov eax, dword [ebp + 0xbf4]
test eax, eax
jne 0x408f93
mov dword [ebp + 0xbc4], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov ecx, dword [ebp + 0xc14]
mov edx, dword [ebp + 0xc30]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
lea edi, [ebp + 0xbd0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0xbc4]
push edi
mov cx, word [ebp + eax*4 + 0x3f4]
mov word [ebp + 0xc3f], cx
mov edx, dword [ebp + 0xbc4]
mov al, byte [ebp + edx*4 + 0x7dc]
mov byte [ebp + 0xc3e], al
mov ecx, dword [ebp + 0xbc4]
mov esi, dword [ebp + ecx*4 + 0xc]
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dx, word [ebp + 0xbcc]
xor eax, eax
mov ax, word [ebp + 0xc3f]
mov word [ebp + 0xc3c], dx
inc word [ebp + 0xbcc]
mov dword [esp + 0x10], eax
lea ecx, [eax + 5]
mov dword [ebp + 0xc34], 0x82020476
mov word [ebp + 0xc38], 0x8d
mov word [ebp + 0xc3a], cx
xor edx, edx
jmp 0x409040
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
sub eax, edx
test edx, edx
jne 0x40907b
cmp eax, 0xff3
jbe 0x409052
mov eax, 0xff3
mov ecx, eax
lea edi, [ebp + 0xc41]
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp + 0xc34]
mov dword [esp + 0x2c], ecx
lea ecx, [eax + 0xd]
mov dword [esp + 0x28], ecx
jmp 0x409092
cmp eax, 0x1000
jle 0x409087
mov eax, 0x1000
lea ecx, [edx + esi]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
add edx, eax
mov eax, dword [ebp + 0xbf4]
xor esi, esi
xor ebx, ebx
cmp eax, esi
mov dword [esp + 0x14], edx
jle 0x40910e
xor edi, edi
mov edx, dword [ebp + 0xbf0]
cmp dword [edi + edx + 4], 0xffffffff
je 0x4090fe
mov eax, edx
lea esi, [edi + eax]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi]
cmp eax, 0x3a98
jbe 0x4090fe
mov dword [esi + 4], 0xffffffff
mov ecx, dword [ebp + 0xbf4]
dec ecx
cmp ebx, ecx
jne 0x4090fe
lea eax, [ebx - 1]
cmp eax, 0xffffffff
jle 0x4090f7
mov edx, dword [ebp + 0xbf0]
mov ecx, dword [edi + edx + 4]
cmp ecx, 0xffffffff
jne 0x4090f7
dec eax
cmp eax, ecx
jg 0x4090ed
inc eax
mov dword [ebp + 0xbf4], eax
mov eax, dword [ebp + 0xbf4]
inc ebx
add edi, 0x10
cmp ebx, eax
jl 0x4090a8
xor esi, esi
mov eax, dword [ebp + 0xc30]
mov ebx, dword [sym.imp.WS2_32.dll_WSAResetEvent]
lea edi, [ebp + 0xc20]
push eax
mov dword [ebp + 0xc24], esi
mov dword [ebp + 0xc28], esi
mov dword [edi], esi
mov dword [ebp + 0xc2c], esi
call ebx
push esi
push edi
lea eax, [ebp + 0xc04]
push 0x10
push eax
mov eax, dword [ebp + 0xc00]
lea ecx, [esp + 0x30]
push esi
push ecx
lea edx, [esp + 0x40]
push 1
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, esi
je 0x4091bd
cmp eax, 0xffffffff
jne 0x4091bd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
jne 0x4091bd
push esi
push 0x64
lea ecx, [esp + 0x38]
push esi
push ecx
push 2
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov edx, dword [ebp + 0xc30]
mov esi, eax
push edx
call ebx
test esi, esi
je 0x409237
cmp esi, 0xffffffff
je 0x4091bd
mov edx, dword [ebp + 0xc00]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x24]
push 0
push ecx
push edi
push edx
mov dword [esp + 0x30], 0
call dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jne 0x409034
mov ecx, dword [ebp + 0xbc4]
inc ecx
mov eax, ecx
mov dword [ebp + 0xbc4], ecx
cmp eax, 0xfa
jl 0x4091ed
mov dword [ebp + 0xbc4], 0
mov eax, dword [ebp + 0xbc4]
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jge 0x409201
mov edx, ecx
sub edx, eax
jmp 0x40920d
jle 0x40921c
mov edx, ecx
sub edx, eax
add edx, 0xfa
cmp edx, 0x32
jle 0x408fa7
mov dword [ebp + 0xbc4], ecx
mov eax, dword [ebp + 0xbf4]
test eax, eax
jne 0x409237
mov eax, dword [ebp + 8]
mov ecx, dword [0x4237c0]
push 0
push eax
call fcn.004065d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret