Function at 0x411f1d
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 0x411f8b
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 0x411f8b
test byte [ebp - 0x208], 0x10
je 0x411f8b
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x204]
push eax
call fcn.0041d13c
add esp, 8
push 0x4dcd28
lea eax, [ebp - 0x204]
push eax
call fcn.0041d138
add esp, 8
movsx eax, byte [ebp - 0x204]
test eax, eax
jne 0x411fc0
push 0x200
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x4dcd2c
lea eax, [ebp - 0x204]
push eax
call fcn.0041d138
add esp, 8
push 0x4dcd38
lea eax, [ebp - 0x204]
push eax
call fcn.0041d138
add esp, 8
lea eax, [ebp - 0x204]
push eax
call fcn.0040820a
add esp, 4
test eax, eax
jne 0x412061
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x412061
push 0x200
push 0x42cd40
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x4dcd48
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x4dcd54
push 0x42cd40
call fcn.0041d138
add esp, 8
push str..sy_
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x42cd40
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x204]
push eax
call fcn.0040820a
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x412125
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x54c]
push eax
call fcn.0041d13c
add esp, 8
push 0x4dcd68
lea eax, [ebp - 0x54c]
push eax
call fcn.0041d138
add esp, 8
push 0x4dcd6c
lea eax, [ebp - 0x54c]
push eax
call fcn.0041d138
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 0x412125
push 0
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x54c]
push eax
call fcn.00408230
add esp, 0xc
test eax, eax
jne 0x412111
mov eax, dword [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x4000c
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4121e7
mov eax, dword [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4121e7
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 [0x42cd30], eax
cmp dword [0x42cd30], 0xffffffff
jne 0x41216d
push 0x40003
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4121e7
push 0
lea eax, [ebp - 0x550]
push eax
push 0x1ec00
push 0x4bb858
mov eax, dword [0x42cd30]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4121b0
push 0x40004
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4121e7
mov eax, dword [0x42cd30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4121e0
push 0x40005
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4121e7
xor eax, eax
jmp 0x4121e7
pop edi
pop esi
pop ebx
leave
ret