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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
lea eax, [esp + 0x24]
push ebx
push esi
push edi
push eax
call fcn.00424ac8
mov esi, dword [ebp + 8]
add esp, 4
mov edi, dword [ebp + 0x10]
nop
cmp dword [esi + 0x10], 1
jne 0x413580
mov eax, dword [esi + 0x14]
mov dword [esp + 0x28], eax
test eax, eax
js 0x41347c
cmp dword [0x4ab1b4], 0
je 0x4133c6
push str.tcpio_write_raw:_STREAM_n
call fcn.00414b20
mov eax, dword [esi + 0x14]
add esp, 4
mov dword [esp + 0x28], eax
mov ecx, dword [ebp + 0xc]
xor ebx, ebx
mov dword [esp + 0x24], ecx
cmp dword [ebp + 0x10], ebx
jle 0x413411
push 0
push edi
push ecx
push eax
call sub.WS2_32.dll_send
test eax, eax
jns 0x4133f6
inc ebx
cmp ebx, 0xa
jge 0x41340c
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x24]
jmp 0x413402
mov ecx, dword [esp + 0x24]
sub edi, eax
add ecx, eax
mov dword [esp + 0x24], ecx
test edi, edi
jle 0x413411
mov eax, dword [esp + 0x28]
jmp 0x4133d4
or edi, 0xffffffff
jmp 0x413414
mov edi, dword [ebp + 0x10]
cmp dword [0x4ab1b4], 0
je 0x41342b
push edi
push str.tcpio_write_raw:_n_d_bytes_n
call fcn.00414b20
add esp, 8
test edi, edi
jns 0x41357d
cmp dword [esi + 0x10], 1
jne 0x413463
cmp dword [0x4ab1b4], 0
je 0x413454
push 0x471014
push str._s___socket_disconnected._n
call fcn.00414b20
add esp, 8
push dword [esi + 0x14]
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x14], 0xffffffff
cmp dword [0x4ab1b4], 0
je 0x413479
push str.tcpio_write_raw:_socket_write_failure___disconnect___executed._n
call fcn.00414b20
add esp, 4
mov edi, dword [ebp + 0x10]
push esi
call fcn.00412fe0
add esp, 4
test eax, eax
jns 0x41353e
nop dword [eax]
cmp dword [0x4ab1b4], 0
je 0x4134a6
push str.spx_tcpio_write_data:_socket_connect_failed___retrying_n
call fcn.00414b20
add esp, 4
cmp dword [esi + 0xc], 0
je 0x4135c5
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x38]
push eax
call fcn.00424ac8
push dword [esp + 0x38]
push dword [esp + 0x38]
push dword [esp + 0x48]
push dword [esp + 0x48]
call fcn.004249fd
add esp, 0x14
cmp dword [0x4ab1b4], 0
fstp qword [esp + 0x28]
je 0x413514
movd xmm0, dword [esi + 0xc]
sub esp, 0x10
cvtdq2pd xmm0, xmm0
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x38]
movsd qword [esp], xmm0
push str.network_wait___elapsed_time___g_seconds__timeout____g_seconds_n
call fcn.00414b20
add esp, 0x14
movd xmm0, dword [esi + 0xc]
movsd xmm1, qword [esp + 0x28]
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
ja 0x4135c5
push esi
call fcn.00412fe0
add esp, 4
test eax, eax
js 0x413490
mov ecx, dword [esi + 0x130]
mov eax, dword [esi + 0x134]
add ecx, 1
mov dword [esi + 0x130], ecx
adc eax, 0
cmp dword [0x4ab1b4], 0
mov dword [esi + 0x134], eax
je 0x413390
push eax
push ecx
push str.spx_tcpio_write_data:_connected__num_connects_lld_n
call fcn.00414b20
add esp, 0xc
jmp 0x413390
mov edi, dword [ebp + 0x10]
add dword [esi + 0x138], 1
mov eax, edi
cdq
adc dword [esi + 0x13c], 0
add dword [esi + 0x140], eax
adc dword [esi + 0x144], edx
test edi, edi
js 0x41347c
cmp dword [0x4ab1b4], 0
je 0x4135bc
push edi
push str.spx_tcpio_write_data:_success___d_bytes_sent_n
call fcn.00401120
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret