Function at 0x1003972
Capabilities:
Get common file path
Shutdown system

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c8
mov eax, dword [0x100c028]
push ebx
push esi
push 0x10024b8
xor ebx, ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push 0x100000
mov dword [ebp - 0x2b4], eax
mov dword [ebp - 0x2b8], 0x10
mov dword [ebp - 0x2ac], ebx
call dword [sym.imp.KERNEL32.dll_OpenEventA]
push 0x1002490
mov esi, eax
call fcn.0100346e
cmp esi, ebx
je 0x10039d8
push 0xea60
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10039ef
cmp dword [ebp + 0x10], ebx
je 0x10039e4
push 0xea60
jmp 0x10039e9
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2b8]
push eax
lea eax, [ebp - 0x2c8]
push eax
push ebx
push 0x13
call fcn.010034f4
test eax, eax
jne 0x1003a1a
push 0x100246c
call fcn.0100346e
xor eax, eax
jmp 0x1003bd4
push 0x100245c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x2b0], eax
je 0x1003a41
push 0x1002440
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2ac], eax
push ebx
push dword [0x100cf24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1003a5a
xor esi, esi
inc esi
jmp 0x1003ba4
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x2ac], ebx
je 0x1003a82
push dword [ebp + 0x18]
push dword [ebp + 8]
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0x2b4]
push ebx
call dword [ebp - 0x2ac]
jmp 0x1003a91
push dword [ebp + 8]
push dword [ebp + 0xc]
push ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownA]
mov esi, eax
cmp esi, ebx
jne 0x1003ba3
call edi
cmp eax, 0x45b
je 0x1003ac5
cmp eax, 0x4f7
je 0x1003ab0
cmp eax, 0x15
jne 0x1003acd
push 0xbb8
push dword [0x100cf24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1003a61
xor esi, esi
inc esi
jmp 0x1003ba3
call edi
push eax
push 0x100240c
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.01003791
add esp, 0x10
lea eax, [ebp - 0x20c]
push eax
call fcn.0100346e
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0x2a8]
push eax
mov dword [ebp - 0x2a8], 0x94
call edi
cmp dword [ebp - 0x2a4], 4
jbe 0x1003ba3
lea eax, [ebp - 0x2a8]
push eax
mov dword [ebp - 0x2a8], 0x9c
call edi
test byte [ebp - 0x210], 0x40
je 0x1003ba3
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1003ba3
lea eax, [ebp - 0x108]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
push ebx
push 0x2000000
push 3
push ebx
push 7
mov byte [eax + 1], bl
push 0xc0000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x1003ba3
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
je 0x1003ba3
push 1
call dword [sym.imp.ntdll.dll_NtShutdownSystem]
mov esi, eax
pop edi
cmp dword [ebp - 0x2b0], ebx
je 0x1003bb8
push dword [ebp - 0x2b0]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x2c8]
push eax
call fcn.0100358b
cmp esi, ebx
jge 0x1003bd2
push 0x10023f4
call fcn.0100346e
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.010062ff
leave
ret 0x14