Function at 0x1006495
Capabilities:
Delete file
Get file size
Move file

Disassembly:
mov eax, 0x1007fd5
call fcn.01005108
sub esp, 0x2c
push esi
mov esi, ecx
lea ecx, [ebp - 0x38]
call fcn.01006021
and dword [ebp - 4], 0
cmp byte [ebp - 0x30], 0
jne 0x10064bf
or esi, 0xffffffff
jmp 0x1006619
or dword [ebp - 0x14], 0xffffffff
push edi
mov edi, 0x105
push ebx
cmp dword [ebp - 0x14], 0xffffffff
jne 0x1006548
push 0xffffffffffffffff
push dword [esi + 0x1e2c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x1006636
lea eax, [esi + 0xc]
push eax
push edi
lea ebx, [esi + 0x1c20]
push ebx
call fcn.01005f35
push dword [ebp + 8]
push edi
push ebx
call fcn.01006331
push 0
push 0x2080
push 4
push 0
push 5
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x1006548
push dword [esi + 0x1e2c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x1006636
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10064d0
mov ebx, dword [esi + 0x1e2c]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 1
xor eax, eax
push 2
push eax
push eax
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x100663b
mov eax, dword [esi + 4]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x14]
mov byte [ebp - 0xd], 1
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10065ff
mov ecx, dword [ebp - 0x20]
xor eax, eax
cmp ecx, eax
jl 0x10065ff
jg 0x10065a4
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x2c]
jbe 0x10065ff
lea eax, [esi + 0x1c20]
push eax
push edi
lea ebx, [esi + 0x1a16]
push ebx
call fcn.01005f35
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x10023cc
lea eax, [esi + eax*2 + 0x1a10]
push edi
push eax
call fcn.01005f35
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
lea eax, [esi + 0x1c20]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x100664b
push dword [ebp - 0x14]
mov byte [ebp - 0xd], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x14], 0xffffffff
mov ebx, dword [ebp - 0x18]
mov byte [ebp - 4], 0
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp byte [ebp - 0xd], 0
je 0x10064ca
mov esi, dword [ebp - 0x14]
pop ebx
pop edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.01006069
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret 4
or esi, 0xffffffff
jmp 0x1006617
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
push ebx
jmp 0x1006689
push 0
push 2
xor eax, eax
push eax
push dword [ebp - 0x2c]
call fcn.010050c0
mov ecx, dword [ebp - 0x20]
cmp ecx, edx
jg 0x1006679
jl 0x100666a
mov ecx, dword [ebp - 0x24]
cmp ecx, eax
jae 0x1006679
mov byte [ebp - 4], 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1006614
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1006636