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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x101d5abc]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x30], edx
xor edx, edx
push edi
mov dword [ebp - 0x40], ecx
xor edi, edi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x3c], eax
mov dword [eax], 1
call fcn.1015b50d
mov dword [ebp - 0x54], eax
test eax, eax
jne 0x101652f2
push 2
mov edx, 0x10038610
mov ecx, esi
call fcn.1015aefa
xor eax, eax
jmp 0x1016556d
add eax, 0x18
push eax
call fcn.10183515
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x10165316
push edi
mov edx, 0x100385e4
mov ecx, esi
call fcn.1015aefa
mov eax, dword [ebp - 0x3c]
mov dword [eax], edi
jmp 0x101652eb
mov ecx, dword [ebp - 0x40]
lea edx, [ebx + 0x18]
call fcn.1015b50d
mov edx, dword [ebp - 0x54]
add edx, 0x18
lea ecx, [edx - 0x18]
cmp eax, ecx
je 0x10165338
mov edx, 0x100385bc
jmp 0x1016555a
mov eax, dword [ebp + 8]
lea ecx, [ebx + 4]
mov dword [ebx], edi
mov dword [ecx], edx
add edx, 0xfffffffc
mov dword [ebx + 8], 0x5251955
mov dword [ebx + 0xc], 0x1c
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebx + 0x14], eax
call fcn.10134a79
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x1016536b
mov dword [ecx], eax
mov dword [ebx], eax
lea eax, [ebp - 0x2c]
push eax
push edi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x101654ff
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x101654ff
mov esi, dword [ebp - 0x30]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, di
jne 0x1016539a
sub esi, ecx
lea ecx, [ebp - 0x50]
sar esi, 1
lea esi, [esi*2 + 2]
push esi
call fcn.1015aecd
push esi
lea ecx, [ebp - 0x44]
call fcn.1015aecd
push esi
lea ecx, [ebp - 0x5c]
call fcn.1015aecd
lea eax, [esi + 0x208]
push eax
lea ecx, [ebp - 0x64]
call fcn.1015aecd
push esi
lea ecx, [ebp - 0x38]
call fcn.1015aecd
mov esi, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
je 0x1016557e
cmp dword [ebp - 0x44], edi
je 0x1016557e
cmp dword [ebp - 0x5c], edi
je 0x1016557e
test esi, esi
je 0x1016557e
cmp dword [ebp - 0x38], edi
je 0x1016557e
mov eax, dword [ebp - 0x58]
push edi
push edi
shr eax, 1
push eax
push dword [ebp - 0x5c]
mov eax, dword [ebp - 0x40]
shr eax, 1
push eax
push dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
shr eax, 1
push eax
push dword [ebp - 0x50]
push dword [ebp - 0x30]
call dword [sym.imp.msvcrt.dll__wsplitpath_s]
mov eax, 0x1001d02c
push eax
push eax
push dword [ebp - 0x44]
mov eax, dword [ebp - 0x34]
push dword [ebp - 0x50]
shr eax, 1
push eax
push dword [ebp - 0x38]
call dword [sym.imp.msvcrt.dll__wmakepath_s]
add esp, 0x3c
push esi
push edi
push 0x100386fc
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x101654ad
mov edx, 0x100386cc
mov ecx, dword [ebp - 0x48]
push 2
call fcn.1015aefa
push dword [ebp - 0x38]
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 - 0x5c]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x44]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x50]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
add esp, 0x14
jmp 0x10165563
push 1
push esi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x101654c4
mov edx, 0x10038688
jmp 0x10165470
push 4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push dword [ebp - 0x38]
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 - 0x5c]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x44]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x50]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov esi, dword [ebp - 0x48]
add esp, 0x14
push edi
push 0x8000080
push 2
push edi
push edi
push 0x40000000
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
je 0x10165555
push edi
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], edi
push ecx
mov ecx, dword [ebp - 0x54]
add ecx, 0x18
push ecx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10165548
mov eax, dword [ebp - 0x54]
add eax, 0x18
cmp eax, dword [ebp - 0x3c]
jne 0x10165548
xor edi, edi
inc edi
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x10165563
mov edx, 0x10038644
push 2
mov ecx, esi
call fcn.1015aefa
push ebx
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
pop ecx
mov eax, edi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101885f0
leave
ret 0x14
mov eax, dword [ebp - 0x3c]
push dword [ebp - 0x38]
mov dword [eax], edi
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 - 0x5c]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x44]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
push dword [ebp - 0x50]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
add esp, 0x14
jmp 0x101652eb