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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x594555
mov eax, dword fs:[0]
push eax
sub esp, 0x84
push ebx
push esi
push edi
mov eax, dword [0x62d414]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
push str..TunnellerDevLink.cpp
push 0x736
push str.CTunnellerDevLink::_Scan
mov ecx, dword [0x63dd80]
call fcn.0041ac10
mov byte [ebp - 0x14], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
xor ebx, ebx
mov byte [ebp - 0x12], bl
push 0x44c5f0
call dword [sym.imp.MSVCR90.dll_void____cdecl___unsigned_int__struct__EXCEPTION_POINTERS_____cdecl__set_se_translator_void____cdecl___unsigned_int__struct__EXCEPTION_POINTERS___]
add esp, 4
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
mov byte [ebp - 0x13], bl
push edi
call fcn.00410090
test eax, eax
jle 0x40a2ac
mov dword [edi + 0x298], ebx
mov byte [ebp - 0x11], 1
mov al, byte [edi + 0x369]
test al, al
je 0x40a0da
mov dword [ebp - 0x18], 2
cmp dword [edi + 0x2ac], ebx
jne 0x409f25
mov dword [edi + 0x2ac], esi
mov dword [edi + 0x2b0], esi
mov eax, dword [0x63dd80]
mov ecx, dword [eax]
mov edx, dword [edi + 0x370]
push edx
push str.Communication_failure_was_detected__will_attempt_to_re_open_session_0x_08x
push str.CTunnellerDevLink::_Scan
push 2
push eax
mov eax, dword [ecx]
call eax
add esp, 0x14
mov ecx, dword [edi + 0x248]
imul ecx, ecx, 0x3e8
mov edx, esi
sub edx, dword [edi + 0x2ac]
cmp edx, ecx
jae 0x40a07f
mov ecx, dword [edi + 0x2b0]
mov eax, esi
sub eax, ecx
cmp ecx, esi
jbe 0x409f50
dec eax
mov dword [ebp - 0x2c], eax
cmp eax, dword [edi + 0x254]
ja 0x409f6c
cmp ecx, 0xffffffff
je 0x409f6c
mov byte [ebp - 0x13], 1
mov byte [ebp - 0x11], bl
jmp 0x40a0da
mov dl, 1
mov ecx, dword [edi + 0x2fc]
call fcn.004121a0
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x40], 0xa
push 0xa
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [edi + 0x2fc]
push ecx
call fcn.00411c10
mov dword [ebp - 0x54], eax
lea edx, [ebp - 0x18]
push edx
mov ecx, edi
call fcn.0040c2d0
test al, al
je 0x40a06a
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x40a025
sub eax, 1
je 0x40a06a
mov byte [ebp - 0x11], 1
mov dl, 1
mov ecx, dword [edi + 0x2fc]
call fcn.004121a0
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x4c], 0xa
push 0xa
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [edi + 0x2fc]
push ecx
call fcn.00411c10
mov dword [ebp - 0x58], eax
mov eax, dword [0x63dd80]
mov edx, dword [eax]
push str.No_valid_session_found_to_reuse__disconnecting
push str.CTunnellerDevLink::_Scan
push 2
push eax
mov eax, dword [edx]
call eax
add esp, 0x10
mov ecx, edi
call fcn.004555a0
mov byte [edi + 0x369], bl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x2b0], eax
jmp 0x40a0da
mov byte [edi + 0x369], bl
mov byte [ebp - 0x11], bl
mov eax, dword [edi + 0x2fc]
mov byte [eax + 0x88], bl
mov eax, dword [0x63dd80]
mov ecx, dword [eax]
mov edx, dword [edi + 0x370]
push edx
push str.Session_0x_08x_found__will_be_reused
push str.CTunnellerDevLink::_Scan
push 2
push eax
mov eax, dword [ecx]
call eax
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x2b0], eax
jmp 0x40a0da
mov byte [ebp - 0x13], 1
mov byte [ebp - 0x11], bl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x2b0], eax
jmp 0x40a0da
mov dl, 1
mov ecx, dword [edi + 0x2fc]
call fcn.004121a0
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x44], 0xa
push 0xa
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [edi + 0x2fc]
push edx
call fcn.00411c10
mov dword [ebp - 0x48], eax
mov eax, dword [0x63dd80]
mov ecx, dword [eax]
mov edx, dword [edi + 0x370]
push edx
push str.ReconnectTime_elapsed_for_session_0x_08x__disconnecting
push str.CTunnellerDevLink::_Scan
push 2
push eax
mov eax, dword [ecx]
call eax
add esp, 0x14
mov ecx, edi
call fcn.004555a0
mov byte [edi + 0x369], bl
cmp byte [edi + 0x59], bl
jne 0x40a139
cmp byte [ebp - 0x11], bl
je 0x40a130
push edi
call fcn.00410090
test eax, eax
jle 0x40a130
mov dword [edi + 0x2ac], ebx
mov ecx, dword [edi + 0x2b4]
mov eax, esi
sub eax, ecx
cmp ecx, esi
jbe 0x40a103
dec eax
cmp eax, dword [edi + 0x258]
ja 0x40a110
cmp ecx, 0xffffffff
jne 0x40a130
mov ecx, edi
call fcn.00455020
mov byte [ebp - 0x14], al
cmp al, bl
jne 0x40a126
mov dword [edi + 0x2b4], esi
jmp 0x40a130
mov dword [edi + 0x2b4], 0xffffffff
cmp byte [edi + 0x59], bl
je 0x40a1c7
cmp byte [ebp - 0x13], bl
jne 0x40a1c7
mov cl, byte [edi + 0x369]
test cl, cl
jne 0x40a1c7
cmp dword [edi + 0x2fc], ebx
je 0x40a1c7
cmp dword [edi + 0x300], ebx
je 0x40a1c7
cmp dword [edi + 0x244], ebx
je 0x40a182
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [edi + 0x244]
cmp eax, 0x2710
jbe 0x40a182
mov dword [edi + 0x244], ebx
call fcn.00410730
mov dword [edi + 0x2ac], ebx
mov dword [ebp - 0x24], ebx
push 0xa
lea edx, [ebp - 0x24]
push edx
mov eax, dword [edi + 0x2fc]
push eax
call fcn.00411c10
mov ecx, dword [edi + 0x300]
mov edx, dword [ecx]
mov eax, dword [edi + 0x2fc]
push eax
mov edx, dword [edx + 8]
call edx
mov ecx, dword [edi + 0x300]
mov eax, dword [ecx]
mov edx, dword [edi + 0x2fc]
push edx
mov eax, dword [eax + 4]
call eax
jmp 0x40a1e0
mov dword [ebp - 0x20], ebx
mov eax, dword [edi + 0x2fc]
cmp eax, ebx
je 0x40a1e0
push 0xa
lea ecx, [ebp - 0x20]
push ecx
push eax
call fcn.00411c10
mov esi, dword [edi + 0x26c]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, 0x7d0
ja 0x40a1fd
cmp esi, ebx
jne 0x40a401
cmp dword [0x68cb4c], ebx
je 0x40a29b
push edi
call fcn.00426c80
test al, al
je 0x40a29b
mov ecx, dword [edi + 0x370]
call fcn.00444580
cmp eax, 1
jne 0x40a29b
lea edx, [ebp - 0x74]
push edx
mov ecx, edi
call fcn.00405e90
mov byte [ebp - 4], 1
cmp dword [eax + 0x18], 8
jb 0x40a241
mov ecx, dword [eax + 4]
jmp 0x40a244
lea ecx, [eax + 4]
mov eax, dword [0x63dd80]
mov edx, dword [eax]
push ecx
push str.Encryption_settings_were_changed_for_CTunnellerDevlink___ls___disconnecting_...
push str.CTunnellerDevLink::_Scan
push 1
push eax
mov eax, dword [edx]
call eax
add esp, 0x14
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x74]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dl, 1
mov ecx, dword [edi + 0x2fc]
call fcn.004121a0
mov dword [ebp - 0x34], ebx
push 0xa
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [edi + 0x2fc]
push edx
call fcn.00411c10
mov ecx, edi
call fcn.004555a0
mov dword [edi + 0x2b4], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x26c], eax
jmp 0x40a401
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [edi + 0x298], ebx
jne 0x40a2c2
call esi
mov dword [edi + 0x298], eax
call esi
cmp eax, dword [edi + 0x298]
jb 0x40a2d8
call esi
mov esi, eax
sub esi, dword [edi + 0x298]
jmp 0x40a2e3
call esi
mov esi, eax
sub esi, dword [edi + 0x298]
dec esi
mov byte [ebp - 0x12], bl
cmp esi, dword [edi + 0x294]
jbe 0x40a2f9
cmp byte [edi + 0x59], bl
je 0x40a348
mov byte [ebp - 0x12], 1
jmp 0x40a348
cmp byte [edi + 0x59], bl
je 0x40a348
cmp dword [edi + 0x428], ebx
je 0x40a319
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [edi + 0x428]
cmp eax, 0x1f4
jbe 0x40a348
mov eax, dword [0x63dd80]
mov ecx, dword [eax]
mov edx, dword [edi + 0x294]
push edx
push esi
push str.No_OPC_clients_connected_during___d__ms._Configured_delay_for_disconnection_is___d__ms.
push str.CTunnellerDevLink::_Scan
push 3
push eax
mov eax, dword [ecx]
call eax
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x428], eax
mov cl, byte [edi + 0x369]
test cl, cl
je 0x40a358
mov byte [ebp - 0x12], 1
jmp 0x40a361
cmp byte [ebp - 0x12], bl
je 0x40a401
lea edx, [ebp - 0x90]
push edx
mov ecx, edi
call fcn.00405e90
mov byte [ebp - 4], 2
cmp dword [eax + 0x18], 8
jb 0x40a37e
mov ecx, dword [eax + 4]
jmp 0x40a381
lea ecx, [eax + 4]
mov eax, dword [0x63dd80]
mov edx, dword [eax]
push ecx
push str.There_are_no_OPC_clients_connected___disconnecting_CTunnellerDevlink___ls_...
push str.CTunnellerDevLink::_Scan
push 2
push eax
mov eax, dword [edx]
call eax
add esp, 0x14
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x90]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov cl, byte [edi + 0x369]
test cl, cl
je 0x40a3d8
mov eax, dword [0x63dd80]
mov edx, dword [eax]
mov ecx, dword [edi + 0x370]
push ecx
push str.Connection_failure_detected_on_session_0x_08x__disconnecting
push str.CTunnellerDevLink::_Scan
push 2
push eax
mov edx, dword [edx]
call edx
add esp, 0x14
mov dl, 1
mov ecx, dword [edi + 0x2fc]
call fcn.004121a0
mov dword [ebp - 0x3c], ebx
push 0xa
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [edi + 0x2fc]
push ecx
call fcn.00411c10
mov ecx, edi
call fcn.004555a0
mov ecx, edi
call fcn.0040bee0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.MSVCR90.dll_void____cdecl___unsigned_int__struct__EXCEPTION_POINTERS_____cdecl__set_se_translator_void____cdecl___unsigned_int__struct__EXCEPTION_POINTERS___]
add esp, 4
mov dword [ebp - 4], 0xffffffff
jmp 0x40a463
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov bl, byte [ebp - 0x14]
movzx ecx, bl
push ecx
push str.bRetVal
push str..TunnellerDevLink.cpp
push 0x884
push str.CTunnellerDevLink::_Scan
mov ecx, dword [0x63dd80]
call fcn.0041aca0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4