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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x439d6b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x120
push ebx
push esi
push edi
mov esi, ecx
lea edi, [esi + 0xa8]
push edi
mov dword [esp + 0x18], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [ebp + 0xc]
xor ecx, ecx
cmp ebx, ecx
mov dword [esp + 0x134], ecx
mov dword [esp + 0x10], ecx
je 0x4122a6
lea edi, [esi + 0xfc]
jmp 0x4121a0
mov edx, dword [ebp + 8]
mov dword [esi + 0x108], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x1c], ecx
mov dword [esi + 0x104], ebx
xor edx, edx
lea eax, [esi + 0x104]
lea ecx, [esi + 0xe8]
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x10], edx
mov ecx, dword [edi]
push edx
mov dword [esi + 0xf8], ecx
lea ecx, [esi + 0xe8]
push ecx
push edx
lea edx, [esp + 0x18]
push edx
push 1
push eax
mov eax, dword [esi + 0x7c]
push eax
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x41226f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
mov dword [esp + 0x18], eax
jne 0x4122e5
mov ecx, dword [esi + 0x74]
push 0
push ecx
push 0
push edi
push 2
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0x102
je 0x412331
cmp eax, 0xffffffff
je 0x41237d
cmp eax, 1
je 0x4123cd
mov ecx, dword [esi + 0x7c]
lea edx, [esp + 0x1c]
push edx
push 1
lea eax, [esp + 0x14]
push eax
lea eax, [esi + 0xe8]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
je 0x412419
mov eax, dword [esp + 0xc]
test eax, eax
je 0x412469
mov edx, dword [edi]
push edx
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov eax, dword [esp + 0xc]
push eax
push 0
mov ecx, esi
call fcn.00412960
mov eax, dword [esp + 0xc]
add dword [esp + 0x10], eax
mov ecx, dword [ebp + 8]
add ecx, eax
sub ebx, eax
mov dword [ebp + 8], ecx
xor ecx, ecx
test ebx, ebx
jne 0x4121a0
mov edi, dword [esp + 0x14]
mov ebx, dword [esi + 0x2c]
cmp ebx, ecx
jbe 0x4122c7
cmp dword [esi + 0x1c], ebx
jbe 0x4122c7
mov eax, dword [esp + 0x10]
imul eax, eax, 0x3e8
xor edx, edx
div ebx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x7f
lea ecx, [esp + 0x24]
push str.Send_data_error
push ecx
call dword [sym.imp.MSVCR71.dll_strncpy]
mov edx, dword [esp + 0x24]
add esp, 0xc
push 0x447350
lea eax, [esp + 0xa8]
mov byte [esp + 0xa3], 0
mov dword [esp + 0xa4], edx
mov ecx, 0x21
lea esi, [esp + 0x24]
lea edi, [esp + 0xa8]
push eax
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR71.dll__CxxThrowException
push 0x7f
lea ecx, [esp + 0x24]
push str.Send_data_timeout
push ecx
call dword [sym.imp.MSVCR71.dll_strncpy]
add esp, 0xc
push 0x4485b4
lea edx, [esp + 0xa8]
mov byte [esp + 0xa3], 0
mov dword [esp + 0xa4], 0x102
mov ecx, 0x21
lea esi, [esp + 0x24]
lea edi, [esp + 0xa8]
push edx
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR71.dll__CxxThrowException
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x7f
mov esi, eax
lea eax, [esp + 0x24]
push str.WSA_WAIT_FAILED
push eax
call dword [sym.imp.MSVCR71.dll_strncpy]
mov dword [esp + 0xac], esi
add esp, 0xc
mov byte [esp + 0x9f], 0
mov ecx, 0x21
lea esi, [esp + 0x20]
lea edi, [esp + 0xa4]
rep movsd dword es:[edi], dword [esi]
push 0x447350
lea ecx, [esp + 0xa8]
push ecx
call sub.MSVCR71.dll__CxxThrowException
push 0x7f
lea edx, [esp + 0x24]
push str.Socket_is_close
push edx
call dword [sym.imp.MSVCR71.dll_strncpy]
add esp, 0xc
push 0x447350
lea eax, [esp + 0xa8]
mov byte [esp + 0xa3], 0
mov dword [esp + 0xa4], 1
mov ecx, 0x21
lea esi, [esp + 0x24]
lea edi, [esp + 0xa8]
push eax
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR71.dll__CxxThrowException
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x7f
lea ecx, [esp + 0x24]
push str.WSAGetOverlappedResult_failed
push ecx
mov esi, eax
call dword [sym.imp.MSVCR71.dll_strncpy]
add esp, 0xc
mov dword [esp + 0xa0], esi
push 0x447350
lea edx, [esp + 0xa8]
mov byte [esp + 0xa3], 0
mov ecx, 0x21
lea esi, [esp + 0x24]
lea edi, [esp + 0xa8]
push edx
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR71.dll__CxxThrowException
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x7f
mov esi, eax
lea eax, [esp + 0x24]
push str.Remote_peer_close_socket
push eax
call dword [sym.imp.MSVCR71.dll_strncpy]
mov dword [esp + 0xac], esi
add esp, 0xc
mov byte [esp + 0x9f], 0
mov ecx, 0x21
lea esi, [esp + 0x20]
lea edi, [esp + 0xa4]
rep movsd dword es:[edi], dword [esi]
push 0x447350
lea ecx, [esp + 0xa8]
push ecx
call sub.MSVCR71.dll__CxxThrowException
int3