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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
push ebx
push esi
push edi
push 0x200
push 0x42d3b0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x200
push 0x42cd40
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x4dcd7c
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x4dcd80
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x4dcd88
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x42cd40
call fcn.0040820a
add esp, 4
test eax, eax
jne 0x412297
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 5
je 0x412297
cmp dword [ebp - 8], 2
je 0x412297
push 0x40001
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4125e4
push 0x4dcd90
push 0x42d3b0
call fcn.0041d138
add esp, 8
push 0x4dcd94
push 0x42d3b0
call fcn.0041d138
add esp, 8
push 0x4dcd9c
push 0x42d3b0
call fcn.0041d138
add esp, 8
cmp dword [ebp + 8], 0
je 0x4123a3
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x34c]
push eax
call fcn.0041d13c
add esp, 8
push 0x4dcda4
lea eax, [ebp - 0x34c]
push eax
call fcn.0041d138
add esp, 8
push 0x4dcda8
lea eax, [ebp - 0x34c]
push eax
call fcn.0041d138
add esp, 8
push 0x4dcdb0
lea eax, [ebp - 0x34c]
push eax
call fcn.0041d138
add esp, 8
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x14c], eax
cmp dword [ebp - 0x14c], 0xffffffff
je 0x4123a3
push 0
push 0x42d3b0
lea eax, [ebp - 0x34c]
push eax
call fcn.00408230
add esp, 0xc
test eax, eax
jne 0x41238f
mov eax, dword [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x4000c
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4125e4
mov eax, dword [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4125e4
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0xc0000000
push 0x42d3b0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x42d5b0], eax
cmp dword [0x42d5b0], 0xffffffff
jne 0x4124c9
push 0x200
push 0x42cd40
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x4dcdb8
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x4dcdbc
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x4dcdc4
push 0x42cd40
call fcn.0041d138
add esp, 8
push 0x42cd40
push 0x42d3b0
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x41246d
cmp dword [ebp - 8], 5
je 0x41246d
cmp dword [ebp - 8], 2
je 0x41246d
cmp dword [ebp - 8], 0xb7
je 0x41246d
push 0x40002
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4125e4
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0xc0000000
push 0x42d3b0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x42d5b0], eax
cmp dword [0x42d5b0], 0xffffffff
jne 0x4124b8
push 0x40003
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4125e4
mov eax, dword [0x42d5b0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4124d5
mov eax, dword [0x42d5b0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x200
push 0x42d3b0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x4dcdcc
push 0x42d3b0
call fcn.0041d138
add esp, 8
push str.haspvdd
push 0x42d3b0
call fcn.0041d138
add esp, 8
push 0x4dcdd8
push 0x42d3b0
call fcn.0041d138
add esp, 8
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0xc0000000
push 0x42d3b0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x42cd30], eax
cmp dword [0x42cd30], 0xffffffff
jne 0x412561
push 0x40003
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4125e4
push 0
lea eax, [ebp - 4]
push eax
push 0x1a00
push 0x4da458
mov eax, dword [0x42cd30]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4125ad
mov eax, dword [0x42cd30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x40004
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4125e4
mov eax, dword [0x42cd30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4125dd
push 0x40005
call fcn.004064f2
add esp, 4
mov eax, 0xffffffff
jmp 0x4125e4
xor eax, eax
jmp 0x4125e4
pop edi
pop esi
pop ebx
leave
ret