Function at 0x506510
Capabilities:
Check for time delay via gettickcount

Disassembly:
push 0xffffffffffffffff
push 0x576ef8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov dword [esp + 0x14], ecx
push ecx
lea ecx, [esp + 0x28]
call fcn.00436260
mov edi, dword [esp + 0x68]
push str.readChannelToClose
push edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x5c], 0
call fcn.00437740
mov esi, dword [esp + 0x60]
cmp byte [esi + 0x24], 0
mov byte [esp + 0x54], 1
je 0x506583
cmp dword [esi + 0x28], 0
jne 0x506583
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.No_m_pHandler.
mov ecx, edi
call edx
mov ebp, dword [esp + 0x64]
mov ecx, ebp
call fcn.004725a0
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x5c]
mov byte [ecx], 0
lea ecx, [esp + 0x30]
mov dword [esp + 0x68], eax
mov dword [esi + 0x14], edx
call fcn.00447240
mov byte [esp + 0x54], 2
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 4], eax
mov eax, dword [esi + 0x10]
cmp eax, 5
jne 0x5065e7
cmp dword [0x6450a0], 0xa
jge 0x5065de
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
push str.sshRp.m_totalTimeoutMs_wf_is_too_small__3_
mov ecx, edi
call edx
inc dword [0x6450a0]
mov dword [esi + 0x10], 0x7530
jmp 0x5065eb
test eax, eax
je 0x506620
cmp dword [esi + 4], 0
jne 0x5065f9
call sub.KERNEL32.dll_GetTickCount
mov dword [esi + 4], eax
cmp dword [esi + 0x10], 0x3e8
jae 0x506609
mov dword [esi + 0x10], 0x7530
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [esi + 4]
cmp eax, ecx
jbe 0x506620
sub eax, ecx
cmp eax, dword [esi + 0x10]
ja 0x5066fe
lea ecx, [esp + 0x30]
call fcn.00446f40
mov edx, dword [esp + 0x5c]
push edi
push ebp
lea eax, [esp + 0x38]
push esi
mov ecx, eax
push 0
mov dword [esi + 0x1c], ecx
mov ecx, dword [esp + 0x24]
push edx
mov byte [esi + 0x2d], 0
mov byte [esi + 0x2c], 0
mov dword [esi + 0x54], 0xffffffff
mov dword [esi + 0x58], 0
mov dword [esi + 0x18], eax
call fcn.00504f50
mov ecx, dword [esp + 0x6c]
mov bl, al
mov al, byte [esi + 0x2f]
mov byte [ecx], al
test al, al
jne 0x50670b
cmp byte [esi + 0x2e], al
jne 0x50675e
mov ecx, ebp
call fcn.00472570
test al, al
jne 0x506719
test bl, bl
je 0x506767
mov ecx, ebp
call fcn.00472540
test al, al
jne 0x506770
mov ecx, dword [esp + 0x68]
test ecx, ecx
je 0x5066b6
push edi
call fcn.00485040
test al, al
jne 0x50677f
cmp byte [esi + 0x2d], 0
je 0x5065b9
mov edx, dword [esp + 0x5c]
cmp dword [esi + 0x54], edx
jne 0x5065b9
lea ecx, [esp + 0x30]
mov byte [esp + 0x54], 1
call fcn.004479b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 0
call fcn.004377b0
lea ecx, [esp + 0x24]
mov dword [esp + 0x54], 0xffffffff
call fcn.00436290
mov al, 1
jmp 0x506748
mov ecx, ebp
call fcn.004725a0
mov byte [ebp + 0x14], 1
jmp 0x506719
mov eax, dword [edi]
push str.disconnected.
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
lea ecx, [esp + 0x30]
mov byte [esp + 0x54], 1
call fcn.004479b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 0
call fcn.004377b0
lea ecx, [esp + 0x24]
mov dword [esp + 0x54], 0xffffffff
call fcn.00436290
xor al, al
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 0x14
mov eax, dword [edi]
push str.Channel_no_longer_exists.
jmp 0x506712
mov eax, dword [edi]
push str.readChannelData_failed.
jmp 0x506712
push edi
push str.readChannelData
mov ecx, ebp
call fcn.00472610
jmp 0x506719
mov eax, dword [edi]
push str.Aborted_by_app.
jmp 0x506712