Function at 0x401798
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe4c
push ebx
push esi
push edi
mov edi, 0x104
lea eax, [ebp - 0x76c]
xor ebx, ebx
push edi
push eax
push ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], 0x4028dc
mov dword [ebp - 0x18], 0x4028ec
mov dword [ebp - 0x64], 0x4028dc
mov dword [ebp - 0x60], 0x4028ec
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, ebx
je 0x401f46
cmp eax, edi
ja 0x401f46
lea edx, [ebp - 0x76c]
lea ecx, [ebp - 0x50]
call fcn.00404d1c
mov esi, eax
cmp esi, ebx
jne 0x401833
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call fcn.0040224f
test eax, eax
jne 0x401821
mov dword [ebp - 0x10], str.Cant_find_7z_archive
jmp 0x40183a
push ebx
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x50]
call fcn.00404e5b
mov esi, eax
cmp esi, ebx
je 0x40184f
mov dword [ebp - 4], 0xb
cmp dword [ebp - 0x10], ebx
je 0x401846
mov dword [ebp - 4], 0xb
cmp dword [ebp - 4], ebx
jne 0x401e27
cmp dword [0x40a8b8], ebx
mov esi, 0x40a44c
jne 0x40186c
push edi
push esi
push 0x6f
push dword [0x40a8bc]
call dword [sym.imp.USER32.dll_GetDlgItemTextW]
lea ecx, [ebp - 0x58]
call fcn.00404ed5
xor edx, edx
lea ecx, [ebp - 0x98]
call fcn.00405621
mov ecx, esi
mov dword [ebp - 0x7c], ebx
call fcn.0040288a
mov eax, dword [0x40a44c]
xor edi, edi
push 1
cmp ax, bx
pop edx
je 0x4018b2
mov ecx, 0x40a44e
cmp ax, 0x20
je 0x4018a7
mov edi, edx
mov ax, word [ecx]
inc edx
inc ecx
inc ecx
cmp ax, bx
jne 0x40189f
mov word [edi*2 + 0x40a44c], bx
cmp word [0x40a44c], bx
jne 0x4018cf
xor edx, edx
mov ecx, str.Incorrect_path
jmp 0x401f41
mov ecx, esi
call fcn.00401458
call fcn.00402094
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x4018e9
mov dword [ebp - 4], 0xb
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp dword [ebp - 4], ebx
mov dword [ebp - 0x14], eax
jne 0x40192a
mov edi, 0x40000
lea ecx, [ebp - 0x1c]
mov edx, edi
call dword [ebp - 0x1c]
cmp eax, ebx
mov dword [ebp - 0x7c], eax
jne 0x401915
mov dword [ebp - 4], 2
jmp 0x40192a
lea eax, [ebp - 0x58]
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x84], ebx
lea ecx, [ebp - 0x13c]
call fcn.00402914
cmp dword [ebp - 4], ebx
jne 0x401e00
lea eax, [ebp - 0x64]
lea edx, [ebp - 0x98]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x13c]
call int.00402ed4
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x401e00
or dword [ebp - 0x38], 0xffffffff
cmp dword [0x40a8b8], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x5c], ebx
mov dword [0x40a8c0], ebx
jne 0x4019ac
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
push 5
push dword [0x40a448]
call edi
push 5
push dword [0x40a8ac]
call edi
push dword [ebp - 0xf4]
push ebx
push 0x406
push dword [0x40a448]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [ebp - 0xf4], ebx
mov dword [ebp - 0xc], ebx
jbe 0x401d91
cmp dword [0x40a8b8], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x24], ebx
jne 0x401a41
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
push 1
push ebx
push ebx
lea eax, [ebp - 0xb4]
push ebx
push eax
call edi
test eax, eax
je 0x401a2c
lea eax, [ebp - 0xb4]
push eax
push dword [0x40a8bc]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x401a12
lea eax, [ebp - 0xb4]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xb4]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp dword [0x40a8bc], ebx
push 1
je 0x401f48
push ebx
push ebx
lea eax, [ebp - 0xb4]
push ebx
push eax
jmp 0x4019db
push ebx
push dword [ebp - 0xc]
push 0x402
push dword [0x40a448]
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [ebp - 0xc]
push ebx
lea ecx, [ebp - 0x13c]
call fcn.00404a56
cmp eax, 0x104
jae 0x401d76
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 0x13c]
lea edi, [eax*2 + 0x40a44c]
push edi
call fcn.00404a56
cmp dword [0x40a8b8], ebx
jne 0x401a89
push edi
push dword [0x40a8ac]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea eax, [ebp - 0x64]
lea edx, [ebp - 0x98]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x13c]
push dword [ebp - 0xc]
call fcn.004048ec
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x401d91
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x2c], 4
cmp word [eax*2 + 0x40a44c], bx
lea eax, [eax*2 + 0x40a44c]
je 0x401b0c
mov eax, dword [ebp - 0x14]
lea eax, [eax*2 + 0x40a44c]
mov edi, eax
cmp word [eax], 0x2f
jne 0x401b03
mov ecx, esi
mov word [edi], bx
call fcn.0040207d
mov word [edi], 0x5c
inc edi
inc edi
mov eax, edi
cmp word [edi], bx
jne 0x401aee
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xec]
and ecx, 7
mov eax, 0x80
sar eax, cl
mov ecx, dword [ebp - 0xc]
shr ecx, 3
mov dword [ebp - 0x48], ecx
test byte [ecx + edx], al
mov dword [ebp - 0x40], eax
je 0x401b3c
mov ecx, esi
call fcn.0040207d
jmp 0x401d63
lea eax, [ebp - 0x560]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp - 8], ebx
je 0x401b9b
cmp dword [ebp - 8], 0x64
ja 0x401d76
lea eax, [ebp - 0x560]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edx, str..tmp
mov ecx, esi
call fcn.004013bf
cmp dword [ebp - 8], 1
jbe 0x401b8f
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 8]
lea edx, [eax*2 + 0x40a44c]
call fcn.00402344
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401bbc
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.00404d6b
mov edi, eax
cmp edi, ebx
je 0x401c92
cmp dword [ebp - 8], ebx
je 0x401bc1
inc dword [ebp - 8]
jmp 0x401b4a
mov eax, dword [ebp - 0x14]
mov edx, str.7_zip.dll
lea ecx, [eax*2 + 0x40a44c]
call fcn.004014ba
test eax, eax
je 0x401c06
mov ecx, esi
call fcn.00401f4e
cmp eax, 0x100003
jb 0x401bfa
cmp eax, 0x140002
ja 0x401bfa
mov dword [ebp - 0x2c], 1
jmp 0x401c86
mov dword [ebp - 0x2c], 2
jmp 0x401c86
cmp dword [0x40a8b8], ebx
jne 0x401c86
mov edx, str.Cant_open_file_n
lea ecx, [ebp - 0xe4c]
call fcn.00401322
lea eax, [ebp - 0xe4c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edx, 0x4084f8
lea ecx, [ebp - 0xe4c]
call fcn.004013bf
lea eax, [ebp - 0xe4c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [ebp + eax*2 - 0xe4c]
mov ecx, edi
call fcn.004028a2
lea eax, [ebp - 0xe4c]
push 0x212
push str.Error
push eax
push dword [0x40a8bc]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 3
je 0x401d7f
cmp eax, 5
jne 0x401b4a
mov dword [ebp - 8], 1
jmp 0x401b4a
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x4c]
lea edx, [eax + ecx]
lea ecx, [ebp - 0x30]
call fcn.00404df9
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov eax, dword [ebp - 0x24]
jne 0x401cbc
cmp dword [ebp - 0x44], eax
je 0x401cca
mov dword [ebp - 0x10], str.Cant_write_output_file
mov dword [ebp - 4], 0xb
add dword [0x40a8c0], eax
mov eax, dword [ebp - 0xd8]
cmp eax, ebx
je 0x401d0b
mov edx, dword [ebp - 0x48]
mov cl, byte [ebp - 0x40]
test byte [edx + eax], cl
je 0x401d0b
mov eax, dword [ebp - 0xd4]
mov ecx, dword [ebp - 0xc]
lea eax, [eax + ecx*8]
mov ecx, dword [eax]
mov dword [ebp - 0x6c], ecx
mov eax, dword [eax + 4]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea ecx, [ebp - 0x30]
call 0x404d73
cmp dword [ebp - 4], ebx
jne 0x401d91
cmp eax, ebx
jne 0x401d8e
mov eax, dword [ebp - 0xe0]
cmp eax, ebx
je 0x401d44
mov edx, dword [ebp - 0x48]
mov cl, byte [ebp - 0x40]
test byte [edx + eax], cl
je 0x401d44
mov eax, dword [ebp - 0xdc]
mov ecx, dword [ebp - 0xc]
push dword [eax + ecx*4]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 8], ebx
je 0x401d63
lea eax, [ebp - 0x560]
push 5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x401d88
mov eax, dword [ebp - 0x2c]
or dword [ebp - 0x28], eax
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0xf4]
jae 0x401d91
jmp 0x4019bb
mov dword [ebp - 4], 0xb
jmp 0x401d91
mov dword [ebp - 4], 0x64
jmp 0x401d91
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x34]
lea ecx, [ebp - 0x1c]
call dword [ebp - 0x18]
cmp dword [0x40a8b8], ebx
jne 0x401db7
push ebx
push dword [ebp - 0xc]
push 0x402
push dword [0x40a448]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0x14]
mov word [eax*2 + 0x40a44c], bx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0xf4]
jne 0x401e00
call fcn.00402391
call fcn.004025d4
call fcn.00402699
mov ecx, dword [0x40a8bc]
call fcn.0040243d
cmp dword [0x40a8b8], ebx
jne 0x401e00
push str.7_Zip_20.02_alpha_is_installed
push dword [0x40a8ac]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x13c]
call fcn.0040297f
mov edx, dword [ebp - 0x7c]
lea ecx, [ebp - 0x1c]
call dword [ebp - 0x18]
lea ecx, [ebp - 0x50]
call 0x404d73
mov esi, dword [ebp - 0x20]
mov edi, 0x104
cmp esi, ebx
je 0x401e32
mov dword [ebp - 4], 0xb
cmp dword [ebp - 4], ebx
jne 0x401ec4
cmp dword [0x40a8b8], ebx
jne 0x401ebd
cmp dword [ebp - 0x28], 1
jle 0x401ebd
push edi
push dword [0x40815c]
push str.You_must_restart_your_system_to_complete_the_installation._nRestart_now_
push dword [0x40a8bc]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
jne 0x401ebd
lea eax, [ebp - 0x38]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401ebd
lea eax, [ebp - 0x70]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
lea eax, [ebp - 0x74]
mov dword [ebp - 0x74], 1
push 2
pop esi
push ebx
push ebx
push ebx
push eax
push ebx
mov dword [ebp - 0x68], esi
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401ebd
push ebx
push esi
call dword [sym.imp.USER32.dll_ExitWindowsEx]
xor eax, eax
jmp 0x401f49
cmp dword [0x40a8b8], ebx
jne 0x401f46
cmp esi, ebx
je 0x401eee
lea edx, [ebp - 0x40c]
mov ecx, esi
mov word [ebp - 0x40c], bx
call fcn.004028a2
lea edx, [ebp - 0x40c]
xor ecx, ecx
jmp 0x401f41
mov eax, dword [ebp - 4]
cmp eax, 0x64
jne 0x401efa
push 2
jmp 0x401f48
cmp eax, 4
jne 0x401f08
mov dword [ebp - 0x10], str.Decoder_doesnt_support_this_archive
jmp 0x401f30
cmp eax, 2
jne 0x401f16
mov dword [ebp - 0x10], str.Cant_allocate_required_memory
jmp 0x401f30
cmp eax, 3
jne 0x401f24
mov dword [ebp - 0x10], str.CRC_error
jmp 0x401f30
cmp eax, 1
jne 0x401f30
mov dword [ebp - 0x10], str.Data_error
cmp dword [ebp - 0x10], ebx
jne 0x401f3c
mov dword [ebp - 0x10], str.ERROR
mov ecx, dword [ebp - 0x10]
xor edx, edx
call fcn.00401335
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret