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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x488
mov eax, dword [0x1003e030]
xor eax, esp
mov dword [esp + 0x484], eax
push esi
push edi
push 0x206
lea eax, [esp + 0x286]
mov dword [esp + 0x1c], edx
push 0
push eax
mov edi, ecx
mov dword [esp + 0x20], 0
or esi, 0xffffffff
call fcn.10019d00
add esp, 0xc
lea eax, [esp + 0x30]
push 0x250
push 0
push eax
call fcn.10019d00
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
je 0x10005a86
mov dword [eax], 0
test edi, edi
je 0x10005cac
test eax, eax
je 0x10005cac
cmp dword [0x10041d90], 0
je 0x10005cac
mov eax, dword [0x100421d8]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x10005aef
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test dword [esp + 0x30], 0x400
je 0x10005aef
mov eax, dword [esp + 0x54]
cmp eax, 0xa0000003
je 0x10005ae0
cmp eax, 0xa000000c
jne 0x10005aef
mov dword [esp + 0x14], 1
mov eax, 3
jmp 0x10005b42
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10005cac
push dword [esp + 0x18]
lea edx, [esp + 0x18]
mov ecx, esi
call fcn.10005f70
add esp, 4
test eax, eax
jne 0x10005b33
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
cmp dword [esp + 0x14], 1
jne 0x10005cac
mov eax, dword [esp + 0x1c]
xor ecx, ecx
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
mov word [esp + 0x280], cx
cmp eax, 1
jne 0x10005bc1
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10005c9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10005c9d
lea ecx, [esp + 0x280]
mov esi, edi
mov eax, ecx
mov edx, 0x104
sub esi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10005baf
movzx eax, word [esi + ecx]
test ax, ax
je 0x10005baf
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x10005b91
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
jmp 0x10005c65
cmp eax, 2
jne 0x10005bf9
push edi
push 0x1003904c
lea eax, [esp + 0x288]
push 0x104
push eax
call fcn.10001870
add esp, 0x10
test eax, eax
js 0x10005c9d
lea eax, [esp + 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10005c50
cmp eax, 3
jne 0x10005c9d
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 0x10039068
lea eax, [esp + 0x2a0]
push 0x104
push eax
call fcn.10001870
add esp, 0x28
test eax, eax
js 0x10005c9d
push 1
lea eax, [esp + 0x284]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x10005c9d
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10005cac
push dword [esp + 0x18]
lea edx, [esp + 0x18]
mov ecx, esi
call fcn.10005f70
add esp, 4
test eax, eax
jne 0x10005cac
jmp 0x10005ca2
cmp esi, 0xffffffff
je 0x10005cac
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov ecx, dword [esp + 0x48c]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.100184e9
mov esp, ebp
pop ebp
ret