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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2bc
mov eax, dword [0x1008050]
mov dword [ebp - 4], eax
call fcn.01003b7e
test eax, eax
je 0x100221c
push ebx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x20c]
stosw word es:[edi], ax
push 0x208
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x25
pop ecx
xor eax, eax
lea edi, [ebp - 0x2a0]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2a0]
push eax
mov dword [ebp - 0x2a0], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor esi, esi
test eax, eax
je 0x10021d3
xor ebx, ebx
cmp dword [ebp - 0x290], 2
sete bl
jmp 0x10021db
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
call fcn.01001fef
cmp ebx, esi
mov eax, dword [ebp + 8]
mov dword [0x10085b0], eax
je 0x10021fc
push 0x1001288
push esi
push 1
call fcn.01002027
push eax
jmp 0x1002205
push 0x1001270
push esi
push 1
push esi
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
call edi
cmp eax, esi
mov dword [ebp - 0x2a8], eax
jne 0x1002228
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
call fcn.01003c13
leave
ret 0x10
push dword [ebp - 0x2a8]
call fcn.01001d76
cmp ebx, esi
je 0x1002249
push 0x1001258
push 0x10
push esi
push 4
call fcn.01002027
push eax
jmp 0x1002254
push 0x1001244
push 0x10
push esi
push 4
push esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, esi
mov dword [ebp - 0x2a4], eax
je 0x1002217
cmp ebx, esi
je 0x1002278
push 0x100122c
push esi
call fcn.01002027
push eax
jmp 0x100227f
push 0x100121c
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, esi
mov dword [ebp - 0x2ac], eax
jne 0x10022a0
push dword [ebp - 0x2a4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002217
cmp ebx, esi
je 0x10022b3
push 0x1001204
push esi
push esi
call fcn.01002027
push eax
jmp 0x10022bb
push 0x10011f4
push esi
push esi
push esi
call edi
cmp eax, esi
mov dword [ebp - 0x2b0], eax
jne 0x10022dd
push dword [ebp - 0x2ac]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x2a4]
jmp 0x100234a
cmp ebx, esi
je 0x10022f0
push 0x10011d8
push esi
push esi
call fcn.01002027
push eax
jmp 0x10022f8
push 0x10011c4
push esi
push esi
push esi
call edi
cmp eax, esi
mov dword [ebp - 0x2b4], eax
jne 0x100230c
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002334
lea eax, [ebp - 0x2bc]
push eax
push esi
push esi
push 0x1001eb8
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, esi
jne 0x1002351
push dword [ebp - 0x2b4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x2ac]
call esi
push dword [ebp - 0x2a4]
call esi
push dword [ebp - 0x2b0]
call esi
jmp 0x1002217
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
push 0x10085c0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp dword [0x10082e4], esi
jne 0x100237a
call fcn.01002bdd
cmp eax, esi
jl 0x1002219
call fcn.0100258a
cmp dword [0x10082dc], esi
je 0x1002391
push 0x8ba
call fcn.01002956
push dword [ebp - 0x2a8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2b8], eax
mov eax, dword [ebp - 0x2b8]
sub eax, dword [ebp - 0x2a8]
add eax, 0xea60
jns 0x10023c4
xor eax, eax
push eax
push dword [ebp - 0x2b0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, eax
call dword [sym.imp.WINMM.dll_timeGetTime]
cmp ebx, 0x102
mov dword [ebp - 0x2a8], eax
jne 0x10023fc
cmp dword [0x10082dc], esi
mov dword [ebp - 0x2b8], eax
je 0x10023af
call fcn.01002551
jmp 0x10023af
cmp ebx, 0xffffffff
je 0x10023af
push 0x10085c0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
push esi
push esi
push 0xf001f
push dword [ebp - 0x2a4]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
cmp ebx, esi
je 0x100253c
mov eax, dword [ebx]
dec eax
je 0x100248b
dec eax
je 0x1002456
dec eax
je 0x100244a
dec eax
jne 0x1002529
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebx + 4], eax
jmp 0x1002529
push esi
push ebx
call fcn.01002a1d
jmp 0x1002529
push ebx
call fcn.010030cd
mov dword [ebx + 0xc], eax
cmp dword [0x10082dc], esi
jne 0x1002529
call fcn.0100258a
cmp dword [0x10082dc], esi
je 0x1002529
push 0x8ba
call fcn.01002956
jmp 0x1002529
cmp dword [0x10082dc], esi
je 0x1002498
call fcn.0100290f
call fcn.01003020
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 0x2ac]
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x2a4]
call edi
push dword [ebp - 0x2b0]
call edi
mov eax, dword [0x10084fc]
cmp eax, esi
je 0x10024d7
push eax
call fcn.01003b39
mov eax, dword [0x1008504]
cmp eax, esi
je 0x10024e6
push eax
call fcn.01003b39
push 0x10085c0
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [0x10082c8]
cmp eax, esi
je 0x100251b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [0x10082c8], esi
mov dword [0x10082c4], esi
mov dword [0x10082c0], esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x10085c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10023af