Function at 0x1001f5d
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Create thread
Get common file path
Set current directory
Terminate process

Disassembly:
sub esp, 0x2b8
call fcn.010034f1
test eax, eax
je 0x1002026
push ebx
push ebp
push esi
push edi
xor eax, eax
lea edi, [esp + 0xc0]
stosw word es:[edi], ax
push 0x208
lea eax, [esp + 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0xc0]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x25
pop ecx
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x30], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor ebx, ebx
test eax, eax
je 0x1001fd4
xor eax, eax
cmp dword [esp + 0x3c], 2
sete al
mov dword [esp + 0x10], eax
jmp 0x1001fde
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], ebx
call fcn.01001ecd
mov edi, dword [esp + 0x10]
cmp edi, ebx
mov eax, dword [esp + 0x2cc]
mov dword [0x1007510], eax
je 0x1002007
push 0x1001278
push ebx
push 1
call fcn.01001efe
push eax
jmp 0x1002010
push 0x1001260
push ebx
push 1
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
call esi
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x100202f
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2b8
ret 0x10
cmp edi, ebx
je 0x1002053
push 0x1001248
push 0x10
push ebx
push 4
call fcn.01001efe
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebp, eax
mov dword [esp + 0x1c], ebp
jmp 0x100206c
push 0x1001234
push 0x10
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esp + 0x1c], eax
mov ebp, eax
cmp ebp, ebx
je 0x1002020
cmp edi, ebx
je 0x100208e
push 0x100121c
push ebx
call fcn.01001efe
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
mov dword [esp + 0x20], edi
jmp 0x10020a1
push 0x100120c
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esp + 0x20], eax
mov edi, eax
cmp edi, ebx
jne 0x10020b1
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002020
cmp dword [esp + 0x10], ebx
je 0x10020c6
push 0x10011f4
push ebx
push ebx
call fcn.01001efe
push eax
jmp 0x10020ce
push 0x10011e4
push ebx
push ebx
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x18], eax
jne 0x10020e4
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebp
jmp 0x1002141
cmp dword [esp + 0x10], ebx
je 0x10020f9
push 0x10011c8
push ebx
push ebx
call fcn.01001efe
push eax
jmp 0x1002101
push 0x10011b4
push ebx
push ebx
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x1002113
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002137
lea eax, [esp + 0x28]
push eax
push ebx
push ebx
push 0x1001db5
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
jne 0x1002148
push dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
push ebp
call esi
push dword [esp + 0x18]
call esi
jmp 0x1002020
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ebp, 0x1007520
push ebp
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp dword [0x1007290], ebx
jne 0x1002172
call fcn.01002690
cmp eax, ebx
jl 0x1002022
call fcn.0100231d
cmp dword [0x1007288], ebx
je 0x1002189
push 0x8ba
call fcn.01002453
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetEvent]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
sub eax, dword [esp + 0x14]
add eax, 0xea60
jns 0x10021b2
xor eax, eax
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
call dword [sym.imp.WINMM.dll_timeGetTime]
cmp esi, 0x102
mov dword [esp + 0x14], eax
jne 0x10021e4
cmp dword [0x1007288], ebx
mov dword [esp + 0x24], eax
je 0x10021a1
call fcn.0100240c
jmp 0x10021a1
cmp esi, 0xffffffff
je 0x10021a1
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
push ebx
push ebx
push 0xf001f
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
je 0x10022df
mov eax, dword [esi]
dec eax
je 0x1002266
dec eax
je 0x1002238
dec eax
je 0x100222c
dec eax
jne 0x10022ce
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esi + 4], eax
jmp 0x10022ce
push ebx
push esi
call fcn.01002503
jmp 0x10022ce
push esi
call fcn.01002b33
mov dword [esi + 0xc], eax
cmp dword [0x1007288], ebx
jne 0x10022ce
call fcn.0100231d
cmp dword [0x1007288], ebx
je 0x10022ce
push 0x8ba
call fcn.01002453
jmp 0x10022ce
cmp dword [0x1007288], ebx
je 0x1002273
call fcn.01002411
call fcn.01002a8d
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [esp + 0x20]
call edi
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x1c]
call edi
push dword [esp + 0x18]
call edi
mov eax, dword [0x100745c]
cmp eax, ebx
je 0x10022aa
push eax
call fcn.010034be
mov eax, dword [0x1007464]
cmp eax, ebx
je 0x10022b9
push eax
call fcn.010034be
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10021a1