Function at 0x100059a0
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.10019c70
add esp, 0xc
lea eax, [esp + 0x30]
push 0x250
push 0
push eax
call fcn.10019c70
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
je 0x10005a06
mov dword [eax], 0
test edi, edi
je 0x10005c2c
test eax, eax
je 0x10005c2c
cmp dword [0x10041d60], 0
je 0x10005c2c
mov eax, dword [0x100421a8]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x10005a6f
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test dword [esp + 0x30], 0x400
je 0x10005a6f
mov eax, dword [esp + 0x54]
cmp eax, 0xa0000003
je 0x10005a60
cmp eax, 0xa000000c
jne 0x10005a6f
mov dword [esp + 0x14], 1
mov eax, 3
jmp 0x10005ac2
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 0x10005c2c
push dword [esp + 0x18]
lea edx, [esp + 0x18]
mov ecx, esi
call fcn.10005ef0
add esp, 4
test eax, eax
jne 0x10005ab3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
cmp dword [esp + 0x14], 1
jne 0x10005c2c
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 0x10005b41
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10005c1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x10005c1d
lea ecx, [esp + 0x280]
mov esi, edi
mov eax, ecx
mov edx, 0x104
sub esi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10005b2f
movzx eax, word [esi + ecx]
test ax, ax
je 0x10005b2f
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x10005b11
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
jmp 0x10005be5
cmp eax, 2
jne 0x10005b79
push edi
push 0x1003904c
lea eax, [esp + 0x288]
push 0x104
push eax
call fcn.10001870
add esp, 0x10
test eax, eax
js 0x10005c1d
lea eax, [esp + 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10005bd0
cmp eax, 3
jne 0x10005c1d
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 0x10005c1d
push 1
lea eax, [esp + 0x284]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x10005c1d
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 0x10005c2c
push dword [esp + 0x18]
lea edx, [esp + 0x18]
mov ecx, esi
call fcn.10005ef0
add esp, 4
test eax, eax
jne 0x10005c2c
jmp 0x10005c22
cmp esi, 0xffffffff
je 0x10005c2c
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.10018459
mov esp, ebp
pop ebp
ret