Function at 0x10d2f5e
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.010831a6
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 0x10d3079
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10d2fd3
call esi
cmp eax, 2
je 0x10d2fd3
mov ecx, dword [0x111024c]
cmp ecx, 0x111024c
je 0x10d2fd3
test byte [ecx + 0x1c], 1
je 0x10d2fd3
cmp byte [ecx + 0x19], 3
jb 0x10d2fd3
push eax
push edi
push ebx
push 0x15
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.01048c37
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.0107e47a
mov edi, eax
test edi, edi
jge 0x10d30e8
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x10d3033
test byte [eax + 0x1c], 1
je 0x10d3033
cmp byte [eax + 0x19], 2
jb 0x10d3033
push edi
push dword [ebp - 8]
push ebx
push 0x17
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01048c37
mov eax, dword [0x111024c]
cmp dword [ebp - 4], 0xffffffff
je 0x10d3047
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111024c]
test edi, edi
jge 0x10d3070
cmp eax, 0x111024c
je 0x10d3070
test byte [eax + 0x1c], 1
je 0x10d3070
cmp byte [eax + 0x19], 2
jb 0x10d3070
push edi
push dword [ebp + 8]
push ebx
push 0x1b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01048c37
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 0x10d2fd3
call esi
mov edi, eax
cmp edi, 2
je 0x10d2fd3
mov eax, dword [0x111024c]
mov ebx, 0x100ffa4
cmp eax, 0x111024c
je 0x10d30cf
test byte [eax + 0x1c], 1
je 0x10d30cf
cmp byte [eax + 0x19], 2
jb 0x10d30cf
push edi
push dword [ebp + 0xc]
push ebx
push 0x16
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01048c37
mov eax, dword [0x111024c]
test edi, edi
jle 0x10d3033
and edi, 0xffff
or edi, 0x80070000
jmp 0x10d3033
cmp dword [ebp + 0x14], 0
jne 0x10d3102
push 0x101000c
push 0x1b8
push 0x100ffb4
call fcn.0107b644
mov eax, dword [ebp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10d3108
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 0x10d3170
call esi
mov esi, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x10d3238
test byte [eax + 0x1c], 1
je 0x10d3238
cmp byte [eax + 0x19], 2
jb 0x10d3238
push esi
push dword [ebp - 8]
push ebx
push 0x18
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01048c37
jmp 0x10d3233
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x10d31d5
call dword [sym.imp.ntdll.dll_RtlGetLastNtStatus]
mov edi, eax
call esi
mov esi, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x10d3238
test byte [eax + 0x1c], 1
je 0x10d3238
cmp byte [eax + 0x19], 2
jb 0x10d3238
push edi
push esi
push dword [ebp - 8]
push ebx
push 0x19
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019c0f
jmp 0x10d3233
and esi, 0xffff
or esi, 0x80070000
mov edi, esi
jmp 0x10d3033
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xc], 0
jne 0x10d3042
push 9
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x10d302e
call esi
mov esi, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x10d3238
test byte [eax + 0x1c], 1
je 0x10d3238
cmp byte [eax + 0x19], 2
jb 0x10d3238
push esi
push dword [ebp + 8]
push dword [ebp + 0xc]
push ebx
push 0x1a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010198ad
mov eax, dword [0x111024c]
test esi, esi
jg 0x10d31c2
jmp 0x10d31ce