Function at 0x406c31
Capabilities:
Check if file exists
Delete directory
Delete file
Move file

Disassembly:
push 0x4bc
mov eax, 0x47de8f
call fcn.0047a79b
mov edi, ecx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
cmp byte [edi], 0
je 0x4079f4
xor ebx, ebx
mov byte [edi], bl
cmp dword [edi + 4], ebx
jne 0x4079e5
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x406f3b
lea ecx, [eax - 1]
cmp dword [edi + 4], ebx
jne 0x406f27
cmp ecx, dword [edi + 0xc]
jae 0x406f27
mov eax, dword [edi + 8]
push dword [eax + ecx*4]
mov ecx, 0x4cabb4
call fcn.0040f15c
mov esi, eax
push str.Revert:
lea ecx, [ebp - 0x7c]
call fcn.00412a26
mov dword [ebp - 4], ebx
cmp byte [esi + 0x2b], 0
je 0x406cb2
mov eax, str.Renaming
push 8
jmp 0x406cb9
mov eax, str.Moving
push 6
pop ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x54], eax
push ecx
push eax
lea ecx, [ebp - 0x7c]
call fcn.00416670
lea edi, [esi + 8]
push edi
mov edx, str._file_
lea ecx, [ebp - 0x180]
call fcn.0041290c
mov byte [ebp - 4], 1
mov dword [esp], str._back_from_temporary
mov edx, eax
lea ecx, [ebp - 0x170]
call fcn.00412a5f
pop ecx
mov byte [ebp - 4], 2
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x7c]
call fcn.00416550
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x170]
call fcn.004100f5
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x180]
call fcn.004100f5
cmp byte [esi + 0x2b], 0
je 0x406d33
mov eax, str.file
push 5
jmp 0x406d3a
mov eax, str._trash_directory
push 0x11
pop ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x5c], eax
push ecx
push eax
lea ecx, [ebp - 0x7c]
call fcn.00416670
mov dword [ebp - 0x28], ebx
cmp dword [edi + 8], ebx
je 0x406d58
mov ecx, dword [edi + 4]
jmp 0x406d5d
mov ecx, 0x4ca5a8
cmp dword [esi + 0x20], ebx
je 0x406d67
mov eax, dword [esi + 0x1c]
jmp 0x406d6c
mov eax, 0x4ca5a8
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406ee0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
cmp dword [ebp - 0x28], 0x64
jg 0x406da0
cmp ecx, 2
je 0x406da0
cmp ecx, 3
je 0x406da0
call dword [sym.imp.KERNEL32.dll_SwitchToThread]
inc dword [ebp - 0x28]
jmp 0x406d4e
or dword [0x4cabcc], 0x100000
push ecx
push ecx
mov eax, esp
mov dword [eax], str.MoveFileEx__
mov dword [eax + 4], 0xc
push ecx
push ebx
push ecx
lea ecx, [ebp - 0x4c8]
call fcn.004024a8
mov ebx, eax
mov byte [ebp - 4], 7
mov ecx, dword [ebx]
lea eax, [ebp - 0x100]
push eax
mov edi, dword [ecx]
mov ecx, edi
call dword [0x48d4b4]
mov ecx, ebx
call edi
push dword [eax + 4]
push dword [eax]
lea ecx, [ebp - 0xe8]
call fcn.00410214
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x4c8]
call fcn.004025b0
push str.failed:
lea edx, [ebp - 0x7c]
lea ecx, [ebp - 0x1a0]
call fcn.00412085
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xe8]
push ecx
mov edx, eax
lea ecx, [ebp - 0x190]
call fcn.00411a06
pop ecx
pop ecx
mov byte [ebp - 4], 0xb
push 2
pop edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x190]
call fcn.004100f5
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x1a0]
call fcn.004100f5
xor ebx, ebx
cmp dword [esi + 0x20], ebx
je 0x406e6a
mov eax, dword [esi + 0x1c]
jmp 0x406e6f
mov eax, 0x4ca5a8
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406ed5
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x108]
push eax
lea ecx, [esi + 0x18]
call fcn.0041011a
push dword [eax + 4]
push dword [eax]
lea ecx, [ebp - 0x3e8]
call fcn.00441b30
mov byte [ebp - 4], 0xf
mov ecx, eax
call fcn.00441f50
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x3e8]
call fcn.0040355c
mov dword [ebp - 4], 9
jmp 0x406ed5
mov byte [ebp - 4], bl
lea ecx, [ebp - 0xe8]
jmp 0x406f0a
push str.succeeded.
lea edx, [ebp - 0x7c]
lea ecx, [ebp - 0x1b0]
call fcn.00411e8a
pop ecx
mov byte [ebp - 4], 5
xor edx, edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x1b0]
call fcn.004100f5
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c]
call fcn.004100f5
mov eax, dword [ebp - 0x2c]
dec eax
mov edi, dword [ebp - 0x34]
jmp 0x406c61
push 0x1f1
mov edx, str.datavect_unsigned_int_::operator___
mov ecx, str._af___i_s_
call fcn.00417c20
lea ecx, [edi + 0x14]
call fcn.0040eca8
mov dword [ebp - 0x34], eax
test eax, eax
je 0x4072fd
lea ecx, [eax - 1]
cmp dword [edi + 0x14], ebx
jne 0x4072e9
cmp dword [edi + 0x18], ebx
jne 0x4072da
cmp ecx, dword [edi + 0x20]
jae 0x4072da
mov eax, dword [edi + 0x1c]
mov esi, dword [eax + ecx*4]
add esi, 0x10
mov dword [ebp - 0x2c], esi
push esi
mov edx, str.Removing_temporary_trash_directory_
lea ecx, [ebp - 0x1c0]
call fcn.00412aaf
mov dword [ebp - 4], 0x14
mov dword [esp], 0x49a95c
mov edx, eax
lea ecx, [ebp - 0x6c]
call fcn.00411db0
pop ecx
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x1c0]
call fcn.004100f5
cmp dword [esi + 8], ebx
je 0x406fbb
mov eax, dword [esi + 4]
jmp 0x406fc0
mov eax, 0x4ca5a8
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x407000
push str.succeeded.
lea edx, [ebp - 0x6c]
lea ecx, [ebp - 0x1d0]
call fcn.00411e8a
pop ecx
mov byte [ebp - 4], 0x18
xor edx, edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x1d0]
call fcn.004100f5
jmp 0x40724c
push ecx
push ecx
mov eax, esp
mov dword [eax], str.RemoveDirectory__
mov dword [eax + 4], 0x11
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push eax
lea ecx, [ebp - 0x464]
call fcn.004024a8
mov byte [ebp - 4], 0x1a
mov eax, dword [ebp - 0x430]
cmp dword [ebp - 0x434], 2
jne 0x40703c
cmp eax, ebx
je 0x407049
cmp dword [ebp - 0x434], 3
jne 0x4070b4
cmp eax, ebx
jne 0x4070b4
push str.failed:
lea edx, [ebp - 0x6c]
lea ecx, [ebp - 0x1f0]
call fcn.00412085
pop ecx
mov esi, eax
mov byte [ebp - 4], 0x1b
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x464]
call fcn.0042c540
push dword [eax + 4]
push dword [eax]
mov edx, esi
lea ecx, [ebp - 0x1e0]
call fcn.00411e00
pop ecx
pop ecx
mov byte [ebp - 4], 0x1c
xor edx, edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x1b
lea ecx, [ebp - 0x1e0]
call fcn.004100f5
mov byte [ebp - 4], 0x1a
lea ecx, [ebp - 0x1f0]
jmp 0x407238
push str.failed:
lea edx, [ebp - 0x6c]
lea ecx, [ebp - 0x210]
call fcn.00412085
pop ecx
mov esi, eax
mov byte [ebp - 4], 0x1f
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x464]
call fcn.0042c540
push dword [eax + 4]
push dword [eax]
mov edx, esi
lea ecx, [ebp - 0x200]
call fcn.00411e00
pop ecx
pop ecx
mov byte [ebp - 4], 0x20
xor edx, edx
inc edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x1f
lea ecx, [ebp - 0x200]
call fcn.004100f5
mov byte [ebp - 4], 0x1a
lea ecx, [ebp - 0x210]
call fcn.004100f5
mov byte [ebp - 0x21], bl
mov byte [ebp - 4], 0x23
lea eax, [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x2c]
call fcn.0041011a
push dword [eax + 4]
push dword [eax]
lea ecx, [ebp - 0x400]
call fcn.00441b30
mov byte [ebp - 4], 0x24
mov ecx, eax
call fcn.00441f50
mov byte [ebp - 4], 0x23
lea ecx, [ebp - 0x400]
call fcn.0040355c
mov byte [ebp - 0x21], 1
mov dword [ebp - 4], 0x1a
jmp 0x407211
push ecx
lea edx, [ebp - 0x6c]
lea ecx, [ebp - 0x240]
call fcn.00412b67
pop ecx
mov byte [ebp - 4], 0x30
xor edx, edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x1a
lea ecx, [ebp - 0x240]
call fcn.004100f5
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x464]
call fcn.004025b0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004100f5
mov eax, dword [ebp - 0x34]
dec eax
jmp 0x406f43
push 0x1f1
mov edx, str.datavect_struct_Uninst::MoveFilesToTrash::Trash__::operator___
jmp 0x406f31
push 0x182
mov edx, str.ncvector_struct_Uninst::MoveFilesToTrash::Trash_::operator___
mov ecx, str._af_
jmp 0x406f36
mov dword [ebp - 0x20], 7
mov dword [ebp - 0x1c], 6
mov dword [ebp - 0x18], 5
lea edi, [ebp - 0x20]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], edi
cmp edi, dword [ebp - 0x34]
je 0x4079f4
mov eax, dword [edi]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
push eax
mov ecx, 0x4cabb4
call fcn.0040f1e2
lea eax, [ebp - 0x8c]
push eax
mov ecx, 0x4cabb4
call fcn.0040f1ab
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x88]
jne 0x407366
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x8c]
jne 0x407366
add edi, 4
jmp 0x40731b
lea ecx, [ebp - 0x3c]
call fcn.0040f135
mov dword [ebp - 0x30], eax
mov ecx, dword [eax + 4]
cmp ecx, dword [ebp - 0x2c]
jne 0x407563
cmp byte [eax + 0x2c], 0
je 0x407563
sub ecx, 5
je 0x4077f5
sub ecx, 1
je 0x40756b
sub ecx, 1
jne 0x407563
mov dword [ebp - 4], 0x33
lea esi, [eax + 8]
lea eax, [ebp - 0x94]
push eax
mov ecx, esi
call fcn.0041011a
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0x98], ecx
cmp ecx, 4
jb 0x40742f
push ecx
push ecx
mov eax, esp
mov dword [ebp - 0x4c], eax
mov dword [eax], str..EXE
mov dword [eax + 4], 4
lea eax, [ecx - 4]
push eax
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x9c]
call fcn.004104c5
push dword [eax + 4]
push dword [eax]
xor ecx, ecx
inc ecx
call fcn.00402009
add esp, 0x10
test eax, eax
jne 0x40742f
lea eax, [ebp - 0x140]
push eax
mov ecx, esi
call fcn.0041011a
push dword [eax + 4]
push dword [eax]
call fcn.00450c80
jmp 0x407447
lea eax, [ebp - 0x148]
push eax
mov ecx, esi
call fcn.0041011a
push dword [eax + 4]
push dword [eax]
call fcn.00450660
pop ecx
pop ecx
push esi
mov edx, str.Revert:_Registering_server_
lea ecx, [ebp - 0x260]
call fcn.00412bb9
mov byte [ebp - 4], 0x34
mov dword [esp], 0x49a76c
mov edx, eax
lea ecx, [ebp - 0x250]
call fcn.00412774
pop ecx
mov byte [ebp - 4], 0x35
xor edx, edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x36
mov byte [ebp - 4], 0x34
lea ecx, [ebp - 0x250]
call fcn.004100f5
mov byte [ebp - 4], 0x37
mov byte [ebp - 4], 0x33
lea ecx, [ebp - 0x260]
jmp 0x40786f
inc dword [ebp - 0x3c]
jmp 0x40734b
lea esi, [eax + 8]
push esi
mov edx, str.Revert:_Registering_service_
lea ecx, [ebp - 0x2b0]
call fcn.00412c1f
mov dword [ebp - 4], 0x41
mov dword [esp], 0x49a95c
mov edx, eax
lea ecx, [ebp - 0xb4]
call fcn.00411db0
pop ecx
mov byte [ebp - 4], 0x43
lea ecx, [ebp - 0x2b0]
call fcn.004100f5
mov byte [ebp - 4], 0x45
mov dword [ebp - 0xbc], 3
push esi
mov edx, 0x49aac8
lea ecx, [ebp - 0x2d0]
call fcn.00412ced
mov byte [ebp - 4], 0x46
mov dword [esp], str.___service
mov edx, eax
lea ecx, [ebp - 0x2c0]
call fcn.00411e8a
pop ecx
mov byte [ebp - 4], 0x47
lea ecx, [ebp - 0x150]
push ecx
mov ecx, eax
call fcn.0041011a
push dword [eax + 4]
push dword [eax]
push 3
pop ecx
call fcn.00451e10
pop ecx
pop ecx
mov esi, eax
mov dword [ebp - 0x44], esi
mov byte [ebp - 4], 0x48
mov byte [ebp - 4], 0x46
lea ecx, [ebp - 0x2c0]
call fcn.004100f5
mov byte [ebp - 4], 0x49
mov byte [ebp - 4], 0x45
lea ecx, [ebp - 0x2d0]
call fcn.004100f5
mov dword [ebp - 4], 0x43
test esi, esi
jne 0x40766c
push str.succeeded.
lea edx, [ebp - 0xb4]
lea ecx, [ebp - 0x2e0]
call fcn.00411e8a
pop ecx
mov byte [ebp - 4], 0x54
xor edx, edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x43
lea ecx, [ebp - 0x2e0]
jmp 0x407716
or dword [0x4cabcc], 0x100000
push ecx
push ebx
push ebx
push dword [ebp - 0x44]
push 0xa
pop edx
lea ecx, [ebp - 0x320]
call fcn.00401efa
mov esi, eax
mov byte [ebp - 4], 0x56
push str.failed:_Error_code
lea edx, [ebp - 0xb4]
lea ecx, [ebp - 0x310]
call fcn.00412d3f
mov byte [ebp - 4], 0x57
push esi
mov edx, eax
lea ecx, [ebp - 0x300]
call fcn.00411a06
mov byte [ebp - 4], 0x58
push 0x49aacc
mov edx, eax
lea ecx, [ebp - 0x2f0]
call fcn.00411e8a
add esp, 0x1c
mov byte [ebp - 4], 0x59
push 2
pop edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x58
lea ecx, [ebp - 0x2f0]
call fcn.004100f5
mov byte [ebp - 4], 0x57
lea ecx, [ebp - 0x300]
call fcn.004100f5
mov byte [ebp - 4], 0x56
lea ecx, [ebp - 0x310]
call fcn.004100f5
mov byte [ebp - 4], 0x43
lea ecx, [ebp - 0x320]
call fcn.004100f5
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xb4]
call fcn.004100f5
jmp 0x407563
mov dword [ebp - 4], 0x5f
lea esi, [eax + 8]
lea eax, [ebp - 0x158]
push eax
mov ecx, esi
call fcn.0041011a
push dword [eax + 4]
push dword [eax]
call fcn.00405c47
push esi
mov edx, str.Revert:_Starting_service_
lea ecx, [ebp - 0x380]
call fcn.00412d8f
mov byte [ebp - 4], 0x60
push 0x49a76c
mov edx, eax
lea ecx, [ebp - 0x370]
call fcn.00412774
add esp, 0x10
mov byte [ebp - 4], 0x61
xor edx, edx
mov ecx, eax
call fcn.00404b3c
mov byte [ebp - 4], 0x62
mov byte [ebp - 4], 0x60
lea ecx, [ebp - 0x370]
call fcn.004100f5
mov byte [ebp - 4], 0x63
mov byte [ebp - 4], 0x5f
lea ecx, [ebp - 0x380]
call fcn.004100f5
or dword [ebp - 4], 0xffffffff
jmp 0x407563
push 0x1e7
mov edx, str.datavect_unsigned_int_::size
jmp 0x4072f3
call fcn.0047a6e8
ret