Function at 0x4012a7
Capabilities:
Check mutex on windows
Copy file
Create process on windows
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10f78
call fcn.004016b0
mov eax, dword [0x409040]
xor eax, dword [ebp + 4]
push ebx
xor ebx, ebx
cmp dword [ebp + 8], 1
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
jne 0x4012de
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push 0x100
lea eax, [ebp - 0x478]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x678]
push eax
call fcn.004016f0
lea eax, [ebp - 0x678]
push 0x5c
push eax
call fcn.00401880
mov esi, eax
inc esi
push esi
call fcn.004017f0
add esp, 0x14
push esi
push 1
push ebx
mov byte [eax + esi - 4], bl
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
call esi
cmp eax, 0xb7
jne 0x401345
xor eax, eax
jmp 0x40161e
push edi
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
lea eax, [ebp - 0x478]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
jne 0x40137e
call esi
push eax
call fcn.0040108b
xor eax, eax
pop ecx
inc eax
jmp 0x40161d
lea eax, [ebp - 0x14]
push eax
push 4
push edi
call fcn.00401174
pop ecx
sub eax, 4
push eax
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.0040112e
lea eax, [ebp - 0x14]
push eax
push 4
push dword [ebp - 0x18]
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.0040112e
mov esi, dword [ebp - 0x18]
add esp, 0x28
add esi, 4
cmp dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
jbe 0x401450
lea edi, [ebp - 0x10f78]
lea eax, [ebp - 0x14]
push eax
push 0x100
push esi
lea eax, [ebp - 0x178]
push eax
push dword [ebp - 0x10]
call fcn.0040112e
lea eax, [ebp - 0x178]
push eax
push edi
call fcn.004016f0
push edi
call fcn.004017f0
lea esi, [esi + eax + 1]
lea eax, [ebp - 0x14]
push eax
push 4
push esi
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x10]
call fcn.0040112e
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x100], eax
lea eax, [ebp - 0x14]
push eax
push 4
add esi, 4
push esi
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call fcn.0040112e
mov eax, dword [ebp - 0x1c]
add esp, 0x48
add esi, 4
inc dword [ebp - 8]
mov dword [edi + 0x104], eax
mov eax, dword [ebp - 8]
add edi, 0x108
cmp eax, dword [ebp - 0xc]
jb 0x4013c7
mov edi, dword [ebp - 0x10]
xor esi, esi
cmp dword [ebp - 0xc], ebx
jbe 0x40146e
push esi
lea eax, [ebp - 0x10f78]
push eax
push edi
call fcn.00401185
add esp, 0xc
inc esi
cmp esi, dword [ebp - 0xc]
jb 0x401457
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], ebx
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [ebp - 8], ebx
jbe 0x401515
lea esi, [ebp - 0x10f78]
lea eax, [ebp - 0x578]
push esi
push eax
call fcn.004016f0
push dword [ebp - 8]
lea eax, [ebp - 0x10f78]
push eax
call fcn.00401288
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x278]
push esi
push eax
call fcn.004016f0
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x578]
push eax
call section..text
add esp, 0x20
lea eax, [ebp - 0x578]
push eax
call edi
cmp dword [ebp - 0x10], ebx
je 0x401500
push esi
call fcn.004017f0
pop ecx
push ebx
mov byte [eax + esi - 2], bl
push esi
lea eax, [ebp - 0x278]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x278]
push eax
call edi
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
add esi, 0x108
cmp eax, dword [ebp - 0xc]
jb 0x40148d
xor esi, esi
lea eax, [ebp - 0x378]
push 0x4071ce
inc esi
push eax
mov dword [ebp - 0x68], 0x44
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x3c], esi
mov word [ebp - 0x38], bx
mov word [ebp - 0x36], bx
mov dword [ebp - 0x34], ebx
call fcn.004016f0
cmp dword [ebp + 8], 1
pop ecx
mov dword [ebp - 8], esi
pop ecx
mov esi, 0x4071cc
jle 0x401587
lea eax, [ebp - 0x378]
push esi
push eax
call fcn.00401700
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
push dword [eax + ecx*4]
lea eax, [ebp - 0x378]
push eax
call fcn.00401700
add esp, 0x10
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jl 0x401557
lea eax, [ebp - 0x778]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x10f78]
push eax
lea eax, [ebp - 0x178]
push eax
call fcn.004016f0
lea eax, [ebp - 0x178]
push esi
push eax
call fcn.00401700
lea eax, [ebp - 0x378]
push eax
lea eax, [ebp - 0x178]
push eax
call fcn.00401700
add esp, 0x18
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x68]
push eax
push ebx
push ebx
push 0x20
push 1
push ebx
push ebx
lea eax, [ebp - 0x178]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0xffffffffffffffff
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp - 0xc], ebx
jbe 0x401612
lea esi, [ebp - 0x10f78]
push esi
call edi
inc ebx
add esi, 0x108
cmp ebx, dword [ebp - 0xc]
jb 0x401603
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.004016a2
leave
ret