Function at 0x1000fa16
Capabilities:
Check if file exists
Get common file path
Get file attributes
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x550
push ebx
push esi
push edi
mov byte [ebp - 0x204], 0
cmp dword [ebp + 8], 0
je 0x1000fa84
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x208], eax
cmp dword [ebp - 0x208], 0xffffffff
je 0x1000fa84
test byte [ebp - 0x208], 0x10
je 0x1000fa84
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc30
add esp, 8
push 0x100d6eb8
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc40
add esp, 8
movsx eax, byte [ebp - 0x204]
test eax, eax
jne 0x1000fab9
push 0x200
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100d6ebc
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc40
add esp, 8
push 0x100d6ec8
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc40
add esp, 8
push 0x100d6ed0
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc40
add esp, 8
lea eax, [ebp - 0x204]
push eax
call fcn.10005ffa
add esp, 4
test eax, eax
jne 0x1000fb6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1000fb6e
push 0x200
push 0x10142a60
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100d6ed8
push 0x10142a60
call fcn.1001bc40
add esp, 8
push 0x100d6ee4
push 0x10142a60
call fcn.1001bc40
add esp, 8
push 0x100d6eec
push 0x10142a60
call fcn.1001bc40
add esp, 8
push 0x10142a60
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x204]
push eax
call fcn.10005ffa
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x1000fc46
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x54c]
push eax
call fcn.1001bc30
add esp, 8
push 0x100d6ef4
lea eax, [ebp - 0x54c]
push eax
call fcn.1001bc40
add esp, 8
push 0x100d6ef8
lea eax, [ebp - 0x54c]
push eax
call fcn.1001bc40
add esp, 8
push 0x100d6f00
lea eax, [ebp - 0x54c]
push eax
call fcn.1001bc40
add esp, 8
lea eax, [ebp - 0x348]
push eax
lea eax, [ebp - 0x54c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0xffffffff
je 0x1000fc46
push 0
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x54c]
push eax
call fcn.10006020
add esp, 0xc
test eax, eax
jne 0x1000fc32
push 0x4000c
call fcn.100042e2
add esp, 4
mov eax, dword [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 0xffffffff
jmp 0x1000fd08
mov eax, dword [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x1000fd08
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x10142a58], eax
cmp dword [0x10142a58], 0xffffffff
jne 0x1000fc8e
push 0x40003
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000fd08
push 0
lea eax, [ebp - 0x550]
push eax
push 0x1b000
push 0x1009aa38
mov eax, dword [0x10142a58]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000fcd1
push 0x40004
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000fd08
mov eax, dword [0x10142a58]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000fd01
push 0x40005
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000fd08
xor eax, eax
jmp 0x1000fd08
pop edi
pop esi
pop ebx
leave
ret