Function at 0x414270
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ed57d
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x54d104]
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
mov eax, dword [0x529f2c]
mov edx, str.Reboot:_Restarting_windows...
movq xmm0, qword [str.sfxsh]
mov dword [ebp - 0x30], 0x37314446
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x34], 0x37434235
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x28]
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], 0x19
call fcn.00415b70
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0
push eax
push 0
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x414319
lea eax, [ebp - 0x48]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x414458
lea eax, [ebp - 0x30]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x41444f
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
push 0
push 0
push 0x10
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x44]
push eax
push 0
push dword [ebp - 0x48]
mov dword [ebp - 0x44], 1
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x41444f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
je 0x41444f
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x80040002
push 1
push 0
push 0
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownExW]
test eax, eax
jne 0x41449a
call dword [sym.imp.KERNEL32.dll_GetLastError]
movq xmm0, qword [str.sfxsh]
mov esi, eax
mov eax, dword [0x529f2c]
mov dword [ebp - 0x18], 0x37314446
mov ecx, dword [ebp - 0x18]
movq qword [ebp - 0x60], xmm0
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0x37434235
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x50], ecx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], 0x19
movlpd qword [ebp - 0x18], xmm0
call fcn.0040add0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x41440d
push esi
push str.Reboot:_InitiateSystemShutdownEx_returned_0x_08X
lea eax, [ebp - 0x60]
push eax
push 7
call fcn.00413110
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x41449a
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edi + 4], eax
jne 0x41449a
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x4f933c]
mov ecx, edi
call esi
lock xadd dword [edi + 8], ebx
dec ebx
jne 0x41449a
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4f933c]
mov ecx, edi
call esi
jmp 0x41449a
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x529f2c]
lea edx, [ebp - 0x78]
movq xmm0, qword [str.sfxsh]
mov dword [ebp - 0x18], 0x37314446
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x1c], 0x37434235
mov eax, dword [ebp - 0x1c]
push ecx
movq qword [ebp - 0x78], xmm0
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], 0x19
call fcn.00415f80
add esp, 4
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.004af3ab
mov esp, ebp
pop ebp
ret