Function at 0x422740
Capabilities:
Create process on windows
Delete registry key
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1690
call fcn.00429120
mov eax, dword [0x47a42c]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 0x163c]
push eax
lea eax, [ebp - 0x1638]
push eax
lea eax, [ebp - 0x1634]
push eax
call fcn.00419380
add esp, 0x10
test al, al
je 0x4227a5
cmp dword [ebp - 0x1634], 6
ja 0x422a6e
jne 0x4227a5
cmp dword [ebp - 0x1638], 2
ja 0x422a6e
jne 0x4227a5
cmp dword [ebp - 0x163c], 2
jae 0x422a6e
push 0x802
lea eax, [ebp - 0xe2c]
push 0
push eax
call fcn.0042b800
push 0x20a
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.0042b800
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.004191e0
push 0x20a
lea eax, [ebp - 0x41c]
push 0
push eax
call fcn.0042b800
add esp, 0x2c
lea eax, [ebp - 0x41c]
push 0x104
push eax
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x802
lea eax, [ebp - 0x1630]
push 0
push eax
call fcn.0042b800
push str.emsdeploy_forticlient.conf
lea eax, [ebp - 0x41c]
push eax
push str._s_s
push 0xffffffffffffffff
lea eax, [ebp - 0x1630]
push 0x401
push eax
call fcn.00414570
lea eax, [ebp - 0x1630]
push eax
push str.FCConfig.exe
lea eax, [ebp - 0x628]
push eax
push str.__s_s___q__o_import_installer_config__m_VPN__f__s
push 0xffffffffffffffff
lea eax, [ebp - 0xe2c]
push 0x401
push eax
call fcn.00414570
add esp, 0x40
lea eax, [ebp - 0xe2c]
push eax
push 0x45d81c
call fcn.00420880
add esp, 8
mov dword [ebp - 0x1690], 0x44
xor eax, eax
mov dword [ebp - 0x1664], 1
mov word [ebp - 0x164e], ax
xorps xmm0, xmm0
mov word [ebp - 0x1660], ax
lea eax, [ebp - 0x164c]
push eax
lea eax, [ebp - 0x1690]
movlpd qword [ebp - 0x168c], xmm0
push eax
push 0
push 0
push 0
push 0
push 0
movlpd qword [ebp - 0x1684], xmm0
lea eax, [ebp - 0xe2c]
movlpd qword [ebp - 0x167c], xmm0
movlpd qword [ebp - 0x1674], xmm0
movlpd qword [ebp - 0x166c], xmm0
movlpd qword [ebp - 0x165e], xmm0
movlpd qword [ebp - 0x1656], xmm0
movups xmmword [ebp - 0x164c], xmm0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x422935
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.FCConfig.exe
push str.RestoreVPNTunnels
push str._ws__failed_to_launch__s__retval_d
call fcn.00420880
add esp, 0x10
jmp 0x42295b
push 0xffffffffffffffff
push dword [ebp - 0x164c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x164c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1648]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x1630]
push ebx
push eax
call fcn.0043b3eb
push str.softwareFortinetEMSDEPLOY_FORTICLIENT.bak
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004137e0
mov ebx, eax
push ebx
push 0x1014
push str.RestoreVPNTunnels
push str._ws____d_BackupSource___d
call fcn.00420880
add esp, 0x1c
test ebx, ebx
je 0x422a58
push esi
push edi
push 0x20a
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0042b800
add esp, 0xc
xor esi, esi
push dword [esi + 0x479ae0]
lea eax, [ebp - 0x210]
push str.softwareFortinetFortiClient
push str._s_s
push 0xffffffffffffffff
push 0x105
push eax
call fcn.00414570
lea eax, [ebp - 0x210]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00413660
mov edi, eax
lea eax, [ebp - 0x210]
push edi
push eax
push 0x101c
push str.RestoreVPNTunnels
push str._ws____d_RestorePath_s__create_result___d
call fcn.00420880
add esp, 0x34
test edi, edi
je 0x422a41
push 0
push edi
push dword [esi + 0x479ae0]
push ebx
call dword [sym.imp.SHLWAPI.dll_SHCopyKeyW]
push eax
lea eax, [ebp - 0x210]
push eax
push 0x1020
push str.RestoreVPNTunnels
push str._ws____d_SHCopyKey_result___d
call fcn.00420880
push edi
call fcn.00413610
add esp, 0x18
add esi, 4
cmp esi, 0xc
jb 0x4229b3
push ebx
call fcn.00413610
add esp, 4
pop edi
pop esi
call fcn.00423c60
push str.softwareFortinetEMSDEPLOY_FORTICLIENT.bak
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret