Function at 0x402980
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x624
mov eax, dword [0x43d00c]
mov esi, edx
mov edi, ecx
xor eax, ebp
cmp dword [ebp + 8], 0
mov dword [ebp - 0x10], eax
je 0x402a2b
mov ecx, str._s.moz_backup
mov ebx, 0x104
lea eax, [ebp - 0x62a]
push edi
push ecx
push ebx
push eax
call fcn.00403e90
add esp, 0x10
lea eax, [ebp - 0x218]
push esi
mov esi, eax
mov eax, str._s.moz_backup
push eax
push ebx
push esi
call fcn.00403e90
add esp, 0x10
push 0
lea eax, [ebp - 0x62a]
push eax
call fcn.0041ca95
add esp, 8
test eax, eax
je 0x402b97
mov ecx, dword [0x43db8c]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43f5f4]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402c02
push esi
push str.backup_restore:_backup_file_doesnt_exist:__S
push 0x43f3e8
call fcn.0040ff00
add esp, 0xc
jmp 0x402ba9
lea ebx, [ebp - 0x218]
mov eax, str._s.moz_backup
mov ecx, 0x104
push edi
push eax
mov edi, str._s.moz_backup
push ecx
push ebx
call fcn.00403e90
add esp, 0x10
lea eax, [ebp - 0x420]
mov dword [ebp - 0x630], esi
push esi
mov esi, ebx
push edi
mov ebx, eax
mov eax, 0x104
push eax
push ebx
call fcn.00403e90
add esp, 0x10
push 0
push esi
call fcn.0041ca95
add esp, 8
test eax, eax
jne 0x402ba9
push 0x180
push esi
call fcn.0041cd28
add esp, 8
push esi
call fcn.0041d4db
add esp, 4
test eax, eax
je 0x402ba9
mov ecx, dword [0x43db8c]
mov edx, dword fs:[0x2c]
mov edi, eax
mov eax, dword [0x43f5f4]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402c45
call fcn.0041984c
push dword [eax]
push edi
push esi
push str.ensure_remove:_failed_to_remove_file:__S__rv:__d__err:__d
push 0x43f3e8
call fcn.0040ff00
add esp, 0x14
cmp byte [0x43e9b0], 0
jne 0x402ba9
cmp byte [0x43f1dd], 0
jne 0x402ba9
mov ecx, dword [0x43db8c]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43f5f4]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402c88
push ebx
push str.backup_discard:_unable_to_remove:__S
push 0x43f3e8
call fcn.0040ff00
add esp, 0xc
lea edi, [ebp - 0x62a]
push edi
push 0x437b4a
push 0x43f1de
call fcn.00411320
add esp, 0xc
lea ecx, [ebp - 0x218]
mov edx, edi
push 0
call fcn.00409c70
add esp, 4
mov esi, dword [ebp - 0x630]
test eax, eax
je 0x402bbe
mov ecx, dword [0x43db8c]
mov edx, dword fs:[0x2c]
mov eax, dword [0x43f5f4]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402ccb
push esi
push ebx
push str.backup_discard:_failed_to_rename_file:_S__dst:_S
push 0x43f3e8
call fcn.0040ff00
add esp, 0x10
jmp 0x402ba9
lea ecx, [ebp - 0x62a]
mov edx, edi
push 0
call fcn.00409c70
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412591
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 [0x43db8c]
mov edx, dword fs:[0x2c]
mov edi, eax
mov eax, dword [0x43f5f4]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x402d0e
test edi, edi
mov eax, str.backup_discard:_failed_to_schedule_OS_reboot_removal_of_file:__S
mov ecx, str.backup_discard:_file_renamed_and_will_be_removed_on_OS_reboot:__S
cmove ecx, eax
push esi
push ecx
jmp 0x402a19
push 0x43f5f4
call fcn.00411d87
add esp, 4
cmp dword [0x43f5f4], 0xffffffff
jne 0x402a13
mov dword [0x43f3e8], 0
push 0x409c40
call fcn.00411ffc
add esp, 4
push 0x43f5f4
call fcn.00411dd9
add esp, 4
jmp 0x402a13
push 0x43f5f4
call fcn.00411d87
add esp, 4
cmp dword [0x43f5f4], 0xffffffff
jne 0x402ac2
mov dword [0x43f3e8], 0
push 0x409c40
call fcn.00411ffc
add esp, 4
push 0x43f5f4
call fcn.00411dd9
add esp, 4
jmp 0x402ac2
push 0x43f5f4
call fcn.00411d87
add esp, 4
cmp dword [0x43f5f4], 0xffffffff
jne 0x402b18
mov dword [0x43f3e8], 0
push 0x409c40
call fcn.00411ffc
add esp, 4
push 0x43f5f4
call fcn.00411dd9
add esp, 4
jmp 0x402b18
push 0x43f5f4
call fcn.00411d87
add esp, 4
cmp dword [0x43f5f4], 0xffffffff
jne 0x402b81
mov dword [0x43f3e8], 0
push 0x409c40
call fcn.00411ffc
add esp, 4
push 0x43f5f4
call fcn.00411dd9
add esp, 4
jmp 0x402b81
push 0x43f5f4
call fcn.00411d87
add esp, 4
cmp dword [0x43f5f4], 0xffffffff
jne 0x402bec
mov dword [0x43f3e8], 0
push 0x409c40
call fcn.00411ffc
add esp, 4
push 0x43f5f4
call fcn.00411dd9
add esp, 4
jmp 0x402bec