Function at 0x403770
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 [0x43e00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [ebp + 8], 0
je 0x40381b
mov ecx, str._s.moz_backup
mov ebx, 0x104
lea eax, [ebp - 0x62a]
push edi
push ecx
push ebx
push eax
call fcn.00404cf0
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.00404cf0
add esp, 0x10
push 0
lea eax, [ebp - 0x62a]
push eax
call fcn.0041ce35
add esp, 8
test eax, eax
je 0x403987
mov eax, dword [0x4405f4]
mov ecx, dword [0x43eb8c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4039ff
push esi
push str.backup_restore:_backup_file_doesnt_exist:__S
push 0x4403e8
call fcn.00410340
add esp, 0xc
jmp 0x403999
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.00404cf0
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.00404cf0
add esp, 0x10
push 0
push esi
call fcn.0041ce35
add esp, 8
test eax, eax
jne 0x403999
push 0x180
push esi
call fcn.0041d0c8
add esp, 8
push esi
call fcn.0041d80e
add esp, 4
test eax, eax
je 0x403999
mov edi, eax
mov eax, dword [0x4405f4]
mov ecx, dword [0x43eb8c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403a42
call fcn.004122fc
push dword [eax]
push edi
push esi
push str.ensure_remove:_failed_to_remove_file:__S__rv:__d__err:__d
push 0x4403e8
call fcn.00410340
add esp, 0x14
cmp byte [0x43f9b0], 0
jne 0x403999
cmp byte [0x4401dd], 0
jne 0x403999
mov eax, dword [0x4405f4]
mov ecx, dword [0x43eb8c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403a85
push ebx
push str.backup_discard:_unable_to_remove:__S
push 0x4403e8
call fcn.00410340
add esp, 0xc
lea edi, [ebp - 0x62a]
push edi
push 0x437d4c
push 0x4401e0
call fcn.00430630
add esp, 0xc
lea ecx, [ebp - 0x218]
mov edx, edi
push 0
call fcn.0040ab30
add esp, 4
test eax, eax
mov esi, dword [ebp - 0x630]
je 0x4039ae
mov eax, dword [0x4405f4]
mov ecx, dword [0x43eb8c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x403ac8
push esi
push ebx
push str.backup_discard:_failed_to_rename_file:_S__dst:_S
push 0x4403e8
call fcn.00410340
add esp, 0x10
jmp 0x403999
lea ecx, [ebp - 0x62a]
mov edx, edi
push 0
call fcn.0040ab30
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412b41
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 [0x43eb8c]
mov edx, dword fs:[0x2c]
mov edx, dword [edx + ecx*4]
mov ecx, dword [0x4405f4]
mov edx, dword [edx + 4]
test eax, eax
je 0x4039ec
cmp ecx, edx
jg 0x403b0b
push esi
push str.backup_discard:_file_renamed_and_will_be_removed_on_OS_reboot:__S
jmp 0x403809
cmp ecx, edx
jg 0x403b4e
push esi
push str.backup_discard:_failed_to_schedule_OS_reboot_removal_of_file:__S
jmp 0x403809
push 0x4405f4
call fcn.00412337
add esp, 4
cmp dword [0x4405f4], 0xffffffff
jne 0x403803
mov dword [0x4403e8], 0
push 0x40ab00
call fcn.004125ac
add esp, 4
push 0x4405f4
call fcn.00412389
add esp, 4
jmp 0x403803
push 0x4405f4
call fcn.00412337
add esp, 4
cmp dword [0x4405f4], 0xffffffff
jne 0x4038b2
mov dword [0x4403e8], 0
push 0x40ab00
call fcn.004125ac
add esp, 4
push 0x4405f4
call fcn.00412389
add esp, 4
jmp 0x4038b2
push 0x4405f4
call fcn.00412337
add esp, 4
cmp dword [0x4405f4], 0xffffffff
jne 0x403908
mov dword [0x4403e8], 0
push 0x40ab00
call fcn.004125ac
add esp, 4
push 0x4405f4
call fcn.00412389
add esp, 4
jmp 0x403908
push 0x4405f4
call fcn.00412337
add esp, 4
cmp dword [0x4405f4], 0xffffffff
jne 0x403971
mov dword [0x4403e8], 0
push 0x40ab00
call fcn.004125ac
add esp, 4
push 0x4405f4
call fcn.00412389
add esp, 4
jmp 0x403971
push 0x4405f4
call fcn.00412337
add esp, 4
cmp dword [0x4405f4], 0xffffffff
jne 0x4039e1
mov dword [0x4403e8], 0
push 0x40ab00
call fcn.004125ac
add esp, 4
push 0x4405f4
call fcn.00412389
add esp, 4
jmp 0x4039e1
push 0x4405f4
call fcn.00412337
add esp, 4
cmp dword [0x4405f4], 0xffffffff
jne 0x4039f4
mov dword [0x4403e8], 0
push 0x40ab00
call fcn.004125ac
add esp, 4
push 0x4405f4
call fcn.00412389
add esp, 4
jmp 0x4039f4