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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
push 0x200
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x200
push 0x5a2880
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x51eb48
push 0x5a2880
call fcn.0041bfb0
add esp, 8
push 0x51eb4c
push 0x5a2880
call fcn.0041bfb0
add esp, 8
push 0x51eb54
push 0x5a2880
call fcn.0041bfb0
add esp, 8
push 0x5a2880
call fcn.00406151
add esp, 4
test eax, eax
jne 0x4105f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 5
je 0x4105f4
cmp dword [ebp - 0x34c], 2
je 0x4105f4
push 0x40001
call fcn.0040435c
add esp, 4
or eax, 0xffffffff
jmp 0x41091a
push 0x51eb5c
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x51eb60
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x51eb68
push 0x5a2660
call fcn.0041bfb0
add esp, 8
cmp dword [ebp + 8], 0
je 0x4106ea
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x204]
push ecx
call fcn.0041bfa0
add esp, 8
push 0x51eb70
lea edx, [ebp - 0x204]
push edx
call fcn.0041bfb0
add esp, 8
push 0x51eb74
lea eax, [ebp - 0x204]
push eax
call fcn.0041bfb0
add esp, 8
push 0x51eb7c
lea ecx, [ebp - 0x204]
push ecx
call fcn.0041bfb0
add esp, 8
lea edx, [ebp - 0x348]
push edx
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x4106ea
push 0
push 0x5a2660
lea ecx, [ebp - 0x204]
push ecx
call fcn.00406177
add esp, 0xc
test eax, eax
jne 0x4106d9
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x4000c
call fcn.0040435c
add esp, 4
or eax, 0xffffffff
jmp 0x41091a
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x41091a
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x5a2640], eax
cmp dword [0x5a2640], 0xffffffff
jne 0x41080c
push 0x200
push 0x5a2880
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x51eb84
push 0x5a2880
call fcn.0041bfb0
add esp, 8
push 0x51eb88
push 0x5a2880
call fcn.0041bfb0
add esp, 8
push 0x51eb90
push 0x5a2880
call fcn.0041bfb0
add esp, 8
push 0x5a2880
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
jne 0x4107bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 5
je 0x4107bd
cmp dword [ebp - 0x34c], 2
je 0x4107bd
cmp dword [ebp - 0x34c], 0xb7
je 0x4107bd
push 0x40002
call fcn.0040435c
add esp, 4
or eax, 0xffffffff
jmp 0x41091a
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x5a2640], eax
cmp dword [0x5a2640], 0xffffffff
jne 0x4107fd
push 0x40003
call fcn.0040435c
add esp, 4
or eax, 0xffffffff
jmp 0x41091a
mov ecx, dword [0x5a2640]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x410819
mov edx, dword [0x5a2640]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x200
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x51eb98
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x51eb9c
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0x51eba4
push 0x5a2660
call fcn.0041bfb0
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push 0x5a2660
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x5a2644], eax
cmp dword [0x5a2644], 0xffffffff
jne 0x41089c
push 0x40003
call fcn.0040435c
add esp, 4
or eax, 0xffffffff
jmp 0x41091a
push 0
lea eax, [ebp - 0x208]
push eax
call fcn.0040606a
push eax
push 0x431d38
mov ecx, dword [0x5a2644]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
jne 0x4108eb
mov edx, dword [0x5a2644]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x40004
call fcn.0040435c
add esp, 4
or eax, 0xffffffff
jmp 0x41091a
mov eax, dword [0x5a2644]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
jne 0x410918
push 0x40005
call fcn.0040435c
add esp, 4
or eax, 0xffffffff
jmp 0x41091a
xor eax, eax
mov esp, ebp
pop ebp
ret