Function at 0x402ed7
Capabilities:
Check if file exists
Get common file path
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410ce9
mov eax, dword fs:[0]
push eax
mov eax, 0x128c
call fcn.0040f410
mov eax, dword [0x41c028]
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
xor ebx, ebx
push ebx
mov edi, ecx
call dword [sym.imp.SolvusoftWMhelper.dll_int___cdecl_DisableFsRedirection_void___]
pop ecx
call fcn.004014a5
test eax, eax
jne 0x402f3a
xor eax, eax
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.0040e9fc
leave
ret
lea ecx, [ebp - 0x1298]
call sub.mfc90u.dll_CFile::CFile
push 0x210
lea eax, [ebp - 0x428]
push ebx
push eax
mov dword [ebp - 4], ebx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1284]
call dword [0x41278c]
lea ecx, [ebp - 0x1280]
call dword [0x41278c]
push 0xe3e
lea eax, [ebp - 0x1268]
push ebx
push eax
mov byte [ebp - 4], 2
call sub.MSVCR90.dll_memset
add esp, 0xc
push dword [edi]
lea eax, [ebp - 0x1268]
call fcn.00401291
lea eax, [ebp - 0xe58]
push eax
lea ecx, [ebp - 0x126c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
lea ecx, [ebp - 0xe52]
push ecx
lea ecx, [ebp - 0x1270]
push ecx
mov esi, eax
mov byte [ebp - 4], 3
call fcn.00403cb4
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x1284]
mov byte [ebp - 4], 4
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
lea ecx, [ebp - 0x1270]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x126c]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40302e
lea ecx, [ebp - 0x1280]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1284]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1298]
call fcn.0040e202
jmp 0x402f1e
mov edi, dword [edi]
push ebx
push 0x8000
push edi
lea ecx, [ebp - 0x1298]
call sub.mfc90u.dll_CFile::Open
push 4
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x1298]
call sub.mfc90u.dll_CFile::Read
push 0x208
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x1298]
call sub.mfc90u.dll_CFile::Read
mov eax, dword [ebp - 0x428]
xor ecx, ecx
mov edi, eax
mov edx, 0xc04
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.mfc90u.dll_new__
mov esi, eax
pop ecx
cmp esi, ebx
je 0x40309e
push esi
mov eax, edi
call fcn.00401009
mov eax, esi
jmp 0x4030a0
xor eax, eax
mov esi, dword [ebp - 0x428]
mov dword [ebp - 0x21c], eax
inc esi
xor ecx, ecx
push 0x18
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call sub.mfc90u.dll_new__
pop ecx
mov dword [ebp - 0x1288], eax
mov byte [ebp - 4], 5
cmp eax, ebx
je 0x4030fe
push 0x4034ff
push 0x4034a0
push esi
lea edi, [eax + 4]
push 0x18
push edi
mov dword [eax], esi
call fcn.0040ebd4
mov dword [ebp - 0x1278], edi
jmp 0x403104
mov dword [ebp - 0x1278], ebx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x428]
imul eax, eax, 0xc04
push eax
push dword [ebp - 0x21c]
lea ecx, [ebp - 0x1298]
call sub.mfc90u.dll_CFile::Read
lea ecx, [ebp - 0x1298]
call sub.mfc90u.dll_CFile::Close
cmp dword [ebp - 0x428], ebx
mov dword [ebp - 0x1274], ebx
jle 0x403228
mov edi, dword [ebp - 0x1278]
add edi, 8
mov dword [ebp - 0x126c], ebx
mov dword [ebp - 0x1270], edi
jmp 0x403160
mov edi, dword [ebp - 0x1270]
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 0x126c]
lea eax, [ecx + eax + 4]
push eax
lea eax, [ebp - 0x1288]
push eax
lea esi, [ebp - 0x1284]
call fcn.00403cb4
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x1280]
mov byte [ebp - 4], 6
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
lea ecx, [ebp - 0x1288]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push dword [ebp - 0x1280]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403337
mov eax, dword [ebp - 0x21c]
mov esi, dword [ebp - 0x126c]
mov eax, dword [esi + eax]
mov dword [edi - 8], eax
lea eax, [ebp - 0x1280]
push eax
lea ecx, [edi + 4]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov eax, dword [ebp - 0x21c]
lea eax, [esi + eax + 0x404]
push eax
mov ecx, edi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ebx, [edi + 0xc]
add edi, 8
call fcn.00403527
inc dword [ebp - 0x1274]
mov eax, dword [ebp - 0x1274]
add dword [ebp - 0x126c], 0xc04
add dword [ebp - 0x1270], 0x18
xor ebx, ebx
cmp eax, dword [ebp - 0x428]
jl 0x40315a
xor edi, edi
cmp dword [ebp - 0x428], ebx
jle 0x4032a8
mov esi, dword [ebp - 0x1278]
add esi, 0xc
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x126c]
call dword [0x412774]
push esi
lea ecx, [ebp - 0x1270]
mov byte [ebp - 4], 7
call dword [0x412774]
lea eax, [ebp - 0x126c]
push eax
lea eax, [ebp - 0x1270]
mov byte [ebp - 4], 9
push eax
mov dword [0x41ca28], ebx
call fcn.0040106f
lea ecx, [ebp - 0x1270]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x126c]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
add esi, 0x18
cmp edi, dword [ebp - 0x428]
jl 0x40323b
cmp dword [ebp - 0x428], ebx
mov dword [ebp - 0x1274], ebx
jle 0x4033a0
mov esi, dword [ebp - 0x1278]
add esi, 0x10
mov edi, 0xf013f
call dword [sym.imp.SolvusoftWMhelper.dll_bool___cdecl_SysIsRunningInWin64_void_]
test al, al
je 0x403371
mov eax, dword [esi - 8]
lea ecx, [ebp - 0x126c]
push ecx
push edi
push ebx
push eax
push dword [esi - 0x10]
mov dword [ebp - 0x126c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x403327
mov eax, dword [esi - 8]
lea ecx, [ebp - 0x1288]
push ecx
lea ecx, [ebp - 0x126c]
push ecx
push ebx
push edi
push 4
push ebx
push ebx
push eax
push dword [esi - 0x10]
mov dword [ebp - 0x1288], ebx
mov dword [ebp - 0x126c], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, ebx
jne 0x403385
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push eax
push ecx
push ebx
push dword [ebp - 0x126c]
jmp 0x40337f
push dword [ebp - 0x21c]
call sub.mfc90u.dll_delete__
pop ecx
lea ecx, [ebp - 0x1280]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1284]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1298]
call fcn.0040e202
mov eax, ebx
jmp 0x402f20
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov edx, dword [esi - 8]
push eax
push ecx
push edx
push dword [esi - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegReplaceKeyW]
inc dword [ebp - 0x1274]
mov eax, dword [ebp - 0x1274]
add esi, 0x18
cmp eax, dword [ebp - 0x428]
jl 0x4032c8
push dword [ebp - 0x21c]
call sub.mfc90u.dll_delete__
mov esi, dword [ebp - 0x1278]
pop ecx
cmp esi, ebx
je 0x4033d4
push 0x4034ff
add esi, 0xfffffffc
push dword [esi]
push 0x18
push dword [ebp - 0x1278]
call fcn.0040ea69
push esi
call sub.mfc90u.dll_delete__
pop ecx
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x127c]
call dword [0x41278c]
lea ecx, [ebp - 0x127c]
mov byte [ebp - 4], 0xa
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::Empty]
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x127c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
push str.winsxspending.xml
lea ecx, [ebp - 0x1270]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
lea eax, [ebp - 0x1270]
push eax
lea eax, [ebp - 0x127c]
push eax
mov byte [ebp - 4], 0xb
call dword [sym.imp.SolvusoftWMhelper.dll_enum_PCO_ERROR_CODES___cdecl_STPathAppend_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__]
pop ecx
pop ecx
lea ecx, [ebp - 0x1270]
mov byte [ebp - 4], 0xa
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea eax, [ebp - 0x127c]
push eax
call dword [sym.imp.SolvusoftWMhelper.dll_enum_PCO_ERROR_CODES___cdecl_DoesPathExists_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__]
pop ecx
test eax, eax
je 0x403494
call dword [sym.imp.SolvusoftWMhelper.dll_unsigned_long_int___cdecl__winmajor_void_]
cmp eax, 5
jbe 0x403494
push 0x12
call dword [sym.imp.USER32.dll_PostQuitMessage]
lea ecx, [ebp - 0x127c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor ebx, ebx
inc ebx
jmp 0x403343
push 4
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
jmp 0x403480