Function at 0x10d2ff8
Capabilities:
Check if file exists
Delete file
Move file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
push dword [ebp + 0x10]
call fcn.01083215
or dword [ebp - 4], 0xffffffff
and dword [ebp - 0x10], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
and dword [ebp - 0xc], 1
mov ebx, 0x100ffa4
je 0x10d3113
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10d306d
call esi
cmp eax, 2
je 0x10d306d
mov ecx, dword [0x111124c]
cmp ecx, 0x111124c
je 0x10d306d
test byte [ecx + 0x1c], 1
je 0x10d306d
cmp byte [ecx + 0x19], 3
jb 0x10d306d
push eax
push edi
push ebx
push 0x15
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.010196ed
cmp dword [ebp + 0x10], 4
lea eax, [ebp - 4]
push eax
setne al
movzx eax, al
push eax
push 0
push 0x80
push 2
push 0
push 0xc0000000
push dword [ebp - 8]
call fcn.0107e3c8
mov edi, eax
test edi, edi
jge 0x10d3182
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d30cd
test byte [eax + 0x1c], 1
je 0x10d30cd
cmp byte [eax + 0x19], 2
jb 0x10d30cd
push edi
push dword [ebp - 8]
push ebx
push 0x17
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
mov eax, dword [0x111124c]
cmp dword [ebp - 4], 0xffffffff
je 0x10d30e1
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111124c]
test edi, edi
jge 0x10d310a
cmp eax, 0x111124c
je 0x10d310a
test byte [eax + 0x1c], 1
je 0x10d310a
cmp byte [eax + 0x19], 2
jb 0x10d310a
push edi
push dword [ebp + 8]
push ebx
push 0x1b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x10
mov eax, dword [ebp + 0xc]
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10d306d
call esi
mov edi, eax
cmp edi, 2
je 0x10d306d
mov eax, dword [0x111124c]
mov ebx, 0x100ffa4
cmp eax, 0x111124c
je 0x10d3169
test byte [eax + 0x1c], 1
je 0x10d3169
cmp byte [eax + 0x19], 2
jb 0x10d3169
push edi
push dword [ebp + 0xc]
push ebx
push 0x16
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
mov eax, dword [0x111124c]
test edi, edi
jle 0x10d30cd
and edi, 0xffff
or edi, 0x80070000
jmp 0x10d30cd
cmp dword [ebp + 0x14], 0
jne 0x10d319c
push 0x101000c
push 0x1b8
push 0x100ffb4
call fcn.0107b4be
mov eax, dword [ebp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10d31a2
sub eax, edx
push 0
sar eax, 1
lea ecx, [ebp - 0x10]
push ecx
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x14]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10d320a
call esi
mov esi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d32d2
test byte [eax + 0x1c], 1
je 0x10d32d2
cmp byte [eax + 0x19], 2
jb 0x10d32d2
push esi
push dword [ebp - 8]
push ebx
push 0x18
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
jmp 0x10d32cd
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x10d326f
call dword [sym.imp.ntdll.dll_RtlGetLastNtStatus]
mov edi, eax
call esi
mov esi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d32d2
test byte [eax + 0x1c], 1
je 0x10d32d2
cmp byte [eax + 0x19], 2
jb 0x10d32d2
push edi
push esi
push dword [ebp - 8]
push ebx
push 0x19
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0109b90b
jmp 0x10d32cd
and esi, 0xffff
or esi, 0x80070000
mov edi, esi
jmp 0x10d30cd
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xc], 0
jne 0x10d30dc
push 9
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x10d30c8
call esi
mov esi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d32d2
test byte [eax + 0x1c], 1
je 0x10d32d2
cmp byte [eax + 0x19], 2
jb 0x10d32d2
push esi
push dword [ebp + 8]
push dword [ebp + 0xc]
push ebx
push 0x1a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019a40
mov eax, dword [0x111124c]
test esi, esi
jg 0x10d325c
jmp 0x10d3268