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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x334
push ebx
push esi
push edi
push dword [0x435ba4]
mov ebx, eax
xor eax, eax
lea esi, [esp + 0x24]
mov byte [esp + 0x13], 0
call fcn.00432237
test al, al
je 0x40d9a5
mov eax, dword [esp + 0x24]
push dword [esp + 0x20]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
call fcn.0040d560
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40d99c
and dword [esp + 0x10], eax
lea eax, [esp + 0x20]
call fcn.004322df
cmp dword [esp + 0x10], 0x130
jne 0x40da81
push dword [esp + 0x18]
call fcn.0041b430
test al, al
je 0x40dc6e
push 1
lea eax, [esp + 0x34]
push eax
push 0x32901130
call fcn.0040cefa
lea eax, [esp + 0x30]
push eax
push 1
push 0x435b80
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
test eax, eax
je 0x40d9f4
call fcn.0042ffd7
mov ebx, eax
jmp 0x40d9f6
xor ebx, ebx
test ebx, ebx
je 0x40dc6e
lea eax, [esp + 0x98]
push eax
call fcn.0042571a
test byte [esp + 0x98], 0x20
je 0x40da1c
or dword [0x435b48], 0x10
call fcn.004264c9
test byte [0x435b48], 0x10
je 0x40da37
push accept
push 0x14
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push 1
lea eax, [esp + 0x34]
push eax
push 0x1a43533f
call fcn.0040cefa
lea eax, [esp + 0x30]
push eax
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
test edi, edi
je 0x40da6d
push edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
call esi
push 1
call fcn.0040d61d
push ebx
mov byte [esp + 0x13], 1
call esi
jmp 0x40dc6e
cmp dword [esp + 0x10], 0xc
jne 0x40dc6e
push 2
push 0x8889347b
call fcn.0040cf35
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40dc5d
push 1
lea eax, [esp + 0x34]
push eax
push 0x19367401
call fcn.0040cefa
lea eax, [esp + 0x30]
push eax
call fcn.0042fff4
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test al, al
je 0x40daea
xor edi, edi
jmp 0x40dade
cmp edi, 0x3c
jae 0x40dafa
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
push esi
call fcn.004315d2
test al, al
je 0x40dacd
jmp 0x40dafa
cmp bl, 1
jne 0x40dafa
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x435b4c]
push 0x16
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
cmp eax, 1
jne 0x40db20
test bl, bl
jne 0x40db20
call fcn.0041be02
mov byte [esp + 0xf], al
jmp 0x40dc54
push esi
call fcn.004315d2
test al, al
jne 0x40db2f
cmp bl, 1
jne 0x40db92
lea eax, [esp + 0x10]
push eax
push 0x78f16360
push 0x435f00
call esi
cmp eax, 1
jne 0x40db8a
mov eax, dword [esp + 0x18]
push dword [eax + 8]
mov edi, fcn.0041b4e7
push dword [eax + 4]
call fcn.00433891
mov ecx, dword [esp + 0x10]
push ebx
lea eax, [esp + 0x13c]
mov esi, 0x435ba8
push eax
mov edx, esi
call fcn.0041b4e7
push 0x8000
xor ebx, ebx
push ebx
push dword [esp + 0x18]
mov byte [esp + 0x1b], al
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40dbbe
test bl, bl
jne 0x40dc54
mov eax, dword [esp + 0x18]
push dword [eax + 8]
mov edi, fcn.0041b109
push dword [eax]
call fcn.00433891
mov esi, 0x435ba8
lea edx, [esp + 0x138]
mov ecx, esi
call fcn.0041b109
mov byte [esp + 0xf], al
xor ebx, ebx
cmp byte [esp + 0xf], 1
jne 0x40dc54
lea eax, [esp + 0x20]
push eax
push ebx
push esi
push ebx
lea eax, [esp + 0x148]
push eax
call fcn.0042de20
test eax, eax
setne byte [esp + 0xf]
cmp byte [esp + 0xf], 0
je 0x40dc54
push 1
lea eax, [esp + 0x34]
push eax
push 0x1a43533f
call fcn.0040cefa
lea eax, [esp + 0x30]
push eax
push ebx
push 1
push 0x435b80
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
push 0xffffffffffffffff
cmp eax, ebx
jne 0x40dc2b
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x40dc39
push ebx
lea eax, [esp + 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x10], ebx
je 0x40dc4b
push dword [esp + 0x10]
call esi
push dword [esp + 0x24]
call esi
push edi
call esi
push dword [esp + 0x1c]
call fcn.0042ffc7
cmp byte [ebp + 8], 1
jne 0x40dc6e
push dword [0x435ba4]
call fcn.0042dfbe
push dword [esp + 0x18]
call fcn.0042b085
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4