Function at 0x5a8570
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x5a8587
or edi, eax
jmp 0x5a8589
mov edi, eax
xor ebx, ebx
cmp edi, 0x69
jge 0x5a8596
inc edi
jmp 0x5a876f
lea ecx, [ebp - 0xc]
lea edx, [ebp - 4]
push ecx
lea eax, [ebp - 8]
lea esi, [edi - 5]
push edx
push eax
push esi
call fcn.005a7f30
add esp, 0x10
cmp eax, ebx
je 0x5a85be
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
cmp ecx, ebx
je 0x5a870a
cmp dword [ecx + 0xb8], esi
jne 0x5a85d7
mov ecx, dword [ecx + 0x18]
mov dword [ebp - 4], ecx
cmp ecx, ebx
je 0x5a870a
mov eax, dword [ecx + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, ebx
je 0x5a8b49
call esi
mov ecx, dword [ebp - 4]
cmp dword [ecx + 8], eax
jne 0x5a8b49
mov esi, 0xc0000028
cmp dword [0x636b94], 1
jl 0x5a8626
mov eax, dword [ebp - 8]
mov ecx, eax
shl ecx, 3
sub ecx, eax
lea edx, [ecx*4 + 0xa4b1d0]
push edx
call fcn.005ad4e0
add esp, 4
cmp dword [0x636b94], 2
jl 0x5a865d
mov ecx, dword [ebp - 8]
mov eax, ecx
shl eax, 3
sub eax, ecx
shl eax, 2
mov dword [eax + 0xa4b1c4], ebx
mov eax, dword [eax + 0xa4b1c0]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp + 0xc]
mov eax, esi
mov dword [edx], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov ecx, eax
shl ecx, 3
sub ecx, eax
mov eax, esi
mov dword [ecx*4 + 0xa4b1c4], ebx
mov dword [edx], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x636b94], eax
jl 0x5a869e
mov eax, dword [ebp - 8]
mov ecx, eax
shl ecx, 3
sub ecx, eax
lea edx, [ecx*4 + 0xa4b1d0]
push edx
call fcn.005ad4e0
add esp, 4
cmp dword [0x636b94], 2
jl 0x5a86cc
mov ecx, dword [ebp - 8]
mov eax, ecx
shl eax, 3
sub eax, ecx
shl eax, 2
mov dword [eax + 0xa4b1c4], ebx
mov eax, dword [eax + 0xa4b1c0]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x5a8b0a
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0x10]
mov ecx, eax
push edx
shl ecx, 3
sub ecx, eax
mov eax, dword [ebp - 4]
push eax
mov dword [ecx*4 + 0xa4b1c4], ebx
call fcn.005a80a0
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
add esp, 8
mov dword [edx], ecx
mov ecx, dword [ecx + 0xb8]
mov edx, dword [ebp + 0xc]
add ecx, 5
mov dword [edx], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x636b94], 1
jl 0x5a872d
mov eax, dword [ebp - 8]
mov ecx, eax
shl ecx, 3
sub ecx, eax
lea edx, [ecx*4 + 0xa4b1d0]
push edx
call fcn.005ad4e0
add esp, 4
cmp dword [0x636b94], 2
jl 0x5a875b
mov ecx, dword [ebp - 8]
mov eax, ecx
shl eax, 3
sub eax, ecx
shl eax, 2
mov dword [eax + 0xa4b1c4], ebx
mov eax, dword [eax + 0xa4b1c0]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp - 8]
jmp 0x5a876c
mov eax, dword [ebp - 8]
mov ecx, eax
shl ecx, 3
sub ecx, eax
mov dword [ecx*4 + 0xa4b1c4], ebx
lea edi, [eax + 1]
cmp edi, 0x272
mov dword [ebp - 0xc], edi
jge 0x5a8b37
mov edx, edi
shl edx, 3
sub edx, edi
lea esi, [edx*4 + 0xa4b1c0]
cmp dword [esi + 0x18], ebx
je 0x5a8915
cmp esi, 0xa4bd3c
jge 0x5a8867
cmp dword [esi + 0xc], ebx
je 0x5a87b5
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
je 0x5a8930
cmp dword [0x636b94], 2
jl 0x5a8810
cmp dword [esi], ebx
jne 0x5a87ea
lea edi, [esi + 4]
push edi
call fcn.005ad510
add esp, 4
test eax, eax
je 0x5a87d9
mov eax, 0xc0000098
jmp 0x5a87ec
cmp dword [esi], ebx
jne 0x5a87e8
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi], eax
mov dword [edi], ebx
xor eax, eax
cmp eax, ebx
je 0x5a87f7
mov eax, 0xc0000098
jmp 0x5a8825
mov eax, dword [esi]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ecx, [esi + 4]
push ecx
call fcn.005ad510
add esp, 4
jmp 0x5a8825
cmp dword [esi + 4], ebx
je 0x5a881c
mov eax, 0xc0000098
jmp 0x5a8825
mov dword [esi + 4], 1
xor eax, eax
cmp eax, ebx
jne 0x5a8944
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 8], eax
mov dword [esi + 0xc], 1
mov eax, dword [esi + 0x18]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x5a8958
mov eax, dword [0x636b94]
mov dword [esi + 0xc], ebx
cmp eax, 2
mov dword [esi + 4], ebx
jl 0x5a8915
mov edx, dword [esi]
push edx
jmp 0x5a890f
cmp dword [0x636b94], 2
jl 0x5a88bb
cmp dword [esi], ebx
jne 0x5a889c
lea edi, [esi + 4]
push edi
call fcn.005ad510
add esp, 4
test eax, eax
je 0x5a888b
mov eax, 0xc0000098
jmp 0x5a889e
cmp dword [esi], ebx
jne 0x5a889a
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi], eax
mov dword [edi], ebx
xor eax, eax
cmp eax, ebx
jne 0x5a88c7
mov eax, dword [esi]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ecx, [esi + 4]
push ecx
call fcn.005ad510
add esp, 4
jmp 0x5a88c7
cmp dword [esi + 4], ebx
jne 0x5a88c7
mov dword [esi + 4], 1
mov eax, dword [0x636b94]
mov edi, 1
cmp eax, edi
jl 0x5a88e1
lea edx, [esi + 0x10]
push edx
call fcn.005ad4b0
add esp, 4
mov ecx, dword [esi + 0x18]
cmp ecx, ebx
mov dword [ebp - 4], ecx
jne 0x5a8962
cmp dword [0x636b94], edi
jl 0x5a88ff
lea eax, [esi + 0x10]
push eax
call fcn.005ad4e0
add esp, 4
mov eax, dword [0x636b94]
mov dword [esi + 4], ebx
cmp eax, 2
jl 0x5a8915
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp - 0xc]
add esi, 0x1c
inc edx
cmp esi, 0xa4f638
mov dword [ebp - 0xc], edx
jge 0x5a8b37
jmp 0x5a878c
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0xc]
mov eax, 0xc0000028
mov dword [ecx], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0xc]
mov eax, 0xc0000098
mov dword [ecx], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
push edx
push eax
jmp 0x5a8b12
cmp dword [ecx + 0xc], ebx
je 0x5a897f
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebp - 4]
cmp dword [ecx + 8], eax
jne 0x5a897f
mov esi, 0xc0000028
jmp 0x5a8a3e
mov eax, dword [0x636b94]
mov edi, 2
cmp eax, edi
jl 0x5a8a00
cmp dword [ecx], ebx
jne 0x5a89d7
add ecx, 4
push ecx
call fcn.005ad510
add esp, 4
test eax, eax
je 0x5a89ab
mov ecx, dword [ebp - 4]
mov eax, 0xc0000098
jmp 0x5a89d9
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
jne 0x5a89cd
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
xor eax, eax
mov dword [edx + 4], ebx
mov ecx, dword [ebp - 4]
jmp 0x5a89d9
mov dword [eax + 4], ebx
mov ecx, dword [ebp - 4]
xor eax, eax
jmp 0x5a89d9
xor eax, eax
cmp eax, ebx
je 0x5a89e4
mov eax, 0xc0000098
jmp 0x5a8a15
mov eax, dword [ecx]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 4]
add ecx, 4
push ecx
call fcn.005ad510
add esp, 4
jmp 0x5a8a15
cmp dword [ecx + 4], ebx
je 0x5a8a0c
mov eax, 0xc0000098
jmp 0x5a8a15
mov dword [ecx + 4], 1
xor eax, eax
cmp eax, ebx
je 0x5a8a25
mov esi, 0xc0000098
mov edi, 1
jmp 0x5a8a3e
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 4]
mov eax, 1
mov dword [ecx + 0xc], eax
jmp 0x5a8ab1
mov eax, dword [0x636b94]
cmp eax, edi
mov edi, dword [ebp - 0xc]
jl 0x5a8a61
mov edx, edi
shl edx, 3
sub edx, edi
lea eax, [edx*4 + 0xa4b1d0]
push eax
call fcn.005ad4e0
add esp, 4
cmp dword [0x636b94], 2
jl 0x5a8a95
mov eax, edi
shl eax, 3
sub eax, edi
shl eax, 2
mov dword [eax + 0xa4b1c4], ebx
mov ecx, dword [eax + 0xa4b1c0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov edx, edi
shl edx, 3
sub edx, edi
mov dword [edx*4 + 0xa4b1c4], ebx
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x636b94]
mov esi, dword [ebp - 0xc]
cmp ecx, eax
jl 0x5a8ad5
mov ecx, esi
shl ecx, 3
sub ecx, esi
lea edx, [ecx*4 + 0xa4b1d0]
push edx
call fcn.005ad4e0
add esp, 4
cmp dword [0x636b94], edi
jl 0x5a8afc
mov eax, esi
shl eax, 3
sub eax, esi
shl eax, 2
mov dword [eax + 0xa4b1c4], ebx
mov eax, dword [eax + 0xa4b1c0]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x5a8b0a
mov ecx, esi
shl ecx, 3
sub ecx, esi
mov dword [ecx*4 + 0xa4b1c4], ebx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
push edx
push eax
call fcn.005a80a0
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
add esp, 8
mov dword [edx], ecx
mov ecx, dword [ecx + 0xb8]
mov edx, dword [ebp + 0xc]
add ecx, 5
mov dword [edx], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov dword [eax], 0xffffffff
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp dword [0x636b94], 2
jl 0x5a8bc5
cmp dword [ecx], ebx
jne 0x5a8b9c
add ecx, 4
push ecx
call fcn.005ad510
add esp, 4
test eax, eax
je 0x5a8b70
mov ecx, dword [ebp - 4]
mov eax, 0xc0000098
jmp 0x5a8b9e
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
jne 0x5a8b92
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 4]
mov dword [edx], eax
mov eax, dword [ebp - 4]
mov dword [eax + 4], ebx
mov ecx, dword [ebp - 4]
xor eax, eax
jmp 0x5a8b9e
mov dword [eax + 4], ebx
mov ecx, dword [ebp - 4]
xor eax, eax
jmp 0x5a8b9e
xor eax, eax
cmp eax, ebx
je 0x5a8ba9
mov eax, 0xc0000098
jmp 0x5a8bda
mov ecx, dword [ecx]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 4]
add edx, 4
push edx
call fcn.005ad510
add esp, 4
jmp 0x5a8bda
cmp dword [ecx + 4], ebx
je 0x5a8bd1
mov eax, 0xc0000098
jmp 0x5a8bda
mov dword [ecx + 4], 1
xor eax, eax
cmp eax, ebx
je 0x5a8be8
mov esi, 0xc0000098
jmp 0x5a8603
call esi
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 4]
mov eax, 1
mov dword [edx + 0xc], eax
jmp 0x5a867c