Function at 0xca893
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 [0xda160]
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, 0xdac98
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, 0xdaa30
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.000cb50b
add esp, 0x1c
test al, al
jne 0xca912
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.000d27dd
pop ecx
test al, al
pop ecx
jne 0xca93c
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 0xd5900
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.000cb6a2
add esp, 0x10
test al, al
je 0xcaab5
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0xca9bf
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.000d2754
add esp, 0x10
test al, al
je 0xca9d5
push 1
push edi
lea eax, [ebp - 0x220]
push edi
push eax
push str.open
push edi
jmp 0xcaa5f
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.000d2754
add esp, 0x10
test al, al
je 0xcaa65
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, 0xd5608
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.000cb341
add esp, 0x10
mov byte [ebp - 1], al
test al, al
je 0xcaa9d
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.000cb7d4
add esp, 0xc
jmp 0xcaaa8
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [ebp - 1], 0
je 0xcaa65
xor edi, edi
jmp 0xca93c
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 0xd47f4
push 0xdaa18
call ebx
pop ecx
mov esi, 0xdac98
test al, al
pop ecx
je 0xcab6f
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, 0xdaa30
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.000cb50b
add esp, 0x1c
test al, al
je 0xcab55
lea eax, [ebp - 0x208]
mov ecx, 0xdaa18
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 0xd47f4
push 0xdaa18
call ebx
pop ecx
test al, al
pop ecx
je 0xcab6f
push 1
pop eax
jmp 0xcac1e
cmp byte [0xdad40], 0
je 0xcac1c
mov edi, 0xdaa18
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0xdaa11], 0
je 0xcabc7
mov ecx, 0xdaa40
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 [0xdaa10]
push eax
mov al, byte [0xdaa28]
push eax
mov al, byte [0xdac5c]
push eax
mov al, byte [0xdac5d]
push eax
mov al, byte [0xdaa50]
push eax
call fcn.000c7c44
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, 0xdaa30
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.000cb771
add esp, 0x20
cmp byte [0xdad40], 0
jne 0xcab81
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4