Function at 0x10005c50
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x278
mov eax, dword [0x1003e030]
xor eax, esp
mov dword [esp + 0x274], eax
push esi
push edi
push 0x103
lea eax, [esp + 0x175]
mov dword [esp + 0x1c], edx
push 0
push eax
mov edi, ecx
mov dword [esp + 0x20], 0
or esi, 0xffffffff
call fcn.10019c70
add esp, 0xc
lea eax, [esp + 0x30]
push 0x140
push 0
push eax
call fcn.10019c70
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
je 0x10005cb6
mov dword [eax], 0
test edi, edi
je 0x10005ed4
test eax, eax
je 0x10005ed4
cmp dword [0x10041d60], 0
je 0x10005ed4
mov eax, dword [0x100421a8]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x10005d1f
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test dword [esp + 0x30], 0x400
je 0x10005d1f
mov eax, dword [esp + 0x54]
cmp eax, 0xa0000003
je 0x10005d10
cmp eax, 0xa000000c
jne 0x10005d1f
mov dword [esp + 0x14], 1
mov eax, 3
jmp 0x10005d72
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10005ed4
push dword [esp + 0x18]
lea edx, [esp + 0x18]
mov ecx, esi
call fcn.10005ef0
add esp, 4
test eax, eax
jne 0x10005d63
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
cmp dword [esp + 0x14], 1
jne 0x10005ed4
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x170], 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
cmp eax, 1
jne 0x10005de9
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10005ec5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10005ec5
lea ecx, [esp + 0x170]
mov esi, edi
mov eax, ecx
mov edx, 0x104
sub esi, eax
nop
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10005dd9
mov al, byte [esi + ecx]
test al, al
je 0x10005dd9
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x10005dc0
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
jmp 0x10005e8d
cmp eax, 2
jne 0x10005e21
push edi
push str._s.old.log
lea eax, [esp + 0x178]
push 0x104
push eax
call fcn.10004890
add esp, 0x10
test eax, eax
js 0x10005ec5
lea eax, [esp + 0x170]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x10005e78
cmp eax, 3
jne 0x10005ec5
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x2c]
push eax
movzx eax, word [esp + 0x2e]
push eax
movzx eax, word [esp + 0x30]
push eax
movzx eax, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x34]
push eax
push edi
push str._s._.4d_.2d_.2d_.2d_.2d_.2d.log
lea eax, [esp + 0x190]
push 0x104
push eax
call fcn.10004890
add esp, 0x28
test eax, eax
js 0x10005ec5
push 1
lea eax, [esp + 0x174]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x10005ec5
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10005ed4
push dword [esp + 0x18]
lea edx, [esp + 0x18]
mov ecx, esi
call fcn.10005ef0
add esp, 4
test eax, eax
jne 0x10005ed4
jmp 0x10005eca
cmp esi, 0xffffffff
je 0x10005ed4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov ecx, dword [esp + 0x27c]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.10018459
mov esp, ebp
pop ebp
ret