Function at 0x401798
Capabilities:
Check if file exists
Get file attributes
Move file
Set file attributes
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe50
push ebx
push esi
push edi
mov edi, 0x104
lea eax, [ebp - 0x770]
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], 0x402903
mov dword [ebp - 0x18], 0x402913
mov dword [ebp - 0x58], 0x402903
mov dword [ebp - 0x54], 0x402913
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, ebx
je 0x401f49
cmp eax, edi
ja 0x401f49
lea edx, [ebp - 0x770]
lea ecx, [ebp - 0x70]
call fcn.00404d43
mov esi, eax
cmp esi, ebx
jne 0x401833
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call fcn.00402252
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 - 0x70]
call fcn.00404e82
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 0x401e2a
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 - 0x78]
call fcn.00404ef6
xor edx, edx
lea ecx, [ebp - 0x9c]
call fcn.00405657
mov ecx, esi
mov dword [ebp - 0x80], ebx
call fcn.004028b1
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 0x401f44
mov ecx, esi
call fcn.00401402
call fcn.00402097
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 0x40192d
mov edi, 0x40000
lea ecx, [ebp - 0x1c]
mov edx, edi
call dword [ebp - 0x1c]
cmp eax, ebx
mov dword [ebp - 0x80], eax
jne 0x401915
mov dword [ebp - 4], 2
jmp 0x40192d
lea eax, [ebp - 0x78]
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x88], ebx
lea ecx, [ebp - 0x140]
call fcn.0040291c
cmp dword [ebp - 4], ebx
jne 0x401e03
lea eax, [ebp - 0x58]
lea edx, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x140]
call fcn.00402efb
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x401e03
or dword [ebp - 0x38], 0xffffffff
cmp dword [0x40a8b8], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x50], ebx
mov dword [0x40a8c0], ebx
jne 0x4019af
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 - 0xf8]
push ebx
push 0x406
push dword [0x40a448]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [ebp - 0xf8], ebx
mov dword [ebp - 0xc], ebx
jbe 0x401d94
cmp dword [0x40a8b8], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x24], ebx
jne 0x401a44
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
push 1
push ebx
push ebx
lea eax, [ebp - 0xb8]
push ebx
push eax
call edi
test eax, eax
je 0x401a2f
lea eax, [ebp - 0xb8]
push eax
push dword [0x40a8bc]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x401a15
lea eax, [ebp - 0xb8]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xb8]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp dword [0x40a8bc], ebx
push 1
je 0x401f4b
push ebx
push ebx
lea eax, [ebp - 0xb8]
push ebx
push eax
jmp 0x4019de
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 - 0x140]
call fcn.00404a7d
cmp eax, 0x104
jae 0x401d79
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
lea ecx, [ebp - 0x140]
lea edi, [eax*2 + 0x40a44c]
push edi
call fcn.00404a7d
cmp dword [0x40a8b8], ebx
jne 0x401a8c
push edi
push dword [0x40a8ac]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea eax, [ebp - 0x58]
lea edx, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x140]
push dword [ebp - 0xc]
call fcn.00404913
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x401d94
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 0x401b0f
mov eax, dword [ebp - 0x14]
lea eax, [eax*2 + 0x40a44c]
mov edi, eax
cmp word [eax], 0x2f
jne 0x401b06
mov ecx, esi
mov word [edi], bx
call fcn.00402080
mov word [edi], 0x5c
inc edi
inc edi
mov eax, edi
cmp word [edi], bx
jne 0x401af1
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xf0]
and ecx, 7
mov eax, 0x80
sar eax, cl
mov ecx, dword [ebp - 0xc]
shr ecx, 3
mov dword [ebp - 0x4c], ecx
test byte [ecx + edx], al
mov dword [ebp - 0x40], eax
je 0x401b3f
mov ecx, esi
call fcn.00402080
jmp 0x401d66
lea eax, [ebp - 0x564]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp - 8], ebx
je 0x401b9e
cmp dword [ebp - 8], 0x64
ja 0x401d79
lea eax, [ebp - 0x564]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edx, str..tmp
mov ecx, esi
call fcn.00401369
cmp dword [ebp - 8], 1
jbe 0x401b92
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 8]
lea edx, [eax*2 + 0x40a44c]
call fcn.00402347
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401bbf
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.00404d92
mov edi, eax
cmp edi, ebx
je 0x401c95
cmp dword [ebp - 8], ebx
je 0x401bc4
inc dword [ebp - 8]
jmp 0x401b4d
mov eax, dword [ebp - 0x14]
mov edx, str.7_zip.dll
lea ecx, [eax*2 + 0x40a44c]
call fcn.00401464
test eax, eax
je 0x401c09
mov ecx, esi
call fcn.00401f51
cmp eax, 0x100003
jb 0x401bfd
cmp eax, 0x160001
ja 0x401bfd
mov dword [ebp - 0x2c], 1
jmp 0x401c89
mov dword [ebp - 0x2c], 2
jmp 0x401c89
cmp dword [0x40a8b8], ebx
jne 0x401c89
mov edx, str.Cant_open_file_n
lea ecx, [ebp - 0xe50]
call fcn.004012cc
lea eax, [ebp - 0xe50]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edx, 0x4084e0
lea ecx, [ebp - 0xe50]
call fcn.00401369
lea eax, [ebp - 0xe50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [ebp + eax*2 - 0xe50]
mov ecx, edi
call fcn.004028c9
lea eax, [ebp - 0xe50]
push 0x212
push str.Error
push eax
push dword [0x40a8bc]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 3
je 0x401d82
cmp eax, 5
jne 0x401b4d
mov dword [ebp - 8], 1
jmp 0x401b4d
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 - 0x48]
lea edx, [eax + ecx]
lea ecx, [ebp - 0x30]
call fcn.00404e20
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov eax, dword [ebp - 0x24]
jne 0x401cbf
cmp dword [ebp - 0x44], eax
je 0x401ccd
mov dword [ebp - 0x10], str.Cant_write_output_file
mov dword [ebp - 4], 0xb
add dword [0x40a8c0], eax
mov eax, dword [ebp - 0xdc]
cmp eax, ebx
je 0x401d0e
mov edx, dword [ebp - 0x4c]
mov cl, byte [ebp - 0x40]
test byte [edx + eax], cl
je 0x401d0e
mov eax, dword [ebp - 0xd8]
mov ecx, dword [ebp - 0xc]
lea eax, [eax + ecx*8]
mov ecx, dword [eax]
mov dword [ebp - 0x60], ecx
mov eax, dword [eax + 4]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x60]
push eax
push ebx
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea ecx, [ebp - 0x30]
call fcn.00404d9a
cmp dword [ebp - 4], ebx
jne 0x401d94
cmp eax, ebx
jne 0x401d91
mov eax, dword [ebp - 0xe4]
cmp eax, ebx
je 0x401d47
mov edx, dword [ebp - 0x4c]
mov cl, byte [ebp - 0x40]
test byte [edx + eax], cl
je 0x401d47
mov eax, dword [ebp - 0xe0]
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 0x401d66
lea eax, [ebp - 0x564]
push 5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x401d8b
mov eax, dword [ebp - 0x2c]
or dword [ebp - 0x28], eax
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0xf8]
jae 0x401d94
jmp 0x4019be
mov dword [ebp - 4], 0xb
jmp 0x401d94
mov dword [ebp - 4], 0x64
jmp 0x401d94
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 0x401dba
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 - 0xf8]
jne 0x401e03
call fcn.00402394
call fcn.004025d7
call fcn.0040269c
mov ecx, dword [0x40a8bc]
call fcn.00402440
cmp dword [0x40a8b8], ebx
jne 0x401e03
push str.7_Zip_22.01_is_installed
push dword [0x40a8ac]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x140]
call fcn.00402987
mov edx, dword [ebp - 0x80]
lea ecx, [ebp - 0x1c]
call dword [ebp - 0x18]
lea ecx, [ebp - 0x70]
call fcn.00404d9a
mov esi, dword [ebp - 0x20]
mov edi, 0x104
cmp esi, ebx
je 0x401e35
mov dword [ebp - 4], 0xb
cmp dword [ebp - 4], ebx
jne 0x401ec7
cmp dword [0x40a8b8], ebx
jne 0x401ec0
cmp dword [ebp - 0x28], 1
jle 0x401ec0
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 0x401ec0
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 0x401ec0
lea eax, [ebp - 0x64]
push eax
push str.SeShutdownPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x68], 1
push 2
pop esi
push ebx
push ebx
push ebx
push eax
push ebx
mov dword [ebp - 0x5c], esi
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401ec0
push ebx
push esi
call dword [sym.imp.USER32.dll_ExitWindowsEx]
xor eax, eax
jmp 0x401f4c
cmp dword [0x40a8b8], ebx
jne 0x401f49
cmp esi, ebx
je 0x401ef1
lea edx, [ebp - 0x410]
mov ecx, esi
mov word [ebp - 0x410], bx
call fcn.004028c9
lea edx, [ebp - 0x410]
xor ecx, ecx
jmp 0x401f44
mov eax, dword [ebp - 4]
cmp eax, 0x64
jne 0x401efd
push 2
jmp 0x401f4b
cmp eax, 4
jne 0x401f0b
mov dword [ebp - 0x10], str.Decoder_doesnt_support_this_archive
jmp 0x401f33
cmp eax, 2
jne 0x401f19
mov dword [ebp - 0x10], str.Cant_allocate_required_memory
jmp 0x401f33
cmp eax, 3
jne 0x401f27
mov dword [ebp - 0x10], str.CRC_error
jmp 0x401f33
cmp eax, 1
jne 0x401f33
mov dword [ebp - 0x10], str.Data_error
cmp dword [ebp - 0x10], ebx
jne 0x401f3f
mov dword [ebp - 0x10], str.ERROR
mov ecx, dword [ebp - 0x10]
xor edx, edx
call fcn.004012df
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret