Function at 0x409870
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45d918
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x48e0ec]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
call fcn.004495bb
mov esi, eax
push esi
mov edi, esi
call fcn.00404d70
push 0x462ec4
push esi
call fcn.004061f0
add esp, 0x10
test al, al
jne 0x4098fa
push 0x462ec8
push esi
call fcn.004061f0
add esp, 8
test al, al
jne 0x4098fa
push str.C:Users
push esi
call fcn.004061f0
add esp, 8
test al, al
jne 0x4098fa
push str.C:Users_
push esi
call fcn.004061f0
add esp, 8
test al, al
je 0x4099b8
call fcn.00407920
mov edi, eax
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp byte [edi], 0
jne 0x40991c
xor ecx, ecx
jmp 0x40992a
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409921
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x28]
call fcn.0040bf90
push str.Spotify.exe
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00405260
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x409958
mov eax, dword [eax]
push eax
call fcn.004495bb
mov esi, eax
add esp, 4
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x409978
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.0040c280
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov dword [ebp - 4], 0xffffffff
cmp eax, 0x10
jb 0x4099a6
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.0040c280
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
test byte [ebp + 0xc], 8
je 0x4099e5
push esi
call fcn.00406db0
add esp, 4
cmp eax, 0x20
jne 0x4099d6
mov eax, 0xe
jmp 0x409b24
push edi
push esi
call fcn.00407fd0
add esp, 8
jmp 0x409b24
mov ebx, dword [sym.imp.KERNEL32.DLL_CreateMutexW]
push str.Spotify_Update_Mutex
push 0
push 0
call ebx
push 0x32
call dword [sym.imp.KERNEL32.DLL_Sleep]
push str.Spotify_Update_Started_Mutex
push 0
push 0
call ebx
mov ebx, eax
test ebx, ebx
je 0x409a2b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x409a2b
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ebx, dword [sym.imp.KERNEL32.DLL_CreateMutexW]
jmp 0x4099f6
call fcn.00408520
call fcn.00408600
push str.Spotify_Update_Failed_Mutex
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.DLL_OpenMutexW]
test eax, eax
je 0x409a59
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x409b24
push esi
call fcn.00406db0
add esp, 4
mov dword [ebp - 0x44], eax
cmp eax, 0x20
je 0x4099cc
mov ebx, edi
call fcn.00407920
mov dword [ebp - 0x48], eax
test eax, eax
je 0x409adc
test byte [ebp + 0xc], 0x10
jne 0x409adc
push edi
push eax
call fcn.004061f0
add esp, 8
test al, al
jne 0x409adc
cmp dword [ebp - 0x44], 5
je 0x409aa3
push edi
call fcn.00408350
add esp, 4
test al, al
jne 0x409adc
test byte [ebp + 0xc], 4
mov ebx, dword [ebp - 0x48]
jne 0x409adc
call fcn.004083f0
test eax, eax
je 0x409ace
call fcn.004082e0
cmp eax, 1
jne 0x409ace
mov eax, dword [ebp + 0xc]
or eax, 8
push eax
push esi
call fcn.00405ec0
jmp 0x409ad5
push edi
push esi
call fcn.00407fd0
add esp, 8
test eax, eax
jne 0x409b24
push dword [0x495b6c]
push dword [0x495b68]
push ebx
call fcn.00404370
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x409b22
push ebx
call fcn.00406bc0
add esp, 4
test esi, esi
jne 0x409b22
test byte [ebp + 0xc], 2
jne 0x409b22
push str.__UPDATECOMPLETE
push ebx
call fcn.00409eb0
add esp, 8
mov ecx, 0x11
test al, al
cmove esi, ecx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00423c9a
mov esp, ebp
pop ebp
ret