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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x12c
mov eax, dword [0x40536c]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0xc], esi
push edi
test eax, eax
jne 0x4022e0
push 0x40536c
push ebx
push ebx
call dword [sym.imp.ntdll.dll_RtlGetNtVersionNumbers]
mov eax, dword [0x40536c]
and eax, 0xfffffff
mov dword [0x40536c], eax
add eax, 0xffffe24e
mov dword [esi + 0x40], 1
mov ecx, 0x383d
cmp ecx, eax
mov ecx, esi
push 2
sbb al, al
inc al
mov byte [0x405370], al
call fcn.00401f81
mov edi, 0x104
lea eax, [esp + 0x30]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40233b
cmp eax, edi
je 0x40233b
lea eax, [esp + 0x30]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_strrchr]
pop ecx
pop ecx
test eax, eax
je 0x40233b
inc eax
mov ecx, esi
push eax
call fcn.004020e4
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
test eax, eax
je 0x40238d
jmp 0x402348
inc eax
mov cl, byte [eax]
cmp cl, 0x20
je 0x402347
cmp cl, 0x22
je 0x402371
cmp cl, 0x20
je 0x402379
mov dl, cl
mov cl, dl
test dl, dl
je 0x40237c
inc eax
mov cl, byte [eax]
mov dl, cl
cmp cl, 0x20
jne 0x40235b
jmp 0x40237c
test cl, cl
je 0x40237a
inc eax
mov cl, byte [eax]
cmp cl, 0x22
jne 0x40236d
inc eax
mov cl, byte [eax]
cmp cl, 0x20
je 0x402379
test cl, cl
je 0x40238d
push eax
mov ecx, esi
call fcn.004020e4
call fcn.0040188f
test eax, eax
jne 0x40239a
mov byte [esi + 0x3d], 1
push str.SoundKeeperStopEvent
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edi, eax
test edi, edi
jne 0x4023cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jle 0x402587
movzx ebx, bx
or ebx, 0x80070000
jmp 0x402587
push str.SoundKeeperMutex
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x4023fc
mov ebx, eax
test ebx, ebx
jle 0x40242c
movzx ebx, bx
or ebx, 0x80070000
jmp 0x40242c
cmp eax, 0xb7
jne 0x40243b
push edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x3e8
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp ebx, 0x102
jne 0x402439
mov ebx, 0x80070102
test esi, esi
je 0x402580
jmp 0x402579
xor ebx, ebx
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x40], ebx
jne 0x40244b
xor ebx, ebx
jmp 0x402572
add eax, 0x20
push eax
push 0x4042bc
push 1
push ebx
push 0x404284
mov dword [esp + 0x28], eax
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x402471
mov ebx, eax
jmp 0x402572
mov ecx, dword [esp + 0x14]
push dword [esp + 0x10]
mov ecx, dword [ecx]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x18]
mov dword [esp + 0x18], eax
test eax, eax
jns 0x402490
mov ebx, eax
jmp 0x402566
mov esi, dword [esp + 0x10]
cmp byte [esi + 0x3d], 0
je 0x4024b0
or eax, 0xffffffff
mov dword [esp + 0x10], eax
cmp byte [esi + 0x24], 0
jne 0x4024cb
mov ecx, esi
call fcn.00401af5
jmp 0x4024d8
call fcn.0040188f
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4024a1
cmp byte [esi + 0x24], al
je 0x4024dc
mov ecx, esi
call fcn.00401f12
jmp 0x4024d8
cmp byte [esi + 0x25], 0
je 0x4024e2
mov ecx, esi
call fcn.00401eb6
mov eax, dword [esp + 0x10]
cmp byte [esi + 0x25], 0
jne 0x4024fe
cmp eax, 0x1e
jbe 0x4024fe
xor ecx, ecx
cmp byte [esi + 0x3d], cl
sete cl
dec ecx
and ecx, 0xffffec77
add ecx, 0x1388
jmp 0x402503
mov ecx, 0x1f4
mov eax, dword [esi + 0x38]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x34]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x30]
push ecx
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x24]
push ebx
push eax
push 4
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, ebx
je 0x4025d0
sub eax, 1
je 0x402590
sub eax, 1
je 0x40254d
sub eax, 1
je 0x40254d
sub eax, 0xff
je 0x402494
mov ecx, esi
call fcn.00401f12
mov eax, dword [esi + 0x20]
mov ebx, dword [esp + 0x18]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
push 0x1f4
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x402590
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, esi
call fcn.00401f12
test eax, eax
js 0x4025c1
mov ecx, esi
call fcn.00401af5
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x402494
push 0x1f4
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4025d0
mov byte [esi + 0x25], 1
jmp 0x402494