Function at 0x401220
Capabilities:
Print debug messages
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45aa85
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x50]
cmp dword [eax + 8], 0
jne 0x40124e
xor al, al
jmp 0x4014bd
mov ecx, dword [ebp - 0x50]
cmp dword [ecx + 0x10], 0
jne 0x40125e
xor al, al
jmp 0x4014bd
mov dword [ebp - 0x1c], 0
push 0x14
push 0
lea edx, [ebp - 0x3c]
push edx
call sub.MSVCR71.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 4]
jbe 0x401294
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x54], edx
jmp 0x40129a
mov eax, dword [ebp + 8]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x24], ecx
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x4012be
mov ecx, dword [ebp - 0x50]
call fcn.004014d0
xor al, al
jmp 0x4014bd
mov edx, 1
test edx, edx
je 0x4014ab
mov dword [ebp - 0x14], 0
push 0
lea eax, [ebp - 0x3c]
push eax
push 0
lea ecx, [ebp - 0x18]
push ecx
push 1
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_WSASend]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x401329
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x401320
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x50]
call fcn.004014d0
xor al, al
jmp 0x4014bd
mov dword [ebp - 0x14], 1
jmp 0x401330
mov dword [ebp - 0x14], 1
cmp dword [ebp - 0x14], 0
je 0x4014a6
push 0
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0xc]
imul ecx, ecx, 0x3e8
push ecx
push 0
lea edx, [ebp - 0x2c]
push edx
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x401369
cmp dword [ebp - 0x10], 0x102
jne 0x401382
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x50]
call fcn.004014d0
xor al, al
jmp 0x4014bd
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
lea edx, [ebp - 0x28]
push edx
push 0
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
jne 0x4013c4
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x50]
call fcn.004014d0
xor al, al
jmp 0x4014bd
cmp dword [ebp - 0x18], 0
ja 0x40142e
lea ecx, [ebp - 0x44]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_3]
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x18]
push edx
push str.dwSend__u_n
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
add esp, 0xc
lea ecx, [ebp - 0x44]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::GetBuffer_1]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x50]
call fcn.004014d0
mov byte [ebp - 0x49], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov al, byte [ebp - 0x49]
jmp 0x4014bd
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x18]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], 0
jbe 0x40144f
cmp dword [ebp - 0x24], 0x7fffffff
jbe 0x40149d
cmp dword [ebp - 0x24], 0
je 0x40149b
lea ecx, [ebp - 0x48]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_3]
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x24]
push ecx
push str.wsabuf.len__u_n
lea edx, [ebp - 0x48]
push edx
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Format]
add esp, 0xc
lea ecx, [ebp - 0x48]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::GetBuffer_1]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
jmp 0x4014ab
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
jmp 0x4012be
cmp dword [ebp - 0x2c], 0
je 0x4014bb
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4