Function at 0x586790
Capabilities:
Check for time delay via gettickcount
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x637c30
mov eax, dword fs:[0]
push eax
sub esp, 0x8ac
mov eax, dword [0x717f80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x24]
mov dword [ebp - 0x8b4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x8a0], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x8b8], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x8a4], edi
mov dword [ebp - 0x898], eax
mov ecx, dword [eax + 4]
mov dword [ebp - 0x8a8], ecx
mov ecx, eax
call fcn.004d90e0
mov eax, dword [ebp - 0x8b8]
mov dword [eax], 0
cmp dword [esi + 0x28c], 0xffffffff
jne 0x586824
mov eax, dword [edi]
mov ecx, edi
push str.No_socket_exists_for_sending.
call dword [eax + 0x14]
xor al, al
jmp 0x587125
cmp byte [esi + 0xcc], 0
lea eax, [esi + 0xcc]
je 0x586846
mov eax, dword [edi]
mov ecx, edi
push str.Another_thread_is_already_sending_on_this_socket.
call dword [eax + 0x14]
xor al, al
jmp 0x587125
cmp byte [esi + 0xce], 0
je 0x586863
mov eax, dword [edi]
mov ecx, edi
push dword [0x71590c]
call dword [eax + 0x14]
xor al, al
jmp 0x587125
xorps xmm0, xmm0
lea ecx, [ebp - 0x40]
push eax
movlpd qword [ebp - 0x40], xmm0
call fcn.00476f80
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 4], 0
test eax, eax
jne 0x586890
cmp byte [ebp + 0x18], al
mov ecx, 0x1499700
cmove eax, ecx
mov dword [ebp + 0x1c], eax
mov ecx, dword [ebp - 0x8a0]
test ecx, ecx
jne 0x5868a1
mov ecx, 0x41a0
jmp 0x5868ab
mov eax, 0x400
cmp ecx, eax
cmovb ecx, eax
cmp byte [ebp + 0x14], 0
mov dword [ebp - 0x8a0], ecx
je 0x5868c7
mov eax, 0x41a0
cmp ecx, eax
cmova ecx, eax
mov dword [ebp - 0x8a0], ecx
mov edx, dword [ebp + 0xc]
mov dword [esi + 0x298], 0
test edx, edx
je 0x587116
nop dword [eax]
cmp ecx, edx
mov eax, ecx
cmova eax, edx
xor ecx, ecx
mov dword [ebp - 0x8ac], ecx
mov ecx, dword [ebp - 0x8a8]
mov dword [ebp - 0x8b0], eax
test ecx, ecx
je 0x586919
push edi
call fcn.00518b10
test al, al
jne 0x586fdd
mov eax, dword [ebp - 0x8b0]
mov ecx, dword [ebp - 0x8a8]
push edi
push ecx
push eax
lea ecx, [esi + 0x168]
call fcn.00615cd0
test al, al
jne 0x587104
cmp byte [esi + 0xce], al
jne 0x5870f1
mov eax, dword [ebp - 0x898]
cmp dword [eax + 0x10], 0
je 0x586a6b
cmp dword [eax + 0xc], 1
jne 0x586a6b
mov ecx, eax
call fcn.004d90e0
mov ecx, dword [ebp - 0x898]
push edi
call fcn.004d9240
test al, al
je 0x586987
mov eax, dword [ebp - 0x898]
mov ecx, edi
push str.Wait_for_data_on_socket_aborted_by_app
mov byte [eax + 0x15], 1
mov eax, dword [edi]
call dword [eax + 0x14]
jmp 0x586a6b
cmp dword [esi + 0x28c], 0xffffffff
jne 0x5869ab
mov eax, dword [edi]
mov ecx, edi
push str.Cannot_wait_for_socket_data:_not_connected__invalid_socket_
call dword [eax + 0x14]
mov eax, dword [ebp - 0x898]
mov byte [eax + 0x16], 1
jmp 0x586a6b
lea ecx, [ebp - 0x894]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
call fcn.00476f40
mov dword [ebp - 0x894], 0x696660
mov dword [ebp - 0x88c], 0x3004bc8d
mov dword [ebp - 0x44], 0x3004bc8d
push 0x40
lea eax, [ebp - 0x84]
mov byte [ebp - 4], 1
push 0
push eax
mov dword [ebp - 0x888], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [ebp - 0x88c], 0x3004bc8d
je 0x586a16
push 0
call fcn.00401ab0
add esp, 4
cmp dword [ebp - 0x44], 0x3004bc8d
je 0x586a29
push 0
call fcn.00401ab0
add esp, 4
mov edx, dword [esi + 0x28c]
test edx, edx
jns 0x586b4a
mov eax, dword [ebp - 0x898]
mov byte [eax + 0x16], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x894]
mov dword [ebp - 0x894], 0x696660
mov dword [ebp - 0x88c], 0
mov dword [ebp - 0x44], 0
call fcn.00476fe0
cmp byte [esi + 0x10], 0
je 0x586dc7
mov eax, dword [esi + 0x18]
or eax, dword [esi + 0x1c]
jne 0x586a85
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 0x20], eax
cmp byte [esi + 0x10], 0
je 0x586dc7
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
test ecx, ecx
jl 0x586dc7
jg 0x586cef
cmp eax, 0x10000
jbe 0x586dc7
test ecx, ecx
jg 0x586cef
jl 0x586ac3
cmp eax, 0x40000
ja 0x586cef
cmp dword [esi + 0xbc], 0
jne 0x586cef
cmp byte [esi + 0xc0], 0
je 0x586cef
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0x20]
cmp eax, ecx
jb 0x586ce6
test ecx, ecx
je 0x586ce6
sub eax, ecx
je 0x586b12
push 0
push eax
push dword [esi + 0x1c]
push dword [esi + 0x18]
call fcn.00622a40
cmp eax, 0x800
jbe 0x586dc7
push 1
call fcn.004b2050
add esp, 4
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0x20]
cmp eax, ecx
ja 0x586dc7
sub eax, ecx
je 0x586b12
push 0
push eax
push dword [esi + 0x1c]
push dword [esi + 0x18]
call fcn.00622a40
cmp eax, 0x800
ja 0x586b12
jmp 0x586dc7
mov ecx, dword [ebp - 0x888]
xor eax, eax
test ecx, ecx
je 0x586b64
cmp dword [ebp + eax*4 - 0x884], edx
je 0x586b64
inc eax
cmp eax, ecx
jb 0x586b56
cmp eax, ecx
jne 0x586b7d
cmp ecx, 0x200
jae 0x586b7d
mov dword [ebp + eax*4 - 0x884], edx
inc dword [ebp - 0x888]
lea eax, [ebp - 0x38]
push eax
push 0
push 0
lea eax, [ebp - 0x888]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x586a41
test eax, eax
js 0x586a41
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x894]
mov dword [ebp - 0x894], 0x696660
mov dword [ebp - 0x88c], 0
mov dword [ebp - 0x44], 0
jne 0x586bdb
mov eax, dword [ebp - 0x898]
mov byte [eax + 0x14], 1
jmp 0x586a66
call fcn.00476fe0
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x30]
movq qword [ebp - 0x20], xmm0
movups xmmword [ebp - 0x30], xmm0
call fcn.0049ead0
push dword [ebp - 0x8a0]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.004a2c20
test eax, eax
je 0x586c4c
mov ecx, dword [ebp - 0x8a0]
push edi
push dword [ebp - 0x898]
mov dword [ebp - 0x89c], ecx
lea ecx, [ebp - 0x89c]
push dword [ebp + 0x1c]
push 0
push ecx
push eax
mov ecx, esi
call fcn.00586470
test al, al
je 0x586c6a
push dword [ebp - 0x89c]
lea ecx, [ebp - 0x30]
call fcn.0049f0d0
jmp 0x586c7d
mov eax, dword [edi]
mov ecx, edi
push str.Unable_to_allocate_memory_for_reading_the_socket.
call dword [eax + 0x14]
push dword [ebp - 0x8a0]
mov ecx, edi
push str.bufSize
call fcn.004b2d90
mov ecx, dword [ebp - 0x898]
call fcn.004d9090
test al, al
jne 0x587013
lea ecx, [ebp - 0x30]
call fcn.0046e290
test eax, eax
je 0x586cd5
mov ecx, dword [ebp - 0x898]
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x586cd5
push dword [ebp - 0x8a4]
mov byte [ebp - 0x11], 0
mov edi, dword [eax]
lea eax, [ebp - 0x11]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.0046e290
push eax
lea ecx, [ebp - 0x30]
call fcn.004a2ca0
push eax
mov eax, dword [ebp - 0x898]
mov ecx, dword [eax + 0x10]
call dword [edi + 4]
cmp byte [ebp - 0x11], 0
jne 0x586ff2
mov edi, dword [ebp - 0x8a4]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.0049ecf0
jmp 0x586a6b
mov byte [esi + 0x10], 0
jmp 0x586dc7
mov eax, dword [esi + 0xb0]
or eax, dword [esi + 0xb4]
je 0x586dc7
cmp dword [esi + 0xb8], 0
jne 0x586d15
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 0xb8], eax
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0xb8]
mov dword [ebp - 0x89c], eax
cmp eax, ecx
jae 0x586d32
mov dword [esi + 0xb8], eax
mov ecx, eax
sub eax, ecx
cmp eax, 0x1388
jb 0x586daa
mov eax, dword [esi + 0xb0]
mov edi, eax
mov ecx, dword [esi + 0xb4]
mov edx, ecx
shld edx, edi, 4
push 0
shl edi, 4
sub edi, eax
push 0x3b
sbb edx, ecx
shld edx, edi, 2
push edx
shl edi, 2
push edi
call fcn.00622a40
mov dword [esi + 0xb4], edx
mov ecx, eax
mov eax, dword [ebp - 0x89c]
mov dword [esi + 0xb0], ecx
mov dword [esi + 0xb8], eax
test edx, edx
jg 0x586da4
jl 0x586d90
cmp ecx, 0xa00000
jae 0x586da4
mov dword [esi + 0xb0], 0xa00000
mov dword [esi + 0xb4], 0
mov edi, dword [ebp - 0x8a4]
push edi
push dword [ebp - 0x8a8]
lea ecx, [esi + 0x28]
push dword [ebp - 0x8b0]
call fcn.00615cd0
test al, al
jne 0x587030
push 0
push dword [ebp - 0x8b0]
mov dword [esi + 0x298], 0
push dword [ebp - 0x8b4]
push dword [esi + 0x28c]
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x89c], eax
cmp eax, 0xffffffff
je 0x586dfa
test eax, eax
jns 0x586e1b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 0x8ac], ecx
mov dword [esi + 0x298], ecx
cmp eax, 0xffffffff
je 0x586e29
jmp 0x586e21
mov ecx, dword [ebp - 0x8ac]
test eax, eax
jns 0x586f40
cmp ecx, 0x2733
jne 0x5870b0
cmp byte [ebp + 0x18], 0
jne 0x5870a0
inc dword [esi + 0x334]
cmp byte [esi + 0x10], 0
je 0x586ed6
inc dword [esi + 0xbc]
cmp dword [esi + 0x1c], 0
jl 0x586ed6
jg 0x586e66
cmp dword [esi + 0x18], 0x10000
jb 0x586ed6
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x8ac], eax
cmp eax, ecx
jb 0x586ed2
test ecx, ecx
je 0x586ed2
cmp eax, ecx
jbe 0x586ed6
sub eax, ecx
je 0x586ed6
push 0
push eax
push dword [esi + 0x1c]
push dword [esi + 0x18]
call fcn.00622a40
cmp eax, 0x80
jbe 0x586ed6
imul eax, eax, 0x3cc
xor ecx, ecx
mov dword [esi + 0xb4], ecx
mov dword [esi + 0xb0], eax
cmp eax, 0xa00000
jae 0x586ec4
mov dword [esi + 0xb0], 0xa00000
mov dword [esi + 0xb4], ecx
mov eax, dword [ebp - 0x8ac]
mov dword [esi + 0xb8], eax
jmp 0x586ed6
mov byte [esi + 0x10], 0
push edi
push dword [ebp - 0x898]
mov ecx, esi
push 0
push 0
push dword [ebp + 0x1c]
call fcn.00587b10
test al, al
je 0x587045
mov ecx, dword [edi + 0x124]
test ecx, ecx
je 0x586f38
push 0x2a
call fcn.004b3c00
mov eax, dword [edi + 0x124]
mov dword [eax + 0x410], 0
mov dword [eax + 0x414], 0
mov eax, dword [edi + 0x124]
mov dword [eax + 0x6c8], 0
mov dword [eax + 0x6cc], 0
mov eax, dword [ebp - 0x89c]
test eax, eax
jle 0x586f6c
cmp byte [esi + 0x33a], 0
je 0x586f64
push edi
push dword [ebp - 0x8a8]
lea ecx, [esi + 0x120]
push eax
call fcn.0057dcb0
mov eax, dword [ebp - 0x89c]
mov ecx, dword [ebp - 0x8b8]
add dword [ecx], eax
cmp byte [esi + 0x330], 0
je 0x586f9a
mov ecx, dword [ebp - 0x8a8]
test ecx, ecx
je 0x586f9a
test eax, eax
jle 0x586fbb
push edi
cdq
push edx
push eax
call fcn.00518bd0
test al, al
jne 0x587051
mov eax, dword [ebp - 0x89c]
test eax, eax
jle 0x586fbb
mov edx, dword [ebp + 0xc]
add dword [ebp - 0x8b4], eax
sub edx, eax
cmp byte [esi + 0x10], 0
mov dword [ebp + 0xc], edx
je 0x586fca
cdq
add dword [esi + 0x18], eax
adc dword [esi + 0x1c], edx
jmp 0x586fc7
jne 0x586fc7
push 1
call fcn.004b2050
add esp, 4
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x587116
mov ecx, dword [ebp - 0x8a0]
jmp 0x5868e0
mov eax, dword [edi]
mov ecx, edi
push str.Socket_SendBytes2_aborted_by_application.__1a_
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov ecx, dword [ebp - 0x8a4]
push str.Aborting_the_TLS_send..
mov eax, dword [ecx]
call dword [eax + 0x14]
lea ecx, [ebp - 0x30]
call fcn.0049ecf0
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov eax, dword [edi]
mov ecx, edi
push str.Failed_to_receive_TCP_data_while_sending.
call dword [eax + 0x14]
lea ecx, [ebp - 0x30]
call fcn.0049ecf0
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov eax, dword [edi]
mov ecx, edi
push str.Aborted_by_application_while_upload_throttling__1c_
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov eax, dword [ebp - 0x898]
cmp byte [eax + 0x15], 0
je 0x587066
mov eax, dword [edi]
mov ecx, edi
push str.Socket_send_aborted_by_application
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x58711a
cmp byte [eax + 0x14], 0
mov ecx, edi
je 0x587090
push dword [ebp + 0x1c]
push str.idleTimeoutMs_wf
call fcn.004b2d90
mov eax, dword [edi]
mov ecx, edi
push str.Socket_send_idle_timeout
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov eax, dword [edi]
push str.Socket_send_failed.
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov eax, dword [ebp - 0x898]
mov byte [ebp - 0x11], 0
mov byte [eax + 0x19], 1
jmp 0x58711a
mov eax, dword [edi]
mov ecx, edi
push str.Error_sending_on_socket__1_
call dword [eax + 0x14]
mov ecx, dword [ebp - 0x8ac]
push edi
push dword [ebp - 0x898]
push ecx
call fcn.00585780
add esp, 0xc
mov ecx, edi
push dword [ebp - 0x8b0]
push str.send_size
call fcn.004b2d90
mov ecx, esi
call fcn.00584580
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov eax, dword [edi]
mov ecx, edi
push dword [0x71590c]
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov eax, dword [edi]
mov ecx, edi
push str.Aborted_by_application_while_upload_throttling__1b_
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x58711a
mov byte [ebp - 0x11], 1
lea ecx, [ebp - 0x40]
call fcn.00477080
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00622073
mov esp, ebp
pop ebp
ret 0x24