Function at 0x546c40
Capabilities:
Check for time delay via gettickcount
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b19c0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x676664]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [ebp + 0x28]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x10], eax
call fcn.004aef00
mov ecx, dword [ebp + 0x20]
xor edi, edi
mov dword [ecx], edi
cmp dword [esi + 0x294], 0xffffffff
jne 0x546cad
mov ecx, dword [ebp + 0x24]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.No_socket_exists_for_sending.
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
cmp byte [esi + 0xd4], 0
lea eax, [esi + 0xd4]
je 0x546ce1
mov ecx, dword [ebp + 0x24]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Another_thread_is_already_sending_on_this_socket.
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
cmp byte [esi + 0xd6], 0
je 0x546d10
mov ecx, dword [ebp + 0x24]
mov edx, dword [ecx]
mov eax, dword [str.Another_thread_is_closing_this_socket.]
mov edx, dword [edx + 0x14]
push eax
call edx
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push eax
lea ecx, [ebp - 0x24]
call fcn.00442240
mov dword [ebp - 4], edi
cmp dword [ebp + 0x1c], edi
jne 0x546d2e
cmp byte [ebp + 0x18], 0
jne 0x546d2e
mov dword [ebp + 0x1c], 0x1499700
mov eax, dword [ebp + 0x10]
cmp eax, edi
jne 0x546d3c
mov eax, 0x41a0
jmp 0x546d48
cmp eax, 0x400
jae 0x546d4b
mov eax, 0x400
mov dword [ebp + 0x10], eax
cmp byte [ebp + 0x14], 0
je 0x546d5f
cmp eax, 0x41a0
jbe 0x546d5f
mov dword [ebp + 0x10], 0x41a0
mov dword [esi + 0x2a0], edi
cmp dword [ebp + 0xc], edi
je 0x547239
mov ebx, dword [ebp + 0x24]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
cmp eax, ecx
jbe 0x546d81
mov dword [ebp - 0x14], ecx
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
test edi, edi
je 0x546d9f
push ebx
mov ecx, edi
call fcn.00463a30
test al, al
jne 0x54725e
mov eax, dword [ebp - 0x14]
push ebx
push edi
push eax
lea ecx, [esi + 0x170]
call fcn.00591740
test al, al
jne 0x547291
cmp byte [esi + 0xd6], al
jne 0x547298
mov edi, dword [ebp + 0x28]
cmp dword [edi + 0x10], 0
je 0x546eb6
cmp dword [edi + 0xc], 1
jne 0x546eb6
push ebx
push edi
mov ecx, esi
call fcn.00543630
test al, al
je 0x546eb6
lea ecx, [ebp - 0x40]
call fcn.00410e50
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.00415e70
test eax, eax
je 0x546e34
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x10]
push ebx
push edi
push ecx
mov dword [ebp - 0x1c], edx
push 0
lea edx, [ebp - 0x1c]
push edx
push eax
mov ecx, esi
call fcn.00544df0
test al, al
je 0x546e52
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x40]
call fcn.00410b90
jmp 0x546e61
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
push str.Unable_to_allocate_memory_for_reading_the_socket.
mov ecx, ebx
call eax
mov ecx, dword [ebp + 0x10]
push ecx
push str.bufSize
mov ecx, ebx
call fcn.0044e8c0
mov ecx, edi
call fcn.004aee70
test al, al
jne 0x5472a9
lea ecx, [ebp - 0x40]
call fcn.00410b60
test eax, eax
je 0x546eaa
mov eax, dword [edi + 0x10]
test eax, eax
je 0x546eaa
mov edx, dword [ebp + 0x28]
push ebx
mov byte [ebp + 0x17], 0
mov edi, dword [eax]
push edx
lea eax, [ebp + 0x17]
push eax
lea ecx, [ebp - 0x40]
call fcn.00410b60
push eax
lea ecx, [ebp - 0x40]
call fcn.00410b80
mov ecx, dword [ebp + 0x28]
mov ecx, dword [ecx + 0x10]
mov edx, dword [edi + 4]
push eax
call edx
cmp byte [ebp + 0x17], 0
jne 0x5472c5
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00411620
cmp byte [esi + 0x18], 0
je 0x54705b
mov eax, dword [esi + 0x20]
or eax, dword [esi + 0x24]
jne 0x546ed0
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 0x28], eax
cmp byte [esi + 0x18], 0
je 0x54705b
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x20]
test eax, eax
jl 0x54705b
jg 0x546f94
cmp ecx, 0x10000
jbe 0x54705b
test eax, eax
jg 0x546f94
jl 0x546f10
cmp ecx, 0x40000
ja 0x546f94
cmp dword [esi + 0xc4], 0
jne 0x546f94
cmp byte [esi + 0xc8], 0
je 0x546f94
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0x28]
cmp eax, ecx
jb 0x546f8b
test ecx, ecx
je 0x546f8b
sub eax, ecx
je 0x546f51
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0x20]
push 0
push eax
push ecx
push edx
call fcn.0059b510
cmp eax, 0x800
jbe 0x54705b
push 1
call fcn.00441780
add esp, 4
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0x28]
cmp eax, ecx
ja 0x54705b
sub eax, ecx
je 0x546f51
mov ecx, dword [esi + 0x20]
push 0
push eax
mov eax, dword [esi + 0x24]
push eax
push ecx
call fcn.0059b510
cmp eax, 0x800
ja 0x546f51
jmp 0x54705b
mov byte [esi + 0x18], 0
jmp 0x54705b
mov edx, dword [esi + 0xb8]
or edx, dword [esi + 0xbc]
je 0x54705b
cmp dword [esi + 0xc0], 0
jne 0x546fba
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 0xc0], eax
call sub.KERNEL32.dll_GetTickCount
mov edi, eax
cmp edi, dword [esi + 0xc0]
jae 0x546fcf
mov dword [esi + 0xc0], edi
mov eax, edi
sub eax, dword [esi + 0xc0]
cmp eax, 0x1388
jb 0x547042
mov eax, dword [esi + 0xb8]
mov ecx, dword [esi + 0xbc]
mov edx, eax
mov ebx, ecx
shld ebx, edx, 4
shl edx, 4
sub edx, eax
sbb ebx, ecx
shld ebx, edx, 2
push 0
push 0x3b
add edx, edx
add edx, edx
push ebx
push edx
call fcn.0059b510
mov dword [esi + 0xb8], eax
mov dword [esi + 0xbc], edx
mov dword [esi + 0xc0], edi
test edx, edx
jg 0x54703f
jl 0x54702b
cmp eax, 0xa00000
jae 0x54703f
mov dword [esi + 0xb8], 0xa00000
mov dword [esi + 0xbc], 0
mov ebx, dword [ebp + 0x24]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push ebx
push eax
push ecx
lea ecx, [esi + 0x30]
call fcn.00591740
test al, al
jne 0x5472cc
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0x294]
push 0
push edx
push eax
push ecx
mov dword [esi + 0x2a0], 0
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
cmp edi, 0xffffffff
je 0x547087
test edi, edi
jns 0x547096
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x18], eax
mov dword [esi + 0x2a0], eax
cmp edi, 0xffffffff
je 0x5470a3
test edi, edi
jns 0x5471be
cmp dword [ebp - 0x18], 0x2733
jne 0x547322
cmp byte [ebp + 0x18], 0
jne 0x5472dc
mov al, byte [esi + 0x18]
mov ecx, 1
add dword [esi + 0x33c], ecx
test al, al
je 0x547166
add dword [esi + 0xc4], ecx
test al, al
je 0x547166
cmp dword [esi + 0x24], 0
jl 0x547166
jg 0x5470f3
cmp dword [esi + 0x20], 0x10000
jb 0x547166
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 0x28]
mov ebx, eax
cmp ebx, ecx
jb 0x547162
test ecx, ecx
je 0x547162
cmp ebx, ecx
jbe 0x547166
sub eax, ecx
je 0x547166
mov edx, dword [esi + 0x24]
push 0
push eax
mov eax, dword [esi + 0x20]
push edx
push eax
call fcn.0059b510
cmp eax, 0x80
jbe 0x547166
imul eax, eax, 0x3cc
mov dword [esi + 0xb8], eax
xor eax, eax
mov dword [esi + 0xbc], eax
cmp eax, eax
jg 0x54715a
jl 0x54714a
cmp dword [esi + 0xb8], 0xa00000
jae 0x54715a
mov dword [esi + 0xb8], 0xa00000
mov dword [esi + 0xbc], eax
mov dword [esi + 0xc0], ebx
jmp 0x547166
mov byte [esi + 0x18], 0
mov ebx, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x28]
mov edx, dword [ebp + 0x1c]
push ebx
push ecx
push 0
push 0
push edx
mov ecx, esi
call fcn.00542ea0
test al, al
je 0x5472e5
mov ecx, dword [ebx + 0x120]
test ecx, ecx
je 0x5471bc
push 0x2a
call fcn.0044d830
mov eax, dword [ebx + 0x120]
xor ecx, ecx
mov dword [eax + 0x410], ecx
mov dword [eax + 0x414], ecx
mov eax, dword [ebx + 0x120]
mov dword [eax + 0x6c8], ecx
mov dword [eax + 0x6cc], ecx
test edi, edi
jle 0x5471df
cmp byte [esi + 0x342], 0
je 0x5471da
mov eax, dword [ebp - 0x10]
push ebx
push eax
push edi
lea ecx, [esi + 0x128]
call fcn.004ef470
mov eax, dword [ebp + 0x20]
add dword [eax], edi
cmp byte [esi + 0x338], 0
je 0x547208
cmp dword [ebp - 0x10], 0
je 0x547208
test edi, edi
jle 0x547223
mov ecx, dword [ebp - 0x10]
mov eax, edi
cdq
push ebx
push edx
push eax
call fcn.00463af0
test al, al
jne 0x5472ee
test edi, edi
jle 0x547223
sub dword [ebp + 0xc], edi
add dword [ebp + 8], edi
cmp byte [esi + 0x18], 0
je 0x547221
mov eax, edi
cdq
add dword [esi + 0x20], eax
adc dword [esi + 0x24], edx
test edi, edi
jne 0x54722f
push 1
call fcn.00441780
add esp, 4
cmp dword [ebp + 0xc], 0
jne 0x546d71
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.00442260
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push str.Socket_SendBytes2_aborted_by_application.__1a_
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
mov ecx, ebx
call eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.00442260
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push str.Aborted_by_application_while_upload_throttling__1b_
jmp 0x547263
mov edx, dword [ebx]
mov eax, dword [str.Another_thread_is_closing_this_socket.]
mov edx, dword [edx + 0x14]
push eax
mov ecx, ebx
call edx
jmp 0x54726c
push str.Failed_to_receive_TCP_data_while_sending.
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00411620
jmp 0x54726c
push str.Aborting_the_TLS_send..
jmp 0x5472ae
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.Aborted_by_application_while_upload_throttling__1c_
mov ecx, ebx
call edx
jmp 0x54726c
mov eax, dword [ebp + 0x28]
mov byte [eax + 0x18], 1
jmp 0x54726c
mov eax, dword [ebp + 0x28]
cmp byte [eax + 0x15], 0
je 0x5472f8
push str.Socket_send_aborted_by_application
jmp 0x547263
cmp byte [eax + 0x14], 0
je 0x547318
mov ecx, dword [ebp + 0x1c]
push ecx
push str.idleTimeoutMs_wf
mov ecx, ebx
call fcn.0044e8c0
push str.Socket_send_idle_timeout
jmp 0x547263
push str.Socket_send_failed.
jmp 0x547263
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
push str.Error_sending_on_socket__1_
mov ecx, ebx
call eax
mov ecx, dword [ebp + 0x28]
mov edx, dword [ebp - 0x18]
push ebx
push ecx
push edx
call fcn.00542080
mov eax, dword [ebp - 0x14]
add esp, 0xc
push eax
push str.send_size
mov ecx, ebx
call fcn.0044e8c0
mov ecx, esi
call fcn.005435d0
jmp 0x54726c