Function at 0x500270
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 0x5c1de0
mov eax, dword fs:[0]
push eax
sub esp, 0x8ac
mov eax, dword [0x68cc00]
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.0046d450
mov eax, dword [ebp - 0x8b8]
mov dword [eax], 0
cmp dword [esi + 0x294], 0xffffffff
jne 0x500304
mov eax, dword [edi]
mov ecx, edi
push str.No_socket_exists_for_sending.
call dword [eax + 0x14]
xor al, al
jmp 0x500bff
cmp byte [esi + 0xd4], 0
lea eax, [esi + 0xd4]
je 0x500326
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 0x500bff
cmp byte [esi + 0xd6], 0
je 0x500343
mov eax, dword [edi]
mov ecx, edi
push dword [0x68a5c4]
call dword [eax + 0x14]
xor al, al
jmp 0x500bff
xorps xmm0, xmm0
lea ecx, [ebp - 0x40]
push eax
movlpd qword [ebp - 0x40], xmm0
call fcn.0042a060
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 4], 0
test eax, eax
jne 0x500370
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 0x500381
mov ecx, 0x41a0
jmp 0x50038b
mov eax, 0x400
cmp ecx, eax
cmovb ecx, eax
cmp byte [ebp + 0x14], 0
mov dword [ebp - 0x8a0], ecx
je 0x5003a7
mov eax, 0x41a0
cmp ecx, eax
cmova ecx, eax
mov dword [ebp - 0x8a0], ecx
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x2a0], 0
test eax, eax
je 0x500bf0
nop dword [eax]
cmp ecx, dword [ebp + 0xc]
cmovbe eax, ecx
xor ecx, ecx
mov dword [ebp - 0x8ac], ecx
mov ecx, dword [ebp - 0x8a8]
mov dword [ebp - 0x8b0], eax
test ecx, ecx
je 0x5003f8
push edi
call fcn.004a80f0
test al, al
jne 0x500ab7
mov eax, dword [ebp - 0x8b0]
mov ecx, dword [ebp - 0x8a8]
push edi
push ecx
push eax
lea ecx, [esi + 0x170]
call fcn.0059f1c0
test al, al
jne 0x500bde
cmp byte [esi + 0xd6], al
jne 0x500bcb
mov eax, dword [ebp - 0x898]
cmp dword [eax + 0x10], 0
je 0x50054a
cmp dword [eax + 0xc], 1
jne 0x50054a
mov ecx, eax
call fcn.0046d450
mov ecx, dword [ebp - 0x898]
push edi
call fcn.0046d5b0
test al, al
je 0x500466
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 0x50054a
cmp dword [esi + 0x294], 0xffffffff
jne 0x50048a
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 0x50054a
lea ecx, [ebp - 0x894]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
call fcn.0042a020
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
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 0x5004f5
push 0
call fcn.004014f0
add esp, 4
cmp dword [ebp - 0x44], 0x3004bc8d
je 0x500508
push 0
call fcn.004014f0
add esp, 4
mov edx, dword [esi + 0x294]
test edx, edx
jns 0x500629
mov eax, dword [ebp - 0x898]
mov byte [eax + 0x16], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x894]
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x88c], 0
mov dword [ebp - 0x44], 0
call fcn.0042a0c0
cmp byte [esi + 0x18], 0
je 0x5008a6
mov eax, dword [esi + 0x20]
or eax, dword [esi + 0x24]
jne 0x500564
call sub.KERNEL32.DLL_GetTickCount
mov dword [esi + 0x28], eax
cmp byte [esi + 0x18], 0
je 0x5008a6
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
test ecx, ecx
jl 0x5008a6
jg 0x5007ce
cmp eax, 0x10000
jbe 0x5008a6
test ecx, ecx
jg 0x5007ce
jl 0x5005a2
cmp eax, 0x40000
ja 0x5007ce
cmp dword [esi + 0xc4], 0
jne 0x5007ce
cmp byte [esi + 0xc8], 0
je 0x5007ce
call sub.KERNEL32.DLL_GetTickCount
mov ecx, dword [esi + 0x28]
cmp eax, ecx
jb 0x5007c5
test ecx, ecx
je 0x5007c5
sub eax, ecx
je 0x5005f1
push 0
push eax
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.005af920
cmp eax, 0x800
jbe 0x5008a6
push 1
call fcn.00447b80
add esp, 4
call sub.KERNEL32.DLL_GetTickCount
mov ecx, dword [esi + 0x28]
cmp eax, ecx
ja 0x5008a6
sub eax, ecx
je 0x5005f1
push 0
push eax
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.005af920
cmp eax, 0x800
ja 0x5005f1
jmp 0x5008a6
mov ecx, dword [ebp - 0x888]
xor eax, eax
test ecx, ecx
je 0x500643
cmp dword [ebp + eax*4 - 0x884], edx
je 0x500643
inc eax
cmp eax, ecx
jb 0x500635
cmp eax, ecx
jne 0x50065c
cmp ecx, 0x200
jae 0x50065c
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 0x500520
test eax, eax
js 0x500520
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x894]
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x88c], 0
mov dword [ebp - 0x44], 0
jne 0x5006ba
mov eax, dword [ebp - 0x898]
mov byte [eax + 0x14], 1
jmp 0x500545
call fcn.0042a0c0
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x30]
movq qword [ebp - 0x20], xmm0
movups xmmword [ebp - 0x30], xmm0
call fcn.00434a70
push dword [ebp - 0x8a0]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00438b90
test eax, eax
je 0x50072b
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.004fff50
test al, al
je 0x500749
push dword [ebp - 0x89c]
lea ecx, [ebp - 0x30]
call fcn.00435070
jmp 0x50075c
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.00448770
mov ecx, dword [ebp - 0x898]
call fcn.0046d400
test al, al
jne 0x500aed
lea ecx, [ebp - 0x30]
call fcn.00402f80
test eax, eax
je 0x5007b4
mov ecx, dword [ebp - 0x898]
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x5007b4
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.00402f80
push eax
lea ecx, [ebp - 0x30]
call fcn.00438c00
push eax
mov eax, dword [ebp - 0x898]
mov ecx, dword [eax + 0x10]
call dword [edi + 4]
cmp byte [ebp - 0x11], 0
jne 0x500acc
mov edi, dword [ebp - 0x8a4]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00434c90
jmp 0x50054a
mov byte [esi + 0x18], 0
jmp 0x5008a6
mov eax, dword [esi + 0xb8]
or eax, dword [esi + 0xbc]
je 0x5008a6
cmp dword [esi + 0xc0], 0
jne 0x5007f4
call sub.KERNEL32.DLL_GetTickCount
mov dword [esi + 0xc0], eax
call sub.KERNEL32.DLL_GetTickCount
mov ecx, dword [esi + 0xc0]
mov dword [ebp - 0x89c], eax
cmp eax, ecx
jae 0x500811
mov dword [esi + 0xc0], eax
mov ecx, eax
sub eax, ecx
cmp eax, 0x1388
jb 0x500889
mov eax, dword [esi + 0xb8]
mov edi, eax
mov ecx, dword [esi + 0xbc]
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.005af920
mov dword [esi + 0xbc], edx
mov ecx, eax
mov eax, dword [ebp - 0x89c]
mov dword [esi + 0xb8], ecx
mov dword [esi + 0xc0], eax
test edx, edx
jg 0x500883
jl 0x50086f
cmp ecx, 0xa00000
jae 0x500883
mov dword [esi + 0xb8], 0xa00000
mov dword [esi + 0xbc], 0
mov edi, dword [ebp - 0x8a4]
push edi
push dword [ebp - 0x8a8]
lea ecx, [esi + 0x30]
push dword [ebp - 0x8b0]
call fcn.0059f1c0
test al, al
jne 0x500b0a
push 0
push dword [ebp - 0x8b0]
mov dword [esi + 0x2a0], 0
push dword [ebp - 0x8b4]
push dword [esi + 0x294]
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x89c], eax
cmp eax, 0xffffffff
je 0x5008d9
test eax, eax
jns 0x5008fa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 0x8ac], ecx
mov dword [esi + 0x2a0], ecx
cmp eax, 0xffffffff
je 0x500908
jmp 0x500900
mov ecx, dword [ebp - 0x8ac]
test eax, eax
jns 0x500a1f
cmp ecx, 0x2733
jne 0x500b8a
cmp byte [ebp + 0x18], 0
jne 0x500b7a
inc dword [esi + 0x33c]
cmp byte [esi + 0x18], 0
je 0x5009b5
inc dword [esi + 0xc4]
cmp dword [esi + 0x24], 0
jl 0x5009b5
jg 0x500945
cmp dword [esi + 0x20], 0x10000
jb 0x5009b5
call sub.KERNEL32.DLL_GetTickCount
mov ecx, dword [esi + 0x28]
mov dword [ebp - 0x8ac], eax
cmp eax, ecx
jb 0x5009b1
test ecx, ecx
je 0x5009b1
cmp eax, ecx
jbe 0x5009b5
sub eax, ecx
je 0x5009b5
push 0
push eax
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.005af920
cmp eax, 0x80
jbe 0x5009b5
imul eax, eax, 0x3cc
xor ecx, ecx
mov dword [esi + 0xbc], ecx
mov dword [esi + 0xb8], eax
cmp eax, 0xa00000
jae 0x5009a3
mov dword [esi + 0xb8], 0xa00000
mov dword [esi + 0xbc], ecx
mov eax, dword [ebp - 0x8ac]
mov dword [esi + 0xc0], eax
jmp 0x5009b5
mov byte [esi + 0x18], 0
push edi
push dword [ebp - 0x898]
mov ecx, esi
push 0
push 0
push dword [ebp + 0x1c]
call fcn.005014d0
test al, al
je 0x500b1f
mov ecx, dword [edi + 0x124]
test ecx, ecx
je 0x500a17
push 0x2a
call fcn.00449450
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 0x500a4b
cmp byte [esi + 0x342], 0
je 0x500a43
push edi
push dword [ebp - 0x8a8]
lea ecx, [esi + 0x128]
push eax
call fcn.004e0b90
mov eax, dword [ebp - 0x89c]
mov ecx, dword [ebp - 0x8b8]
add dword [ecx], eax
cmp byte [esi + 0x338], 0
je 0x500a79
mov ecx, dword [ebp - 0x8a8]
test ecx, ecx
je 0x500a79
test eax, eax
jle 0x500a95
push edi
cdq
push edx
push eax
call fcn.004a81b0
test al, al
jne 0x500b2b
mov eax, dword [ebp - 0x89c]
test eax, eax
jle 0x500a95
sub dword [ebp + 0xc], eax
add dword [ebp - 0x8b4], eax
cmp byte [esi + 0x18], 0
je 0x500aa1
cdq
add dword [esi + 0x20], eax
adc dword [esi + 0x24], edx
jmp 0x500aa1
jne 0x500aa1
push 1
call fcn.00447b80
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x500bf0
mov ecx, dword [ebp - 0x8a0]
jmp 0x5003c0
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 0x500bf4
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.00434c90
mov byte [ebp - 0x11], 0
jmp 0x500bf4
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.00434c90
mov byte [ebp - 0x11], 0
jmp 0x500bf4
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 0x500bf4
mov eax, dword [ebp - 0x898]
cmp byte [eax + 0x15], 0
je 0x500b40
mov eax, dword [edi]
mov ecx, edi
push str.Socket_send_aborted_by_application
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x500bf4
cmp byte [eax + 0x14], 0
mov ecx, edi
je 0x500b6a
push dword [ebp + 0x1c]
push str.idleTimeoutMs_wf
call fcn.00448770
mov eax, dword [edi]
mov ecx, edi
push str.Socket_send_idle_timeout
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x500bf4
mov eax, dword [edi]
push str.Socket_send_failed.
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x500bf4
mov eax, dword [ebp - 0x898]
mov byte [ebp - 0x11], 0
mov byte [eax + 0x18], 1
jmp 0x500bf4
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.004ff260
add esp, 0xc
mov ecx, edi
push dword [ebp - 0x8b0]
push str.send_size
call fcn.00448770
mov ecx, esi
call fcn.004fe410
mov byte [ebp - 0x11], 0
jmp 0x500bf4
mov eax, dword [edi]
mov ecx, edi
push dword [0x68a5c4]
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x500bf4
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 0x500bf4
mov byte [ebp - 0x11], 1
lea ecx, [ebp - 0x40]
call fcn.0042a160
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.005af618
mov esp, ebp
pop ebp
ret 0x24