Function at 0x4085d9
Capabilities:
Check if file exists
Delete file
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x82c
push ebx
push esi
mov dword [ebp - 4], ecx
mov edx, 0x81
push edi
xor ebx, ebx
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x622]
mov word [ebp - 0x624], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x41a]
mov word [ebp - 0x41c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 1
mov esi, 0x104
push ebx
lea eax, [ebp - 0x624]
push esi
push eax
push dword [ebp + 8]
push 1
call fcn.0041f243
push 1
push ebx
lea eax, [ebp - 0x41c]
push esi
push eax
push dword [ebp + 8]
push 2
call fcn.0041f243
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x30
lea eax, [ebp - 0x41c]
push eax
call edi
test eax, eax
lea eax, [ebp - 0x624]
push eax
jne 0x408690
call edi
test eax, eax
je 0x40879c
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x624]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x408755
jmp 0x40871e
call edi
test eax, eax
je 0x408755
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x212]
mov word [ebp - 0x214], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x41c]
push esi
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
lea eax, [ebp - 0x214]
push str..bak2
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x214]
push eax
call edi
test eax, eax
je 0x408706
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x624]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x408725
xor eax, eax
jmp 0x4088e0
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x41c]
push eax
call fcn.004088e7
lea eax, [ebp - 0x214]
push eax
call edi
test eax, eax
je 0x408755
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push 0x80
push 3
push ebx
push ebx
lea eax, [ebp - 0x41c]
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40878f
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], ebx
jne 0x4087a4
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
pop eax
jmp 0x4088e0
push dword [ebp + 8]
lea eax, [ebp - 0x41c]
push eax
call fcn.0041f451
lea eax, [ebp - 0x41c]
push ebx
push eax
call fcn.0041f4b4
lea eax, [ebp - 0x41c]
push 1
push eax
call fcn.0041f3ec
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x82a]
mov word [ebp - 0x82c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x82c]
push esi
push eax
push 3
call fcn.0041dc67
push ebx
call dword [sym.imp.MSVCRT.dll__wtmpnam]
add esp, 0x28
push eax
lea eax, [ebp - 0x82c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x82c]
mov ecx, dword [ebp - 4]
push eax
lea eax, [ebp - 0x41c]
push eax
push dword [ebp + 8]
call fcn.004080aa
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x4088d0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x212]
mov word [ebp - 0x214], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 1
push ebx
lea eax, [ebp - 0x214]
push esi
push eax
push dword [ebp + 8]
push ebx
call fcn.0041f243
lea eax, [ebp - 0x214]
push eax
call fcn.0041f36c
mov edi, eax
mov dword [ebp - 4], ebx
lea eax, [ebp - 4]
mov ebx, 0x457a18
push eax
mov esi, str.SyncMgr
push ebx
push esi
push dword [ebp + 8]
call fcn.0041e678
lea eax, [ebp - 0x82c]
push eax
call fcn.0041f36c
lea ecx, [edi + 1]
add esp, 0x30
cmp eax, ecx
mov dword [ebp - 8], eax
jne 0x4088c3
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.0041f383
cmp dword [ebp - 4], edi
pop ecx
pop ecx
jne 0x4088c3
push dword [ebp - 8]
push ebx
push esi
push dword [ebp + 8]
call fcn.0041e6f4
add esp, 0x10
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x82c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 4