Function at 0x401000
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x24
mov eax, dword [0x40d0d0]
mov cl, byte [esp + 0x30]
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ebx, 1
push 0x18
mov dword [0x41e1b0], ebp
mov dword [0x40dda0], ebx
mov dword [0x41e1a8], ebp
mov dword [esp + 0x14], eax
mov byte [esp + 0x1c], cl
call fcn.00404d52
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x14]
mov dword [esp + 0x24], ebp
push edx
push eax
mov dword [0x41e1b8], ebp
call fcn.00404cb6
mov esi, eax
add esp, 0xc
cmp esi, ebp
je 0x4010fc
mov bl, byte [esp + 0x40]
jmp 0x40106f
xor ebp, ebp
push ebp
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], bl
call fcn.00403ff0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x28]
push ebp
call fcn.00404150
test al, al
je 0x4010b9
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov edx, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call fcn.00404130
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x44]
push eax
push edx
lea ecx, [esp + 0x24]
call fcn.00404040
push 1
lea ecx, [esp + 0x28]
call fcn.00403ff0
lea eax, [esp + 0x10]
push eax
push 0
call fcn.00404cb6
mov esi, eax
add esp, 8
test esi, esi
jne 0x40106d
xor ebp, ebp
mov ebx, 1
mov eax, dword [esp + 0x1c]
mov esi, dword [eax]
cmp esi, eax
je 0x401142
mov edi, 0x40d0cc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esi + 8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [edx + 8]
push 0x40d0cc
push ecx
push ebp
mov ecx, edx
call fcn.00403f80
cmp eax, dword [0x40b1c8]
je 0x401138
mov dword [0x41e1b8], ebx
mov esi, dword [esi]
mov eax, dword [esp + 0x1c]
cmp esi, eax
jne 0x401106
push str.DIASUninst.exe
call fcn.00401560
add esp, 4
cmp eax, ebp
jge 0x401174
push 0x10
push eax
push str.DIAS_REMOVE_ERR
call fcn.00402fd0
mov eax, dword [esp + 0x28]
add esp, 0xc
lea edx, [esp + 0x40]
mov ecx, dword [eax]
push eax
push ecx
jmp 0x401534
cmp eax, ebx
jne 0x4011b6
push ebp
push ebp
push str.DIAS_MULPROC_WAN
call fcn.00402fd0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [eax]
push eax
push ecx
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x24]
call fcn.004040a0
mov edx, dword [esp + 0x1c]
push edx
call fcn.00404600
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10
call fcn.004016b0
cmp eax, ebp
jge 0x4011e0
push 0x10
push eax
push str.DIAS_REMOVE_ERR
call fcn.00402fd0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [eax]
push eax
push ecx
lea eax, [esp + 0x48]
jmp 0x4012e4
je 0x401528
cmp eax, 2
je 0x401528
call fcn.00401800
cmp eax, ebp
jge 0x401219
push 0x10
push eax
push str.DIAS_REMOVE_ERR
call fcn.00402fd0
mov eax, dword [esp + 0x28]
add esp, 0xc
lea edx, [esp + 0x40]
mov ecx, dword [eax]
push eax
push ecx
jmp 0x401534
jne 0x401221
mov dword [0x40dda0], ebp
call fcn.00401c40
cmp eax, ebp
jge 0x40124b
push 0x10
push eax
push str.DIAS_REMOVE_ERR
call fcn.00402fd0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [eax]
push eax
push ecx
lea ecx, [esp + 0x48]
jmp 0x401343
cmp eax, ebx
jne 0x401296
push 0x134
push ebp
push str.DIAS_SRV_WAR
call fcn.00402fd0
add esp, 0xc
cmp eax, 6
je 0x401296
mov eax, dword [esp + 0x1c]
push eax
mov ecx, dword [eax]
lea eax, [esp + 0x44]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.004040a0
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00404600
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10
call fcn.00403a60
call fcn.00401d70
cmp eax, ebp
jge 0x4012c5
push 0x10
push eax
push str.DIAS_REMOVE_ERR
call fcn.00402fd0
mov eax, dword [esp + 0x28]
add esp, 0xc
lea edx, [esp + 0x40]
mov ecx, dword [eax]
push eax
push ecx
jmp 0x401534
cmp eax, 2
jne 0x401307
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x40]
push eax
push ecx
lea ecx, [esp + 0x20]
call fcn.00403f70
mov edx, dword [eax]
lea eax, [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x24]
call fcn.004040a0
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00404600
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10
mov eax, dword [0x41e1b0]
mov ebx, 0xa
cmp eax, ebx
je 0x4013d3
push 4
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebp
jne 0x401366
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x40]
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.00403f70
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.004040a0
mov edx, dword [esp + 0x1c]
push edx
call fcn.00404600
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10
push 0xf01ff
push str.Spooler
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
cmp edi, ebp
jne 0x4013a3
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea ecx, [esp + 0x18]
mov eax, dword [esp + 0x1c]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.00403f70
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push ecx
jmp 0x401534
push 0x1e
push edi
push esi
call fcn.00403530
push 0x1e
push edi
push esi
call fcn.00403720
add esp, 0x18
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 1
push str.Spooler
call fcn.00403400
add esp, 8
call fcn.00402060
cmp eax, ebp
jge 0x40141d
push 0x10
push eax
push str.DIAS_REMOVE_ERR
call fcn.00402fd0
mov eax, dword [0x41e1b0]
add esp, 0xc
cmp eax, ebx
je 0x401408
push ebp
push str.Spooler
call fcn.00403400
add esp, 8
call fcn.00403650
lea ecx, [esp + 0x18]
call fcn.00403f10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x10
cmp dword [0x41e1b0], ebx
je 0x401438
push ebp
push str.Spooler
call fcn.00403400
add esp, 8
call fcn.00403650
cmp dword [0x41e1a8], ebp
je 0x401501
push 0x34
push ebp
push str.DIAS_REBOOT_WAR
call fcn.00402fd0
add esp, 0xc
cmp eax, 6
jne 0x401510
cmp dword [0x41e1b8], ebp
jne 0x401510
cmp dword [0x41e1b0], ebx
je 0x4014f6
lea ecx, [esp + 0x40]
push ecx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4014a2
lea ecx, [esp + 0x18]
call fcn.00403f10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x10
lea edx, [esp + 0x28]
push edx
push str.SeShutdownPrivilege
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
push ebp
push ebp
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x2c]
push ebp
push eax
push ebp
push ecx
mov dword [esp + 0x3c], 1
mov dword [esp + 0x48], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4014f6
lea ecx, [esp + 0x18]
call fcn.00403f10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x10
push ebp
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
jmp 0x401510
push ebp
push ebp
push str.DIAS_FINISH
call fcn.00402fd0
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.00403f10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret 0x10
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x40]
push eax
mov ecx, dword [eax]
push ecx
push edx
lea ecx, [esp + 0x24]
call fcn.004040a0
mov eax, dword [esp + 0x1c]
push eax
call fcn.00404600
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10