Function at 0x501340
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 0x5c5de0
mov eax, dword fs:[0]
push eax
sub esp, 0x8ac
mov eax, dword [0x692c00]
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.0046ecc0
mov eax, dword [ebp - 0x8b8]
mov dword [eax], 0
cmp dword [esi + 0x294], 0xffffffff
jne 0x5013d4
mov eax, dword [edi]
mov ecx, edi
push str.No_socket_exists_for_sending.
call dword [eax + 0x14]
xor al, al
jmp 0x501ccf
cmp byte [esi + 0xd4], 0
lea eax, [esi + 0xd4]
je 0x5013f6
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 0x501ccf
cmp byte [esi + 0xd6], 0
je 0x501413
mov eax, dword [edi]
mov ecx, edi
push dword [0x6905cc]
call dword [eax + 0x14]
xor al, al
jmp 0x501ccf
xorps xmm0, xmm0
lea ecx, [ebp - 0x40]
push eax
movlpd qword [ebp - 0x40], xmm0
call fcn.0042a240
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 4], 0
test eax, eax
jne 0x501440
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 0x501451
mov ecx, 0x41a0
jmp 0x50145b
mov eax, 0x400
cmp ecx, eax
cmovb ecx, eax
cmp byte [ebp + 0x14], 0
mov dword [ebp - 0x8a0], ecx
je 0x501477
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 0x501cc0
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 0x5014c8
push edi
call fcn.004a8ce0
test al, al
jne 0x501b87
mov eax, dword [ebp - 0x8b0]
mov ecx, dword [ebp - 0x8a8]
push edi
push ecx
push eax
lea ecx, [esi + 0x170]
call fcn.005a3070
test al, al
jne 0x501cae
cmp byte [esi + 0xd6], al
jne 0x501c9b
mov eax, dword [ebp - 0x898]
cmp dword [eax + 0x10], 0
je 0x50161a
cmp dword [eax + 0xc], 1
jne 0x50161a
mov ecx, eax
call fcn.0046ecc0
mov ecx, dword [ebp - 0x898]
push edi
call fcn.0046ee20
test al, al
je 0x501536
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 0x50161a
cmp dword [esi + 0x294], 0xffffffff
jne 0x50155a
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 0x50161a
lea ecx, [ebp - 0x894]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
call fcn.0042a200
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 0x5015c5
push 0
call fcn.00401520
add esp, 4
cmp dword [ebp - 0x44], 0x3004bc8d
je 0x5015d8
push 0
call fcn.00401520
add esp, 4
mov edx, dword [esi + 0x294]
test edx, edx
jns 0x5016f9
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.0042a2a0
cmp byte [esi + 0x18], 0
je 0x501976
mov eax, dword [esi + 0x20]
or eax, dword [esi + 0x24]
jne 0x501634
call sub.KERNEL32.DLL_GetTickCount
mov dword [esi + 0x28], eax
cmp byte [esi + 0x18], 0
je 0x501976
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
test ecx, ecx
jl 0x501976
jg 0x50189e
cmp eax, 0x10000
jbe 0x501976
test ecx, ecx
jg 0x50189e
jl 0x501672
cmp eax, 0x40000
ja 0x50189e
cmp dword [esi + 0xc4], 0
jne 0x50189e
cmp byte [esi + 0xc8], 0
je 0x50189e
call sub.KERNEL32.DLL_GetTickCount
mov ecx, dword [esi + 0x28]
cmp eax, ecx
jb 0x501895
test ecx, ecx
je 0x501895
sub eax, ecx
je 0x5016c1
push 0
push eax
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.005b37d0
cmp eax, 0x800
jbe 0x501976
push 1
call fcn.00447e20
add esp, 4
call sub.KERNEL32.DLL_GetTickCount
mov ecx, dword [esi + 0x28]
cmp eax, ecx
ja 0x501976
sub eax, ecx
je 0x5016c1
push 0
push eax
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.005b37d0
cmp eax, 0x800
ja 0x5016c1
jmp 0x501976
mov ecx, dword [ebp - 0x888]
xor eax, eax
test ecx, ecx
je 0x501713
cmp dword [ebp + eax*4 - 0x884], edx
je 0x501713
inc eax
cmp eax, ecx
jb 0x501705
cmp eax, ecx
jne 0x50172c
cmp ecx, 0x200
jae 0x50172c
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 0x5015f0
test eax, eax
js 0x5015f0
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 0x50178a
mov eax, dword [ebp - 0x898]
mov byte [eax + 0x14], 1
jmp 0x501615
call fcn.0042a2a0
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x30]
movq qword [ebp - 0x20], xmm0
movups xmmword [ebp - 0x30], xmm0
call fcn.00434d00
push dword [ebp - 0x8a0]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00438e30
test eax, eax
je 0x5017fb
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.00501020
test al, al
je 0x501819
push dword [ebp - 0x89c]
lea ecx, [ebp - 0x30]
call fcn.00435300
jmp 0x50182c
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.00448a10
mov ecx, dword [ebp - 0x898]
call fcn.0046ec70
test al, al
jne 0x501bbd
lea ecx, [ebp - 0x30]
call fcn.00402fb0
test eax, eax
je 0x501884
mov ecx, dword [ebp - 0x898]
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x501884
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.00402fb0
push eax
lea ecx, [ebp - 0x30]
call fcn.00438ea0
push eax
mov eax, dword [ebp - 0x898]
mov ecx, dword [eax + 0x10]
call dword [edi + 4]
cmp byte [ebp - 0x11], 0
jne 0x501b9c
mov edi, dword [ebp - 0x8a4]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00434f20
jmp 0x50161a
mov byte [esi + 0x18], 0
jmp 0x501976
mov eax, dword [esi + 0xb8]
or eax, dword [esi + 0xbc]
je 0x501976
cmp dword [esi + 0xc0], 0
jne 0x5018c4
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 0x5018e1
mov dword [esi + 0xc0], eax
mov ecx, eax
sub eax, ecx
cmp eax, 0x1388
jb 0x501959
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.005b37d0
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 0x501953
jl 0x50193f
cmp ecx, 0xa00000
jae 0x501953
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.005a3070
test al, al
jne 0x501bda
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 0x5019a9
test eax, eax
jns 0x5019ca
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 0x5019d8
jmp 0x5019d0
mov ecx, dword [ebp - 0x8ac]
test eax, eax
jns 0x501aef
cmp ecx, 0x2733
jne 0x501c5a
cmp byte [ebp + 0x18], 0
jne 0x501c4a
inc dword [esi + 0x33c]
cmp byte [esi + 0x18], 0
je 0x501a85
inc dword [esi + 0xc4]
cmp dword [esi + 0x24], 0
jl 0x501a85
jg 0x501a15
cmp dword [esi + 0x20], 0x10000
jb 0x501a85
call sub.KERNEL32.DLL_GetTickCount
mov ecx, dword [esi + 0x28]
mov dword [ebp - 0x8ac], eax
cmp eax, ecx
jb 0x501a81
test ecx, ecx
je 0x501a81
cmp eax, ecx
jbe 0x501a85
sub eax, ecx
je 0x501a85
push 0
push eax
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.005b37d0
cmp eax, 0x80
jbe 0x501a85
imul eax, eax, 0x3cc
xor ecx, ecx
mov dword [esi + 0xbc], ecx
mov dword [esi + 0xb8], eax
cmp eax, 0xa00000
jae 0x501a73
mov dword [esi + 0xb8], 0xa00000
mov dword [esi + 0xbc], ecx
mov eax, dword [ebp - 0x8ac]
mov dword [esi + 0xc0], eax
jmp 0x501a85
mov byte [esi + 0x18], 0
push edi
push dword [ebp - 0x898]
mov ecx, esi
push 0
push 0
push dword [ebp + 0x1c]
call fcn.005025a0
test al, al
je 0x501bef
mov ecx, dword [edi + 0x124]
test ecx, ecx
je 0x501ae7
push 0x2a
call fcn.004496f0
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 0x501b1b
cmp byte [esi + 0x342], 0
je 0x501b13
push edi
push dword [ebp - 0x8a8]
lea ecx, [esi + 0x128]
push eax
call fcn.004f8ef0
mov eax, dword [ebp - 0x89c]
mov ecx, dword [ebp - 0x8b8]
add dword [ecx], eax
cmp byte [esi + 0x338], 0
je 0x501b49
mov ecx, dword [ebp - 0x8a8]
test ecx, ecx
je 0x501b49
test eax, eax
jle 0x501b65
push edi
cdq
push edx
push eax
call fcn.004a8da0
test al, al
jne 0x501bfb
mov eax, dword [ebp - 0x89c]
test eax, eax
jle 0x501b65
sub dword [ebp + 0xc], eax
add dword [ebp - 0x8b4], eax
cmp byte [esi + 0x18], 0
je 0x501b71
cdq
add dword [esi + 0x20], eax
adc dword [esi + 0x24], edx
jmp 0x501b71
jne 0x501b71
push 1
call fcn.00447e20
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x501cc0
mov ecx, dword [ebp - 0x8a0]
jmp 0x501490
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 0x501cc4
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.00434f20
mov byte [ebp - 0x11], 0
jmp 0x501cc4
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.00434f20
mov byte [ebp - 0x11], 0
jmp 0x501cc4
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 0x501cc4
mov eax, dword [ebp - 0x898]
cmp byte [eax + 0x15], 0
je 0x501c10
mov eax, dword [edi]
mov ecx, edi
push str.Socket_send_aborted_by_application
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x501cc4
cmp byte [eax + 0x14], 0
mov ecx, edi
je 0x501c3a
push dword [ebp + 0x1c]
push str.idleTimeoutMs_wf
call fcn.00448a10
mov eax, dword [edi]
mov ecx, edi
push str.Socket_send_idle_timeout
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x501cc4
mov eax, dword [edi]
push str.Socket_send_failed.
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x501cc4
mov eax, dword [ebp - 0x898]
mov byte [ebp - 0x11], 0
mov byte [eax + 0x19], 1
jmp 0x501cc4
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.00500330
add esp, 0xc
mov ecx, edi
push dword [ebp - 0x8b0]
push str.send_size
call fcn.00448a10
mov ecx, esi
call fcn.004ff4d0
mov byte [ebp - 0x11], 0
jmp 0x501cc4
mov eax, dword [edi]
mov ecx, edi
push dword [0x6905cc]
call dword [eax + 0x14]
mov byte [ebp - 0x11], 0
jmp 0x501cc4
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 0x501cc4
mov byte [ebp - 0x11], 1
lea ecx, [ebp - 0x40]
call fcn.0042a340
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.005b34c8
mov esp, ebp
pop ebp
ret 0x24