Function at 0x413996
Capabilities:
Check mutex on windows
Shutdown system

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb24
push ebx
push esi
push edi
push dword [0x43ed34]
lea esi, [esp + 0x1c]
mov byte [esp + 0x13], 0
call fcn.0040bb1a
test al, al
je 0x4139eb
mov eax, dword [esp + 0x1c]
push dword [esp + 0x18]
lea esi, [esp + 0x14]
mov dword [esp + 0x14], eax
call fcn.004135db
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
jne 0x4139e0
and dword [esp + 0x10], eax
lea eax, [esp + 0x18]
call fcn.0040bbb6
jmp 0x4139ef
mov edi, dword [esp + 0x14]
cmp dword [esp + 0x10], 0x1ee
jne 0x413b24
push edi
call fcn.00412552
test al, al
je 0x413c98
push 1
lea eax, [esp + 0x64]
push eax
push 0x38901130
call fcn.00413297
lea eax, [esp + 0x60]
push eax
push 1
push 0x43ed10
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
test esi, esi
je 0x413c98
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xb7
jne 0x413a50
push esi
call ebx
xor esi, esi
test esi, esi
je 0x413c98
call fcn.0040c2ad
test al, 0x20
je 0x413a68
or dword [0x43ecd8], 0x10
lea eax, [esp + 0xcc]
push eax
call fcn.0040c2de
test al, al
jne 0x413ac1
lea edi, [esp + 0x300]
call fcn.004135aa
cmp word [esp + 0x70c], 0
je 0x413ab6
push 0x15
lea edx, [esp + 0x710]
lea ecx, [esp + 0x38]
call fcn.0042f5ba
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esp + 0x34]
add eax, eax
push ecx
jmp 0x413aba
push 0
xor eax, eax
push 2
call fcn.0040c042
call fcn.00415731
test byte [0x43ecd8], 0x10
je 0x413adc
push 0x80000000
push 0x14
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push 1
lea eax, [esp + 0x64]
push eax
push 0x2a43533f
call fcn.00413297
lea eax, [esp + 0x60]
push eax
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov edi, eax
test edi, edi
je 0x413b0c
push edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
call ebx
push 1
call fcn.0041370d
push esi
mov byte [esp + 0x13], 1
call ebx
mov edi, dword [esp + 0x14]
jmp 0x413c98
cmp dword [esp + 0x10], 0x10
jne 0x413c98
push 2
push 0x8789347b
call fcn.004132d1
mov dword [esp + 0x10], eax
test eax, eax
je 0x413c87
lea eax, [esp + 0x300]
push eax
xor bl, bl
call fcn.0041c982
test al, al
je 0x413b5c
inc bl
mov eax, dword [0x43ecdc]
push 0x16
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
cmp eax, 1
jne 0x413b7e
call fcn.00412644
mov byte [esp + 0xf], al
jmp 0x413c7e
cmp bl, 1
jne 0x413bb0
push dword [edi]
mov ebx, dword [0x43ecec]
push dword [edi + 0xc]
push fcn.0041cacc
call fcn.00428519
push dword [ebp + 8]
lea edx, [esp + 0xfc]
lea ecx, [esp + 0x304]
call fcn.0041cacc
jmp 0x413bde
call fcn.0041393f
test al, al
jne 0x413c7e
push dword [edi]
mov ebx, dword [0x43ecec]
push dword [edi + 8]
push fcn.00412415
call fcn.00428519
lea ecx, [esp + 0xf8]
call fcn.00412415
mov byte [esp + 0xf], al
cmp al, 1
jne 0x413c7e
lea eax, [esp + 0x24]
push eax
xor ebx, ebx
push ebx
push 0x43ed38
push ebx
lea eax, [esp + 0x108]
push eax
call fcn.0041edc1
test eax, eax
setne byte [esp + 0xf]
cmp byte [esp + 0xf], bl
je 0x413c7e
push 1
lea eax, [esp + 0x64]
push eax
push 0x2a43533f
call fcn.00413297
lea eax, [esp + 0x60]
push eax
push ebx
push 1
push 0x43ed10
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
push 0xffffffffffffffff
cmp eax, ebx
jne 0x413c51
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x413c5f
push ebx
lea eax, [esp + 0x20]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], ebx
je 0x413c71
push dword [esp + 0x18]
call edi
push dword [esp + 0x28]
call edi
push esi
call edi
mov edi, dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.0040963e
cmp byte [ebp + 0xc], 1
jne 0x413c98
push dword [0x43ed34]
call fcn.0041ef5f
push edi
call fcn.00421ce7
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8