Function at 0x402dd0
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x624
mov esi, edx
mov edi, ecx
mov eax, dword [0x440014]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [ebp + 8], 0
je 0x402e7b
mov ebx, str._s.moz_backup
mov ecx, 0x104
lea eax, [ebp - 0x62a]
push edi
push ebx
push ecx
push eax
call fcn.00404340
add esp, 0x10
lea eax, [ebp - 0x218]
push esi
mov esi, eax
push ebx
mov eax, 0x104
push eax
push esi
call fcn.00404340
add esp, 0x10
push 0
lea eax, [ebp - 0x62a]
push eax
call fcn.0041d88c
add esp, 8
test eax, eax
je 0x402fe7
mov eax, dword [0x4426f4]
mov ecx, dword [0x440c90]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x40305f
push esi
push str.backup_restore:_backup_file_doesnt_exist:__S
push 0x4424e8
call fcn.00410520
add esp, 0xc
jmp 0x402ff9
mov eax, str._s.moz_backup
mov ecx, 0x104
lea ebx, [ebp - 0x218]
push edi
push eax
mov edi, str._s.moz_backup
push ecx
push ebx
call fcn.00404340
add esp, 0x10
lea eax, [ebp - 0x420]
mov dword [ebp - 0x630], esi
push esi
mov esi, ebx
push edi
mov ecx, 0x104
push ecx
mov ebx, eax
push eax
call fcn.00404340
add esp, 0x10
push 0
push esi
call fcn.0041d88c
add esp, 8
test eax, eax
jne 0x402ff9
push 0x180
push esi
call fcn.0041db14
add esp, 8
push esi
call fcn.0041e22e
add esp, 4
test eax, eax
je 0x402ff9
mov edi, eax
mov eax, dword [0x4426f4]
mov ecx, dword [0x440c90]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4030a2
call fcn.00419e69
push dword [eax]
push edi
push esi
push str.ensure_remove:_failed_to_remove_file:__S__rv:__d__err:__d
push 0x4424e8
call fcn.00410520
add esp, 0x14
cmp byte [0x441ab0], 0
jne 0x402ff9
cmp byte [0x4422dd], 0
jne 0x402ff9
mov eax, dword [0x4426f4]
mov ecx, dword [0x440c90]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4030e5
push ebx
push str.backup_discard:_unable_to_remove:__S
push 0x4424e8
call fcn.00410520
add esp, 0xc
lea edi, [ebp - 0x62a]
push edi
push 0x43a362
push 0x4422e0
call fcn.004327d0
add esp, 0xc
lea ecx, [ebp - 0x218]
mov edx, edi
push 0
call fcn.0040a140
add esp, 4
test eax, eax
mov esi, dword [ebp - 0x630]
je 0x40300e
mov eax, dword [0x4426f4]
mov ecx, dword [0x440c90]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403128
push esi
push ebx
push str.backup_discard:_failed_to_rename_file:_S__dst:_S
push 0x4424e8
call fcn.00410520
add esp, 0x10
jmp 0x402ff9
lea ecx, [ebp - 0x62a]
mov edx, edi
push 0
call fcn.0040a140
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412e03
add esp, 0x624
pop esi
pop edi
pop ebx
pop ebp
ret
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [0x440c90]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4426f4]
mov edx, dword [edx + 4]
test eax, eax
je 0x40304c
cmp ecx, edx
jg 0x40316b
push esi
push str.backup_discard:_file_renamed_and_will_be_removed_on_OS_reboot:__S
jmp 0x402e69
cmp ecx, edx
jg 0x4031ae
push esi
push str.backup_discard:_failed_to_schedule_OS_reboot_removal_of_file:__S
jmp 0x402e69
push 0x4426f4
call fcn.00412457
add esp, 4
cmp dword [0x4426f4], 0xffffffff
jne 0x402e63
mov dword [0x4424e8], 0
push 0x40a110
call fcn.0041261c
add esp, 4
push 0x4426f4
call fcn.004124a9
add esp, 4
jmp 0x402e63
push 0x4426f4
call fcn.00412457
add esp, 4
cmp dword [0x4426f4], 0xffffffff
jne 0x402f12
mov dword [0x4424e8], 0
push 0x40a110
call fcn.0041261c
add esp, 4
push 0x4426f4
call fcn.004124a9
add esp, 4
jmp 0x402f12
push 0x4426f4
call fcn.00412457
add esp, 4
cmp dword [0x4426f4], 0xffffffff
jne 0x402f68
mov dword [0x4424e8], 0
push 0x40a110
call fcn.0041261c
add esp, 4
push 0x4426f4
call fcn.004124a9
add esp, 4
jmp 0x402f68
push 0x4426f4
call fcn.00412457
add esp, 4
cmp dword [0x4426f4], 0xffffffff
jne 0x402fd1
mov dword [0x4424e8], 0
push 0x40a110
call fcn.0041261c
add esp, 4
push 0x4426f4
call fcn.004124a9
add esp, 4
jmp 0x402fd1
push 0x4426f4
call fcn.00412457
add esp, 4
cmp dword [0x4426f4], 0xffffffff
jne 0x403041
mov dword [0x4424e8], 0
push 0x40a110
call fcn.0041261c
add esp, 4
push 0x4426f4
call fcn.004124a9
add esp, 4
jmp 0x403041
push 0x4426f4
call fcn.00412457
add esp, 4
cmp dword [0x4426f4], 0xffffffff
jne 0x403054
mov dword [0x4424e8], 0
push 0x40a110
call fcn.0041261c
add esp, 4
push 0x4426f4
call fcn.004124a9
add esp, 4
jmp 0x403054