Function at 0x5b48b0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0xf4]
mov edi, dword [esi + 0x50]
cmp eax, 1
mov dword [ebp - 0xc], edi
jne 0x5b48e8
push 0x636cc4
push edi
call fcn.005c4ce0
add esp, 8
test eax, eax
jne 0x5b48e8
mov dword [ebp - 0xc], 0x636cc8
jmp 0x5b492b
push 0x636cd0
push edi
call fcn.005c4ce0
add esp, 8
test eax, eax
jne 0x5b492e
mov eax, dword [esi + 0xa4]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileType]
push eax
call ebx
cmp eax, 2
je 0x5b4924
mov eax, dword [0x7083c0]
test eax, eax
je 0x5b492e
mov ecx, dword [esi + 0xa4]
push ecx
call ebx
test eax, eax
jne 0x5b492e
mov dword [ebp - 0xc], 0x636cd8
mov edi, dword [ebp - 0xc]
push edi
call fcn.005b4c00
mov ecx, dword [0x636b94]
add esp, 4
cmp ecx, 2
mov dword [ebp - 0x18], eax
jl 0x5b49be
mov esi, eax
shl esi, 3
sub esi, eax
shl esi, 2
mov dword [ebp - 8], esi
mov eax, dword [esi + 0xa478a4]
test eax, eax
jne 0x5b4998
lea ebx, [esi + 0xa478a8]
push ebx
call fcn.005ad510
add esp, 4
test eax, eax
je 0x5b4976
mov eax, 0xc0000098
jmp 0x5b499a
mov eax, dword [esi + 0xa478a4]
test eax, eax
jne 0x5b4992
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 0xa478a4], eax
mov dword [ebx], 0
xor eax, eax
test eax, eax
jne 0x5b49e2
mov edx, dword [esi + 0xa478a4]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esi + 0xa478a8]
push eax
call fcn.005ad510
add esp, 4
jmp 0x5b49e2
mov ecx, eax
shl ecx, 3
sub ecx, eax
shl ecx, 2
mov dword [ebp - 8], ecx
mov eax, dword [ecx + 0xa478a8]
test eax, eax
jne 0x5b49df
mov dword [ecx + 0xa478a8], 1
mov esi, dword [ebp - 8]
cmp dword [0x636b94], 1
jl 0x5b49fa
lea edx, [esi + 0xa478b4]
push edx
call fcn.005ad4b0
add esp, 4
mov ebx, dword [esi + 0xa478a0]
xor eax, eax
test ebx, ebx
mov dword [ebp - 0x10], eax
je 0x5b4a5b
jmp 0x5b4a0e
mov edi, dword [ebp - 0xc]
mov esi, dword [ebx + 8]
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x5b4a37
test cl, cl
je 0x5b4a33
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x5b4a37
add eax, 2
add esi, 2
test cl, cl
jne 0x5b4a13
xor eax, eax
jmp 0x5b4a3c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jle 0x5b4a49
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebx]
test ebx, ebx
jne 0x5b4a0b
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
test ebx, ebx
je 0x5b4a5b
test eax, eax
je 0x5b4bae
lea eax, [ebp - 4]
push eax
push 0
push 0x24
call fcn.005a3d00
add esp, 0xc
mov dword [ebp - 0x14], eax
test eax, eax
je 0x5b4ab5
cmp dword [0x636b94], 1
jl 0x5b4a8a
lea ecx, [esi + 0xa478b4]
push ecx
call fcn.005ad4e0
add esp, 4
mov eax, dword [0x636b94]
mov dword [esi + 0xa478a8], 0
cmp eax, 2
jl 0x5b4aab
mov edx, dword [esi + 0xa478a4]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
or ecx, 0xffffffff
add eax, 8
push eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push 0
push ecx
call fcn.005a3d00
mov edi, eax
add esp, 0xc
test edi, edi
je 0x5b4b28
mov ecx, dword [ebp - 4]
push ecx
call fcn.005a3d70
mov eax, dword [0x636b94]
mov esi, dword [ebp - 8]
add esp, 4
cmp eax, 1
jl 0x5b4afe
lea edx, [esi + 0xa478b4]
push edx
call fcn.005ad4e0
add esp, 4
mov eax, dword [0x636b94]
mov dword [esi + 0xa478a8], 0
cmp eax, 2
jl 0x5b4b1f
mov eax, dword [esi + 0xa478a4]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 4]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [eax + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 4]
test ebx, ebx
mov dword [ecx], ebx
mov eax, dword [ebp - 4]
je 0x5b4b5b
mov dword [ebx + 4], eax
mov ecx, dword [ebp - 0x10]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 4]
test ecx, ecx
je 0x5b4b6c
mov dword [ecx], eax
jmp 0x5b4b75
mov edx, dword [ebp - 8]
mov dword [edx + 0xa478a0], eax
mov dword [eax + 0x18], 0
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov byte [eax + 0x1c], 0
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x1d], 0
mov edx, dword [ebp - 4]
mov byte [edx + 0x1e], 0
mov eax, dword [ebp - 4]
mov byte [eax + 0x1f], 0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
mov byte [ecx + 0x20], 0
mov edx, dword [ebp - 4]
mov dword [edx + 0x14], eax
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x7c], ebx
mov ecx, dword [ebx + 0x18]
inc ecx
mov dword [ebx + 0x18], ecx
mov eax, dword [0x636b94]
cmp eax, 1
jl 0x5b4bd4
lea edx, [esi + 0xa478b4]
push edx
call fcn.005ad4e0
add esp, 4
mov eax, dword [0x636b94]
mov dword [esi + 0xa478a8], 0
cmp eax, 2
jl 0x5b4bf5
mov eax, dword [esi + 0xa478a4]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret