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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ba938
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x50dc94]
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
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push edi
push ebx
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws__s__d
call fcn.0047c780
mov eax, dword [0x50f810]
add esp, 0x10
test al, 1
je 0x465611
push edi
test ebx, ebx
mov eax, 0x4cc9ec
cmovne eax, ebx
push eax
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws____szName_ws__bSSL_d
push str.___info
push 0xf90
push 0
push 0
call fcn.00421090
mov eax, dword [0x50f810]
add esp, 0x20
cmp dword [esi + 0x5d0], 0
je 0x465651
test al, 2
je 0x465639
push str.stopping_ID_TIMER_KEEP_TUNNEL_UP
push str.__debug
push 0x1135
push 0
push 0
call fcn.00421090
add esp, 0x14
push 0xe5
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_KillTimer]
mov dword [esi + 0x5d0], 0
push str.3C78D6CA_E541_4a55_B6AD_F91CA12EFBDF
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomW]
test ax, ax
jne 0x46567e
push str.3C78D6CA_E541_4a55_B6AD_F91CA12EFBDF
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws_Add_ATOM_VPN_DISALLOW_KEEPRUNNING
call fcn.0047c780
add esp, 8
push str.0EAC67E7_01D4_4889_808D_D5D4CC0DE2A8
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomW]
test ax, ax
jne 0x4656ab
push str.0EAC67E7_01D4_4889_808D_D5D4CC0DE2A8
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws_Add_ATOM_VPN_DISALLOW_AUTOCONNECT
call fcn.0047c780
add esp, 8
cmp dword [esi + 0x614], 0
je 0x46570b
push 0xffffffffffffffff
push dword [esi + 0x604]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x614]
mov dword [eax], 1
mov eax, dword [esi + 0x614]
mov dword [eax + 0x18], 0
mov eax, dword [esi + 0x614]
mov dword [eax + 4], 0
push dword [esi + 0x604]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0xfa3
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws__d_m_bDisconnectedManually_has_been_set_to_TRUE
call fcn.0047c780
add esp, 0xc
mov dword [0x541800], 0
push 0
test edi, edi
je 0x465725
push ebx
mov ecx, esi
call fcn.00479530
jmp 0x46573d
push 0
push 0
push 0
push ecx
mov ecx, esp
push ebx
call dword [0x4c5f74]
call fcn.0047e8d0
add esp, 0x14
cmp dword [esi + 0x614], 0
je 0x4657ff
push 0xffffffffffffffff
push dword [esi + 0x604]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x614]
mov dword [eax + 0x18], 0
mov eax, dword [esi + 0x614]
mov dword [eax + 4], 0
mov eax, dword [esi + 0x614]
mov dword [eax + 0x1f01c], 0
cmp dword [esi + 0x5c8], 0
je 0x4657bc
push 0xfb9
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str.IPSEC_Failover_Stage_3___ws__d
mov dword [esi + 0x5c8], 0
call fcn.0047c780
add esp, 0xc
cmp dword [esi + 0x5d0], 0
je 0x4657bc
mov ecx, esi
call fcn.00467b90
mov eax, dword [esi + 0x614]
push dword [eax + 0x28]
push 0xfbe
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws__d_m_nConnectionType_d
call fcn.0047c780
add esp, 0x10
push dword [esi + 0x604]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0xfc0
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws__d_m_bDisconnectedManually_has_been_set_to_TRUE
call fcn.0047c780
add esp, 0xc
call dword [0x4c63a0]
test eax, eax
je 0x465814
push 2
call dword [0x4c6394]
add esp, 4
test edi, edi
jne 0x465853
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
call fcn.004a81c0
test eax, eax
je 0x465850
nop dword [eax]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, 0x1388
ja 0x465850
call fcn.004a81c0
test eax, eax
jne 0x465830
mov edi, dword [ebp + 0xc]
xor eax, eax
mov ecx, esi
test edi, edi
sete al
push eax
push 0x671
call fcn.0046a5c0
mov ecx, ebx
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x465880
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x28]
call int.00410410
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
call fcn.004679a0
mov edx, dword [ebp - 0x14]
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov esi, eax
cmp edx, 8
jb 0x4658f1
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4658e7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4658e7
call dword [0x4c59b0]
push edx
push ecx
call fcn.004aebf7
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
test esi, esi
je 0x465928
push 0xfd9
push str.CFortiTrayDlg::DisconnectTunnelByTunnelName
push str._ws__d_prepare_to_call_PostQuitMessage
call fcn.0047c780
add esp, 0xc
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
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.004ae9c0
mov esp, ebp
pop ebp
ret 8