Function at 0x1000fd0d
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 0x1000fd7b
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 0x1000fd7b
test byte [ebp - 0x208], 0x10
je 0x1000fd7b
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc30
add esp, 8
push 0x100d6f08
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc40
add esp, 8
movsx eax, byte [ebp - 0x204]
test eax, eax
jne 0x1000fdb0
push 0x200
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100d6f0c
lea eax, [ebp - 0x204]
push eax
call fcn.1001bc40
add esp, 8
push 0x100d6f18
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 0x1000fe51
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1000fe51
push 0x200
push 0x10142a60
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100d6f28
push 0x10142a60
call fcn.1001bc40
add esp, 8
push 0x100d6f34
push 0x10142a60
call fcn.1001bc40
add esp, 8
push str..sy_
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 0x1000ff15
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x54c]
push eax
call fcn.1001bc30
add esp, 8
push 0x100d6f48
lea eax, [ebp - 0x54c]
push eax
call fcn.1001bc40
add esp, 8
push 0x100d6f4c
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 0x1000ff15
push 0
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x54c]
push eax
call fcn.10006020
add esp, 0xc
test eax, eax
jne 0x1000ff01
mov eax, dword [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x4000c
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000ffd7
mov eax, dword [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x1000ffd7
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 0x1000ff5d
push 0x40003
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000ffd7
push 0
lea eax, [ebp - 0x550]
push eax
push 0x1ec00
push 0x100b5a38
mov eax, dword [0x10142a58]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000ffa0
push 0x40004
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000ffd7
mov eax, dword [0x10142a58]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000ffd0
push 0x40005
call fcn.100042e2
add esp, 4
mov eax, 0xffffffff
jmp 0x1000ffd7
xor eax, eax
jmp 0x1000ffd7
pop edi
pop esi
pop ebx
leave
ret