Function at 0x10147314
Capabilities:
Delete file
Get common file path
Move file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x101a4c2c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x30], eax
xor ebx, ebx
mov eax, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x44], edx
xor edx, edx
push edi
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x38], eax
mov dword [eax], 1
call fcn.1013d66e
mov dword [ebp - 0x58], eax
test eax, eax
jne 0x1014736f
push 2
mov edx, 0x100343bc
mov ecx, esi
call fcn.1013d076
xor eax, eax
jmp 0x101475f0
lea edi, [eax + 0x18]
mov dword [ebp - 0x70], 0x5251955
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x6c], 0x1c
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x64], eax
call fcn.10164ff8
mov dword [ebp - 0x48], eax
pop ecx
test eax, eax
jne 0x101473b4
push ebx
mov edx, 0x10034390
mov ecx, esi
call fcn.1013d076
mov eax, dword [ebp - 0x38]
mov dword [eax], ebx
jmp 0x10147368
mov ecx, dword [ebp - 0x3c]
lea edx, [eax + 0x18]
call fcn.1013d66e
lea ecx, [edi - 0x18]
cmp eax, ecx
je 0x101473d2
mov edx, 0x100343f8
mov ecx, esi
jmp 0x101475dd
mov edi, dword [ebp - 0x48]
lea esi, [ebp - 0x78]
mov edx, dword [ebp - 0x58]
push 6
pop ecx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x48]
lea edx, [edx + 0x14]
push ebx
lea ecx, [esi + 4]
call fcn.1010bd2c
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x101473f8
mov dword [ecx], eax
mov edi, dword [ebp - 0x44]
mov dword [esi], eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x10147587
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10147587
mov esi, edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x10147425
sub esi, ecx
lea ecx, [ebp - 0x40]
sar esi, 1
lea esi, [esi*2 + 2]
push esi
call fcn.1013d04f
push esi
lea ecx, [ebp - 0x60]
call fcn.1013d04f
push esi
lea ecx, [ebp - 0x54]
call fcn.1013d04f
lea eax, [esi + 0x208]
push eax
lea ecx, [ebp - 0x80]
call fcn.1013d04f
push esi
lea ecx, [ebp - 0x34]
call fcn.1013d04f
mov edi, dword [ebp - 0x60]
mov esi, dword [ebp - 0x80]
cmp dword [ebp - 0x40], ebx
je 0x10147603
test edi, edi
je 0x10147603
cmp dword [ebp - 0x54], ebx
je 0x10147603
test esi, esi
je 0x10147603
cmp dword [ebp - 0x34], ebx
je 0x10147603
mov eax, dword [ebp - 0x50]
push ebx
push ebx
shr eax, 1
push eax
push dword [ebp - 0x54]
mov eax, dword [ebp - 0x5c]
shr eax, 1
push eax
mov eax, dword [ebp - 0x3c]
push edi
shr eax, 1
push eax
push dword [ebp - 0x40]
push dword [ebp - 0x44]
call dword [sym.imp.msvcrt.dll__wsplitpath_s]
mov eax, 0x10018bdc
push eax
push eax
mov eax, dword [ebp - 0x30]
push edi
push dword [ebp - 0x40]
shr eax, 1
push eax
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll__wmakepath_s]
add esp, 0x3c
push esi
push ebx
push 0x100343f0
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x10147534
mov edx, 0x10034464
mov ecx, dword [ebp - 0x4c]
push 2
call fcn.1013d076
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push esi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x54]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push edi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x40]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
add esp, 0x14
jmp 0x101475e4
push 1
push esi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1014754b
mov edx, 0x10034420
jmp 0x101474f9
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push esi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x54]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push edi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x40]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov esi, dword [ebp - 0x48]
add esp, 0x14
mov edi, dword [ebp - 0x44]
push ebx
push 0x8000080
push 2
push ebx
push ebx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
je 0x101475d5
mov edi, dword [ebp - 0x58]
lea ecx, [ebp - 0x38]
push ebx
push ecx
add edi, 0x18
mov dword [ebp - 0x38], ebx
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x101475c8
cmp edi, dword [ebp - 0x38]
jne 0x101475c8
xor ebx, ebx
inc ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x101475e4
mov ecx, dword [ebp - 0x4c]
mov edx, 0x100344a0
push 2
call fcn.1013d076
push dword [ebp - 0x48]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
pop ecx
mov eax, ebx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10166ce0
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp - 0x38]
push dword [ebp - 0x34]
mov dword [eax], ebx
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push esi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x54]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push edi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x40]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
add esp, 0x14
jmp 0x10147368