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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427e78
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x4344c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00406170
test eax, eax
jne 0x406104
push str.Waiting_For_Commands
lea ebx, [esi + 0xc]
push 0x64
push ebx
call fcn.00406450
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x4c], eax
push str.TeamViewer_Win32_Instance_Mutex
push eax
push 0x10000000
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
test eax, eax
je 0x405c34
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x3e], 1
jmp 0x405c38
mov byte [ebp - 0x3e], 0
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov eax, dword [0x436ba4]
mov dword [ebp - 0x18], eax
mov word [ebp - 0x14], 0
mov byte [ebp - 0x12], 1
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x3d], 0
mov dword [ebp - 0x20], eax
lea ebx, [ebx]
push 0
push 0x4ff
push 0x3e8
lea eax, [ebp - 0x20]
mov byte [ebp - 0x3f], 1
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x50], 0x102
mov edi, eax
je 0x405cad
mov ecx, edi
sub ecx, dword [ebp - 0x4c]
cmp ecx, 0x3e8
jb 0x405cdf
push str.TeamViewer_Win32_Instance_Mutex
push 0
push 0x10000000
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
test eax, eax
je 0x405cd4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x3f], 1
mov byte [ebp - 0x3e], 1
jmp 0x405cdc
cmp byte [ebp - 0x3e], 0
sete byte [ebp - 0x3f]
mov dword [ebp - 0x4c], edi
cmp byte [ebp - 0x3d], 0
je 0x405d55
sub edi, dword [ebp - 0x44]
cmp edi, 0x3e8
jb 0x405d55
push str.Fatal_error__Invoker_Helper_Backend_was_not_released_within_the_specified_time._Attempting_to_recover.
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
mov dword [ebp - 0x44], 0
lea ecx, [ebp - 0x18]
mov byte [ebp - 0x3d], 0
call fcn.00404f70
cmp byte [ebp - 0x14], 0
je 0x405d55
push str.CInvokerHelperBackend::Unblock
lea eax, [ebp - 0x18]
push 0x64
push eax
call fcn.00406450
add esp, 0xc
push 0
call dword [sym.imp.USER32.dll_BlockInput]
test eax, eax
jne 0x405d51
push str.InvokerHelperBackend:_Could_not_Unblock_Input_
lea eax, [ebp - 0x18]
push 0xc8
push eax
call fcn.00406450
add esp, 0xc
mov byte [ebp - 0x14], 0
cmp byte [ebp - 0x3f], 0
je 0x4060e2
push dword [esi + 4]
mov ecx, dword [ebx]
xor edi, edi
mov dword [ebp - 0x48], edi
call fcn.00406210
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x405dec
cmp eax, 1
je 0x405d9b
cmp eax, 0xffffffff
jne 0x405c70
push str.Error_in_Wait_Function
push 0xc8
push ebx
call fcn.00406450
lea esi, [edi + 0xa]
jmp 0x4060f7
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
cmp eax, 0xffffffff
je 0x4060ca
test eax, eax
je 0x405c70
mov eax, dword [ebp - 0x38]
cmp eax, 0x12
je 0x4060b7
cmp eax, 0x16
je 0x4060b7
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x405c70
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x1c]
push ecx
mov eax, dword [eax + 4]
call eax
test eax, eax
je 0x405c70
cmp eax, 0xffffffff
je 0x40609f
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + 1]
cmp eax, 0x13
ja case.0x405e18.0
jmp dword [eax*4 + 0x406120]
push str.Error__CmdUndef_
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405e91
mov ecx, ebx
call fcn.004063f0
push str.Logging_Opened
push 0x64
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405e91
push str.Closing_Log
push 0x64
push ebx
call fcn.00406450
mov edi, dword [ebx]
add esp, 0xc
mov eax, dword [edi + 4]
test eax, eax
je 0x405e79
cmp eax, 0xffffffff
je 0x405e79
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 4], 0
mov eax, dword [edi + 8]
test eax, eax
je 0x405e8e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], 0
mov edi, dword [ebp - 0x48]
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x1c]
push ecx
mov eax, dword [eax + 4]
call eax
test eax, eax
jne 0x405e00
jmp 0x405c70
mov eax, dword [esi + 4]
mov eax, dword [eax + 0xc]
call eax
test eax, eax
jne 0x405e91
push str.Could_not_start_hooks
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x10]
call eax
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x14]
call eax
test eax, eax
jne 0x405e91
push str.Could_not_start_Title_Bar_Buttons
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x18]
call eax
jmp 0x405e91
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, edi
cmp ecx, 0x32
jbe 0x405e91
mov edi, eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x48], edi
mov eax, dword [eax + 0x1c]
call eax
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x20]
call eax
test eax, eax
jne 0x405e91
push str.Could_not_start_Single_Window
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x24]
call eax
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x30]
call eax
test eax, eax
jne 0x405e91
push str.Could_not_start_DragDrop_Interceptor
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x34]
call eax
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x3c]
call eax
test eax, eax
jne 0x405e91
push str.Could_not_start_DirectX_hooks
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405e91
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x40]
call eax
jmp 0x405e91
lea ecx, [ebp - 0x18]
call fcn.00404c70
mov edx, dword [esi + 4]
xor ecx, ecx
mov bl, al
test bl, bl
push 0
sete cl
add ecx, 2
push ecx
mov ecx, dword [edx + 0x38]
call ecx
test bl, bl
je 0x405ff0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x3d], 1
lea ebx, [esi + 0xc]
jmp 0x405e91
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x3d], 0
call fcn.00404d30
mov eax, dword [esi + 4]
push 0
push 2
mov eax, dword [eax + 0x38]
call eax
jmp 0x405e91
cmp byte [ebp - 0x14], 0
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x3d], 0
je 0x405e91
push str.CInvokerHelperBackend::Unblock
lea eax, [ebp - 0x18]
push 0x64
push eax
call fcn.00406450
add esp, 0xc
push 0
call dword [sym.imp.USER32.dll_BlockInput]
test eax, eax
jne 0x406066
push str.InvokerHelperBackend:_Could_not_Unblock_Input_
lea eax, [ebp - 0x18]
push 0xc8
push eax
call fcn.00406450
add esp, 0xc
mov byte [ebp - 0x14], 0
jmp 0x405e91
lea ecx, [ebp - 0x18]
call fcn.00404f70
jmp 0x405e91
push ecx
push str.Error__Unknown_Command__i
push 0xc8
push ebx
call fcn.00406450
mov eax, dword [esi + 4]
add esp, 0x10
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
call eax
jmp 0x405e91
push str.Fatal_Error__Cmd_overflow_detected._Running_in_inconsistent_state.
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
jmp 0x405c70
push str.Quitting_because_of_window_message
push 0xc8
push ebx
call fcn.00406450
add esp, 0xc
xor esi, esi
jmp 0x4060fa
push str.CmdQuitLoader
push 0x64
push ebx
call fcn.00406450
add esp, 0xc
xor esi, esi
jmp 0x4060fa
push str.Error__TeamViewer_terminated_unexpectedly_
push 0xc8
push ebx
call fcn.00406450
mov esi, 9
add esp, 0xc
lea ecx, [ebp - 0x18]
call fcn.00404bd0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00413990
mov esp, ebp
pop ebp
ret