Function at 0x40df30
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x443307
mov eax, dword fs:[0]
push eax
sub esp, 0xa64
push ebx
push edi
mov eax, dword [0x455028]
xor eax, esp
push eax
lea eax, [esp + 0xa70]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
cmp eax, 0x3e8
ja 0x40e0a3
je 0x40dfaf
sub eax, 1
je 0x40e21e
sub eax, 1
je 0x40e21e
sub eax, 8
jne 0x40e21e
mov eax, esi
call fcn.0040dd30
mov eax, dword [esi + 0x9b8]
push 0
push edi
push 0x1013
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40e21e
mov ebx, dword [esi + 0xccc]
cmp ebx, dword [esi + 0xcd0]
jbe 0x40dfc3
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, dword [esi + 0xcc0]
mov dword [esp + 0x10], ebx
lea ecx, [ecx]
mov ebx, dword [esi + 0xcd0]
cmp dword [esi + 0xccc], ebx
jbe 0x40dfe4
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 0xcc0]
test edi, edi
je 0x40dff2
cmp edi, eax
je 0x40dff8
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp dword [esp + 0x10], ebx
je 0x40e046
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
test edi, edi
jne 0x40e03e
call ebx
xor eax, eax
mov ecx, dword [esp + 0x10]
cmp ecx, dword [eax + 0x10]
jb 0x40e017
call ebx
mov ecx, dword [esp + 0x10]
add ecx, 0x14
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::Empty]
test edi, edi
jne 0x40e042
call ebx
xor eax, eax
mov edx, dword [esp + 0x10]
cmp edx, dword [eax + 0x10]
jb 0x40e037
call ebx
add dword [esp + 0x10], 0x18
jmp 0x40dfd0
mov eax, dword [edi]
jmp 0x40e00c
mov eax, dword [edi]
jmp 0x40e02c
mov eax, dword [esi + 0x9b8]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x1027
push eax
call edi
mov ecx, dword [esi + 0x9b8]
push 0
push 0
push 0x1028
push ecx
mov ebx, eax
call edi
mov edx, dword [esi + 0x9b8]
push 0
push 0
push 0x1027
push edx
mov dword [esp + 0x1c], eax
call edi
mov ecx, dword [esp + 0xc]
mov edx, dword [esi + 0x9b8]
add ebx, ecx
push ebx
push eax
push 0x1015
push edx
call edi
jmp 0x40e21e
cmp eax, 0x3e9
je 0x40e1c9
cmp eax, 0xffffffff
jne 0x40e21e
mov eax, dword [esi + 0xc2c]
cmp eax, 0xfffffffe
jne 0x40e127
mov ecx, dword [esi + 0x10ac]
test ecx, ecx
je 0x40e0e7
call fcn.00409080
lea edx, [esi + 0xbe8]
push edx
call fcn.00415610
push edx
push eax
call fcn.00408ff0
add esp, 8
push 0x3ed
mov ecx, esi
call sub.mfc90u.dll_CWnd::IsDlgButtonChecked
cmp eax, 1
jne 0x40e127
lea edi, [esi + 0xc00]
push edi
call fcn.00412080
mov ebx, dword [esi + 0xc28]
mov eax, dword [edi]
mov edx, dword [eax + 0x1c]
mov ecx, edi
call edx
cmp ebx, 1
jbe 0x40e127
call fcn.004075d0
push 0
push 0x1d
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push 0
mov eax, esi
call fcn.0040e9b0
mov eax, dword [0x456410]
push eax
lea ecx, [esp + 0x10]
call dword [0x4446ac]
push str.ScheduleStart
lea ecx, [esp + 0x10]
mov dword [esp + 0xa7c], 0
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CompareNoCase]
test eax, eax
jne 0x40e178
cmp dword [esi + 0x10b4], eax
jne 0x40e178
mov ecx, dword [esi + 0x20]
push eax
push 1
push 0x111
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
mov edx, dword [esi + 0x9b8]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push 2
push 0xffffffffffffffff
push 0x100c
push edx
call ebx
add eax, 1
je 0x40e1b2
push 2
lea edi, [eax - 1]
mov eax, dword [esi + 0x9b8]
push edi
push 0x100c
push eax
call ebx
mov ecx, edi
mov eax, esi
call fcn.0040dd30
lea ecx, [esp + 0xc]
mov dword [esp + 0xa78], 0xffffffff
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x40e21e
call sub.BottDefrag.dll_GetStatus
test eax, eax
jne 0x40e21e
push 4
lea ecx, [esp + 0x18]
push ecx
call fcn.0041c9d0
lea ecx, [esp + 0x14]
mov dword [esp + 0xa78], 1
call sub.mfc90u.dll_CDialog::DoModal
cmp eax, 1
jne 0x40e20a
mov edx, dword [esi + 0x20]
push 0
push 0
push 0x108e
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x14]
mov dword [esp + 0xa78], 0xffffffff
call fcn.0041cb20
mov eax, dword [esi + 0xce8]
cmp eax, 0xffffffff
jne 0x40e26d
mov edx, dword [esi + 0xce0]
lea edi, [esi + 0xce0]
push eax
mov eax, dword [edx + 0x14]
mov ecx, edi
call eax
mov ecx, dword [esi + 0xce8]
mov edx, dword [edi]
mov eax, dword [edx + 0x1c]
cmp ecx, 1
mov ecx, edi
jne 0x40e26b
call eax
or eax, 0xffffffff
mov ecx, dword [esp + 0xa70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
call eax
xor eax, eax
mov ecx, dword [esp + 0xa70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4