Function at 0x401440
Capabilities:
Check if file exists
Copy file
Create directory
Create process on windows
Execute command
Get common file path
Get file attributes
Get program files directory
Get system information on windows
Inspect load icon resource
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1674
call fcn.0040cb60
mov eax, dword [0x412004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push 0x66
push eax
mov dword [ebp - 0x1674], ecx
mov dword [0x19e24f8], eax
call dword [sym.imp.USER32.dll_LoadIconW]
push 0x208
lea eax, [ebp - 0x43c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x43c]
push eax
push 0
push 0
push 0x2a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x4014b2
lea eax, [ebp - 0x43c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
push str.Westinghouse_Windows_Driver_1.0
lea eax, [ebp - 0x43c]
push eax
push str._ws_s
push 0x104
push 0x19e2500
call fcn.00401010
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 0x14
push 0x19e2500
call edi
cmp eax, 0xffffffff
je 0x4014ec
test al, 0x10
jne 0x401522
push 0
push 0x19e2500
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401522
push eax
push str.Error_happened_
push str.Create_temp_folder_failed_
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405955
mov esp, ebp
pop ebp
ret 0x10
push esi
push 0x800
lea eax, [ebp - 0xc3c]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x19e2500
push str._wsxpiot
lea eax, [ebp - 0xc3c]
push 0x400
push eax
call fcn.00401010
add esp, 0x1c
lea eax, [ebp - 0xc3c]
push eax
call edi
mov esi, dword [sym.imp.msvcrt.dll__wsystem]
cmp eax, 0xffffffff
je 0x4015b7
test al, 0x10
je 0x4015b7
push 0x19e2500
push str._wsxpiotxpiotsrv.exe___service_stop
lea eax, [ebp - 0xc3c]
push 0x400
push eax
call fcn.00401010
lea eax, [ebp - 0xc3c]
push eax
call esi
push 0x19e2500
push str._wsxpiotxpiotsrv.exe___service_uninstall
lea eax, [ebp - 0xc3c]
push 0x400
push eax
call fcn.00401010
lea eax, [ebp - 0xc3c]
push eax
call esi
add esp, 0x28
call fcn.00401090
test eax, eax
jne 0x4015e6
push eax
push str.Error_happened_
push str.Treat_driver_files_failed_
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405955
mov esp, ebp
pop ebp
ret 0x10
push ebx
xorps xmm0, xmm0
mov dword [ebp - 0x164c], 0
push str.IsWow64Process2
push str.kernel32.dll
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x1648], 0
movups xmmword [ebp - 0x1c], xmm0
movq qword [ebp - 0xc], xmm0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x401670
lea eax, [ebp - 0x1648]
push eax
lea eax, [ebp - 0x164c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
movzx eax, word [ebp - 0x1648]
cmp eax, 0x8664
ja 0x401662
je case.0x401690.9
sub eax, 0x14c
je case.0x401690.0
sub eax, 0x74
jne case.0x401690.1
push 0x40e868
jmp 0x4016a3
cmp eax, 0xaa64
jne case.0x401690.1
push str.arm64
jmp 0x4016a3
lea eax, [ebp - 0x1670]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx eax, word [ebp - 0x1670]
cmp eax, 0xc
ja case.0x401690.1
movzx eax, byte [eax + 0x401940]
jmp dword [eax*4 + 0x40192c]
push str.amd64
jmp 0x4016a3
push str.i386
lea eax, [ebp - 0x2c]
push 0x14
push eax
call dword [0x40d21c]
add esp, 0xc
cmp word [ebp - 0x2c], 0
je 0x401916
push 0x208
lea eax, [ebp - 0x234]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x208
lea eax, [ebp - 0xe44]
push 0
push eax
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x2c]
push eax
push 0x19e2500
push str._ws_wsDismApi.dll
lea eax, [ebp - 0x43c]
push 0x104
push eax
call fcn.00401010
add esp, 0x2c
lea eax, [ebp - 0xe44]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0xe44]
push eax
push str._wsDismApi.dll
lea eax, [ebp - 0x234]
push 0x104
push eax
call fcn.00401010
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [ebp - 0x234]
add esp, 0x10
push 1
push eax
lea eax, [ebp - 0x43c]
push eax
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x43c]
push eax
push str.Copy_file_from__ws_to__ws._0x_x
lea eax, [ebp - 0x1644]
push 0x400
push eax
call fcn.00401010
add esp, 0x18
lea eax, [ebp - 0x1644]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x19e2500
push str._wsDismApi.dll
lea eax, [ebp - 0x234]
push 0x104
push eax
call fcn.00401010
add esp, 0x10
lea eax, [ebp - 0x234]
push 1
push eax
lea eax, [ebp - 0x43c]
push eax
call ebx
lea eax, [ebp - 0x2c]
push eax
push 0x19e2500
push str._ws_wsdrvinst.exe
lea eax, [ebp - 0x43c]
push 0x104
push eax
call fcn.00401010
push 0x19e2500
push str._wsdrvinst.exe
lea eax, [ebp - 0x234]
push 0x104
push eax
call fcn.00401010
push str._Upgrade
push dword [ebp - 0x1674]
call dword [sym.imp.msvcrt.dll_wcsstr]
add esp, 0x2c
test eax, eax
mov eax, 0
cmovne eax, dword [ebp - 0x1674]
mov dword [ebp - 0x1674], eax
lea eax, [ebp - 0x234]
push 0
push eax
lea eax, [ebp - 0x43c]
push eax
call ebx
test eax, eax
je 0x401916
mov eax, dword [ebp - 0x1674]
push 5
push 0x19e2500
push eax
lea eax, [ebp - 0x234]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x800
lea eax, [ebp - 0xc3c]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x19e2500
push str._wsxpiot
lea eax, [ebp - 0xc3c]
push 0x400
push eax
call fcn.00401010
add esp, 0x1c
lea eax, [ebp - 0xc3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x4018e6
test al, 0x10
je 0x4018e6
push 0x19e2500
push str._wsxpiotxpiotsrv.exe___service_install
lea eax, [ebp - 0xc3c]
push 0x400
push eax
call fcn.00401010
lea eax, [ebp - 0xc3c]
push eax
call esi
push 0x19e2500
push str._wsxpiotxpiotsrv.exe___service_start
lea eax, [ebp - 0xc3c]
push 0x400
push eax
call fcn.00401010
lea eax, [ebp - 0xc3c]
push eax
call esi
add esp, 0x28
push 0x19e2500
push str._wsunins000.exe
lea eax, [ebp - 0x234]
push 0x104
push eax
call fcn.00401010
add esp, 0x10
lea eax, [ebp - 0x234]
push 0
push eax
lea eax, [ebp - 0x43c]
push eax
call ebx
mov ecx, dword [ebp - 4]
xor eax, eax
pop ebx
pop esi
xor ecx, ebp
pop edi
call fcn.00405955
mov esp, ebp
pop ebp
ret 0x10