Function at 0x408760
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
push ebp
lea ebp, [esp - 0x2ac]
sub esp, 0x2ac
push 0xffffffffffffffff
push 0x45d7dc
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x48e0ec]
xor eax, ebp
mov dword [ebp + 0x2a8], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x2b4]
xor eax, eax
mov dword [ebp - 0x14], eax
xor esi, esi
mov dword [ebp - 0x20], eax
mov byte [ebp - 0xd], al
mov byte [ebp - 0x15], al
xor al, al
push 0x48e020
mov dword [ebp - 0x14], esi
mov byte [ebp - 0x19], al
call fcn.0040c6d0
mov ebx, dword [ebp + 0x2b8]
add esp, 4
test ebx, ebx
jle 0x408a5d
cmp ebx, 2
jl 0x4088b7
push 0x4632b0
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x408828
push dword [edi + 4]
call fcn.004495bb
mov ecx, eax
mov edx, 0x495b28
add esp, 4
mov dword [0x495b04], ecx
sub edx, ecx
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x408810
add edi, 8
sub ebx, 2
jmp 0x408a52
push 0x4632b4
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x408856
push dword [edi + 4]
call fcn.004495bb
add esp, 4
mov dword [0x495b08], eax
add edi, 8
sub ebx, 2
jmp 0x408a52
push 0x4632b8
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x4088b7
mov eax, dword [edi + 4]
push 0x462958
mov dword [0x495ac8], eax
push dword [edi]
push 0x4632ac
push dword [0x495ad0]
push 4
call fcn.00403270
push 0x462958
mov dword [0x495ad0], eax
push dword [edi + 4]
push 0x4632ac
push eax
push 4
call fcn.00403270
add esp, 0x28
mov dword [0x495ad0], eax
add edi, 8
sub ebx, 2
jmp 0x408a52
push str.portable
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x4088f7
push 0x462958
mov byte [0x495acc], 1
push dword [edi]
push 0x4632ac
push dword [0x495ad0]
push 4
call fcn.00403270
add esp, 0x14
mov dword [0x495ad0], eax
jmp 0x408a4e
cmp ebx, 2
jl 0x40895b
push str.installer_name
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x40895b
mov eax, dword [edi + 4]
push 0x462958
push dword [edi]
mov dword [ebp - 0x14], eax
push 0x4632ac
push dword [0x495ad4]
push 4
call fcn.00403270
push 0x462958
mov dword [0x495ad4], eax
push dword [edi + 4]
push 0x4632ac
push eax
push 4
call fcn.00403270
add esp, 0x28
mov dword [0x495ad4], eax
add edi, 8
sub ebx, 2
jmp 0x408a52
push str.update
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
jne 0x408a5a
push str.update_ontop
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x40898e
mov byte [ebp - 0x15], 1
jmp 0x408a4e
push str.webinstall
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x4089aa
mov byte [ebp - 0xd], 1
jmp 0x408a4e
push str.silent
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x4089c6
mov byte [ebp - 0x19], 1
jmp 0x408a4e
push str.program_files
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x4089fd
add edi, 4
dec ebx
call fcn.004083f0
test eax, eax
je 0x4089f4
call fcn.004082e0
cmp eax, 1
je 0x408b94
mov byte [0x495b75], 1
jmp 0x408a52
push str.oem_referrer
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x408a28
push dword [edi + 4]
call fcn.004495bb
add esp, 4
mov dword [0x495b0c], eax
add edi, 8
sub ebx, 2
jmp 0x408a52
push str.noautostart
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x408a44
mov byte [0x495b76], 1
jmp 0x408a4e
push dword [edi]
call fcn.00405dc0
add esp, 4
add edi, 4
dec ebx
test ebx, ebx
jg 0x4087d2
mov esi, dword [ebp - 0x14]
push dword [0x46736c]
push 0x46cc60
call fcn.004116a3
add esp, 8
mov dword [ebp + 0x5c], 0xf
lea ecx, [ebp + 0x48]
mov dword [ebp + 0x58], 0
mov byte [ebp + 0x48], 0
push 0
push 0x462514
call fcn.0040bf90
lea eax, [ebp + 0x48]
mov dword [ebp - 4], 0
push eax
call fcn.004105db
mov eax, dword [ebp + 0x5c]
add esp, 4
mov dword [ebp - 4], 0xffffffff
cmp eax, 0x10
jb 0x408ac0
inc eax
lea ecx, [ebp + 0x48]
push eax
push dword [ebp + 0x48]
call fcn.0040c280
lea eax, [ebp + 0x18]
push 0x495e18
push eax
call fcn.004103b1
lea eax, [ebp + 0x18]
mov dword [ebp - 4], 1
push eax
call fcn.00410882
mov ecx, dword [0x495b0c]
add esp, 0xc
mov al, byte [0x495b75]
test ecx, ecx
je 0x408af4
test al, al
je 0x408b0d
cmp byte [0x495b76], 0
je 0x408bcc
test ecx, ecx
je 0x408b0d
test al, al
jne 0x408bcc
push 0x73
push 0x463330
lea ecx, [ebp + 0x48]
mov dword [ebp + 0x5c], 0xf
mov dword [ebp + 0x58], 0
mov byte [ebp + 0x48], 0
call fcn.0040bf90
lea eax, [ebp + 0x48]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp + 0x30]
push eax
call fcn.00410aae
push 0x10
push eax
mov byte [ebp - 4], 3
call fcn.004090e0
mov eax, dword [ebp + 0x44]
add esp, 0x10
cmp eax, 0x10
jb 0x408b63
inc eax
lea ecx, [ebp + 0x30]
push eax
push dword [ebp + 0x30]
call fcn.0040c280
mov eax, dword [ebp + 0x5c]
mov dword [ebp + 0x44], 0xf
mov dword [ebp + 0x40], 0
mov byte [ebp + 0x30], 0
cmp eax, 0x10
jb 0x408b8a
inc eax
lea ecx, [ebp + 0x48]
push eax
push dword [ebp + 0x48]
call fcn.0040c280
mov esi, 0x1c
jmp 0x4090a0
push 0x104
lea eax, [ebp + 0x60]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
call dword [sym.imp.KERNEL32.DLL_GetCommandLineW]
lea ecx, [ebp - 0x14]
push ecx
push 0
push eax
lea eax, [ebp + 0x60]
push eax
push str.runas
push 0
call fcn.004092c0
add esp, 0x18
xor eax, eax
jmp 0x4090b7
test esi, esi
jne 0x408bd7
call fcn.00407a60
mov esi, eax
push 0
mov dword [0x48e098], esi
call dword [sym.imp.ole32.dll_CoInitialize]
push 0x495aec
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
cmp dword [0x495b04], 0
jne 0x408bfe
call fcn.00406350
call fcn.00403f60
mov esi, eax
mov dword [ebp - 0x14], esi
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 4
push eax
push 0x495b70
push 0x495b6c
push esi
call fcn.00404790
push esi
mov dword [0x495b68], eax
mov byte [ebp - 4], 1
call fcn.00442387
add esp, 0x14
cmp ebx, 2
jl 0x408cfb
push str.update
push dword [edi]
call fcn.00405df0
add esp, 8
test al, al
je 0x408cfb
mov byte [0x495acd], 1
mov eax, dword [edi + 4]
mov dword [ebp - 0x14], eax
cmp ebx, 3
jl 0x408c73
push dword [edi + 8]
call fcn.00443095
add esp, 4
mov ebx, eax
jmp 0x408c75
xor ebx, ebx
test bl, 8
je 0x408c8e
push ebx
push dword [edi + 4]
call fcn.00409870
lea esi, [eax + 0x3e8]
jmp 0x40909d
call fcn.004063b0
mov edi, ebx
and edi, 2
nop dword [eax + eax]
push ebx
push dword [ebp - 0x14]
call fcn.00409870
add esp, 8
mov esi, eax
test edi, edi
jne 0x408cc7
test esi, esi
je 0x4090a0
push esi
call fcn.00406ee0
add esp, 4
test al, al
jne 0x408ca0
test esi, esi
je 0x4090a0
test bl, 1
je 0x4090a0
push esi
push dword [ebp - 0x14]
call fcn.00409f50
add esp, 8
test al, al
jne 0x4090a0
push 0x11
call fcn.00406ee0
add esp, 4
jmp 0x4090a0
cmp byte [ebp - 0x15], 0
je 0x408d5d
mov edi, dword [sym.imp.KERNEL32.DLL_Sleep]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
nop dword [eax]
push str.Spotify_Update_Started_Mutex
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov esi, eax
test esi, esi
je 0x408d3b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x408d3b
push esi
call ebx
push 0x32
call edi
jmp 0x408d10
call fcn.00407920
push 0
push eax
mov dword [0x495ac0], 0x407e30
call fcn.00409b40
lea esi, [eax + 0x3e8]
jmp 0x40909d
mov bh, byte [ebp - 0xd]
test bh, bh
jne 0x408d6d
test byte [0x495b72], 1
je 0x408d74
xor bl, bl
mov byte [ebp - 0x19], bl
jmp 0x408d77
mov bl, byte [ebp - 0x19]
push 2
push 1
push 5
call fcn.00408460
add esp, 0xc
test al, al
jne 0x408dd4
test bl, bl
jne 0x408dca
push 0x4633a8
lea ecx, [ebp + 0x30]
call fcn.00405730
lea eax, [ebp + 0x30]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp + 0x48]
push eax
call fcn.00410aae
push 0x10
push eax
mov byte [ebp - 4], 6
call fcn.004090e0
add esp, 0x10
lea ecx, [ebp + 0x48]
call fcn.004059d0
lea ecx, [ebp + 0x30]
call fcn.004059d0
mov esi, 0x16
jmp 0x4090a0
push 0x495ae8
push str.Spotify_Update_Started_Interactive_Mutex
call fcn.00408670
add esp, 8
test al, al
jne 0x408e35
test bl, bl
jne 0x408e2b
push 0x46344c
lea ecx, [ebp + 0x30]
call fcn.00405730
lea eax, [ebp + 0x30]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp + 0x48]
push eax
call fcn.00410aae
push 0x40
push eax
mov byte [ebp - 4], 8
call fcn.004090e0
add esp, 0x10
lea ecx, [ebp + 0x48]
call fcn.004059d0
lea ecx, [ebp + 0x30]
call fcn.004059d0
mov esi, 0x14
jmp 0x4090a0
call fcn.0040aed0
test al, al
jne 0x408e48
mov esi, 0x17
jmp 0x4090a0
call fcn.00407920
mov edi, eax
test bl, bl
jne 0x408eba
test bh, bh
jne 0x408eba
test byte [0x495b72], 2
jne 0x408eba
push edi
call fcn.00406010
add esp, 4
test al, al
je 0x408eba
push 0x463480
lea ecx, [ebp + 0x30]
call fcn.00405730
lea eax, [ebp + 0x30]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp + 0x48]
mov dword [ebp - 0x14], 1
push eax
call fcn.00410aae
push 0x121
mov ebx, 3
mov dword [ebp - 4], 0xa
push eax
mov dword [ebp - 0x14], ebx
call fcn.004090e0
add esp, 0x10
cmp eax, 2
jne 0x408ebd
mov byte [ebp - 0xd], 1
jmp 0x408ec1
mov ebx, dword [ebp - 0x20]
mov byte [ebp - 0xd], 0
test bl, 2
je 0x408ed1
lea ecx, [ebp + 0x48]
and ebx, 0xfffffffd
call fcn.004059d0
mov dword [ebp - 4], 1
test bl, 1
je 0x408ee8
lea ecx, [ebp + 0x30]
and ebx, 0xfffffffe
call fcn.004059d0
cmp byte [ebp - 0xd], 0
je 0x408ef8
mov esi, 0x19
jmp 0x4090a0
test byte [0x495b72], 1
je 0x408f73
call fcn.004063b0
call fcn.0040a170
mov esi, eax
test esi, esi
je 0x408f23
cmp esi, 0x37
je 0x408f23
push esi
call fcn.00406ee0
add esp, 4
test al, al
jne 0x408f06
mov eax, esi
cdq
mov dword [0x48e058], eax
mov dword [0x48e05c], edx
call fcn.00407e10
lea eax, [ebp + 0x268]
mov dword [0x48e09c], 0x495b28
push eax
call fcn.00407d90
add esp, 4
lea eax, [ebp + 0x268]
mov ecx, 0x48e020
mov dword [0x48e0a0], eax
call fcn.00404f10
mov dword [0x48e0a0], 0x462514
jmp 0x4090a0
push str.Spotify_Update_Started_Mutex
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov esi, eax
test esi, esi
je 0x408fea
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x408fea
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov al, byte [ebp - 0x19]
test al, al
jne 0x408fe0
push 0x46344c
lea ecx, [ebp + 0x30]
call fcn.00405730
lea eax, [ebp + 0x30]
mov byte [ebp - 4], 0xb
push eax
lea eax, [ebp + 0x48]
push eax
call fcn.00410aae
push 0x40
push eax
mov byte [ebp - 4], 0xc
call fcn.004090e0
add esp, 0x10
lea ecx, [ebp + 0x48]
call fcn.004059d0
lea ecx, [ebp + 0x30]
call fcn.004059d0
mov esi, 0x15
jmp 0x4090a0
call fcn.004083d0
test al, al
mov al, byte [ebp - 0x19]
je 0x409084
test al, al
jne 0x409043
push 0x4634d0
lea ecx, [ebp + 0x30]
call fcn.00405730
lea eax, [ebp + 0x30]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp]
or ebx, 4
push eax
mov dword [ebp - 0x14], ebx
call fcn.00410aae
push 0x21
or ebx, 8
mov dword [ebp - 4], 0xe
push eax
mov dword [ebp - 0x14], ebx
call fcn.004090e0
add esp, 0x10
mov byte [ebp - 0xd], 0
cmp eax, 2
jne 0x409047
mov byte [ebp - 0xd], 1
test bl, 8
je 0x409057
lea ecx, [ebp]
and ebx, 0xfffffff7
call fcn.004059d0
mov dword [ebp - 4], 1
test bl, 4
je 0x40906b
lea ecx, [ebp + 0x30]
call fcn.004059d0
cmp byte [ebp - 0xd], 0
je 0x409078
mov esi, 0x1a
jmp 0x4090a0
call fcn.004063b0
call fcn.00408520
jmp 0x40908d
test al, al
jne 0x40908d
call fcn.004063b0
call fcn.00408600
push dword [ebp - 0x19]
push edi
call fcn.00409b40
mov esi, eax
add esp, 8
mov ecx, dword [ebp + 0x2c]
cmp ecx, 0x10
jb 0x4090b5
inc ecx
push ecx
push dword [ebp + 0x18]
lea ecx, [ebp + 0x18]
call fcn.0040c280
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 + 0x2a8]
xor ecx, ebp
call fcn.00423c9a
lea esp, [ebp + 0x2ac]
pop ebp
ret