Function at 0x100586f7
Capabilities:
Check mutex on windows

Disassembly:
push 0x14
mov eax, 0x1013cf28
call fcn.101018b2
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 8], ebx
mov dword [ebp - 4], 1
jne 0x10058954
mov eax, dword [ebp + 8]
cmp dword [eax - 8], ebx
je 0x10058954
mov ecx, dword [ebp + 0xc]
cmp dword [ecx - 8], ebx
je 0x10058954
push eax
call fcn.100dd2fb
test eax, eax
pop ecx
je 0x10058954
lea eax, [ebp + 8]
push eax
lea ecx, [esi + 0x10]
call fcn.10005459
lea eax, [ebp + 0xc]
push eax
lea ecx, [esi + 0x14]
call fcn.10005459
push 0x44
lea edi, [esi + 0x18]
push ebx
push edi
call fcn.101027c0
mov dword [edi], 0x44
lea edi, [esi + 0x98]
push edi
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x44], 1
mov word [esi + 0x48], 5
mov word [esi + 0x4a], bx
mov dword [esi + 0x4c], ebx
call fcn.100e6e5d
add esp, 0x10
cmp dword [edi], ebx
je 0x1005885a
push str.S_1_16_4096
lea ecx, [ebp - 0x18]
call fcn.1000587e
xor eax, eax
mov dword [ebp - 0x20], ebx
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
lea eax, [esi + 0x9c]
push eax
mov edi, 0x2000000
push edi
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1005880e
lea eax, [esi + 0xa0]
push eax
push 1
push 2
push ebx
push edi
push dword [esi + 0x9c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x1005880e
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x1005880e
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], 0x20
mov dword [ebp - 0x20], eax
cmp dword [esi + 0xa0], ebx
je 0x10058852
push dword [ebp - 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
call edi
add eax, 8
push eax
lea eax, [ebp - 0x20]
push eax
push 0x19
push dword [esi + 0xa0]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push dword [ebp - 0x10]
call edi
add eax, 8
push eax
lea eax, [ebp - 0x20]
push eax
push 0x19
push dword [esi + 0xa0]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
lea ecx, [ebp - 0x18]
call fcn.100015d9
mov eax, dword [0x1019a028]
mov dword [ebp - 0x10], eax
mov edi, 0x104
push edi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.10001a82
mov eax, dword [0x1019fa90]
push edi
push ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
call fcn.10001a82
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
call fcn.10001c5b
push 0x5c
lea ecx, [ebp - 0x10]
call fcn.1001dab5
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.1000584b
cmp dword [ebp - 0x14], 0xffffffff
mov byte [ebp - 4], 3
je 0x100588ed
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 8]
sub eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
dec eax
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1000e753
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.10005459
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.100015d9
push dword [0x1019e58c]
mov ecx, 0x1019ee80
push ebx
call fcn.1001018e
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x100589f9
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x100589f0
push dword [0x1019e588]
lea ecx, [esi + 0x70]
call fcn.10057d64
test eax, eax
jne 0x1005896e
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x18]
call fcn.100015d9
lea ecx, [ebp - 0x10]
call fcn.100015d9
lea ecx, [ebp + 8]
call fcn.100015d9
lea ecx, [ebp + 0xc]
call fcn.100015d9
xor eax, eax
call fcn.1010198a
ret 8
push dword [ebp + 0xc]
mov eax, dword [esi + 0x78]
mov ebx, 0x1015719c
push ebx
push 0xffffffffffffffff
add eax, 0x4f0
push edi
push eax
call fcn.10101c5e
add esp, 0x14
lea eax, [ebp - 0x1c]
push eax
mov ecx, 0x1019e718
call fcn.100375dd
push dword [eax]
mov eax, dword [esi + 0x78]
push ebx
push 0xffffffffffffffff
add eax, 0x900
push edi
push eax
call fcn.10101c5e
add esp, 0x14
lea ecx, [ebp - 0x1c]
call fcn.100015d9
push dword [ebp - 0x18]
mov eax, dword [esi + 0x78]
push ebx
push 0xffffffffffffffff
add eax, 0x2e8
push edi
push eax
call fcn.10101c5e
mov eax, dword [esi + 0x78]
push 0x208
add eax, 0x6f8
push 0
push eax
call fcn.101027c0
add esp, 0x20
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor ebx, ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 8], ebx
jne 0x10058a17
push 0x10057de7
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x100586a0
mov dword [esi + 8], eax
call fcn.10101ac2
pop ecx
lea ecx, [ebp - 0x18]
call fcn.100015d9
lea ecx, [ebp - 0x10]
call fcn.100015d9
lea ecx, [ebp + 8]
call fcn.100015d9
lea ecx, [ebp + 0xc]
call fcn.100015d9
xor eax, eax
inc eax
jmp 0x10058966