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

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x118
mov eax, dword [0x427470]
xor eax, ebp
mov dword [ebp + 0x64], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x70]
mov dword [ebp - 0x64], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor esi, esi
push esi
mov dword [ebp - 0x5c], eax
call dword [sym.imp.ole32.dll_CoInitialize]
push esi
push edi
mov edi, 0x428844
push 0x428820
mov ecx, edi
call fcn.00407da6
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, 0x422644
push ebx
push dword [ebp - 0x5c]
mov dword [0x428874], eax
mov dword [ebp - 0x68], esi
jmp 0x40e142
push str.UnregServer
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40e152
push str.RegServer
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40e167
push ebx
push dword [ebp - 0x58]
call fcn.0040797e
pop ecx
mov dword [ebp - 0x58], eax
pop ecx
cmp eax, esi
jne 0x40e11a
jmp 0x40e17f
push esi
push esi
push 0x64
push edi
call fcn.0040c73d
push esi
push esi
mov ecx, edi
call fcn.0040bea7
jmp 0x40e17c
push esi
push 1
push 0x64
push edi
call fcn.0040c73d
push esi
push 1
mov ecx, edi
call fcn.0040be38
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x60]
push eax
push 0x421a3c
push 0x15
push esi
push 0x421a9c
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40e38a
cmp dword [ebp - 0x60], esi
je 0x40e38a
mov ebx, 0x9c
push ebx
lea eax, [ebp - 0x54]
push esi
push eax
mov dword [ebp - 0x5c], esi
call fcn.00410400
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40e1e1
xor eax, eax
cmp dword [ebp - 0x4c], esi
sete al
mov dword [0x4287f0], eax
call fcn.004092db
test eax, eax
jne 0x40e21b
mov eax, dword [ebp - 0x60]
mov ecx, dword [eax]
lea edx, [ebp - 0x88]
push edx
push 0x20
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40e222
mov eax, dword [ebp - 0x78]
cmp eax, esi
jle 0x40e216
cmp eax, 0xc
jle 0x40e23e
cmp eax, 0xd
jle 0x40e216
cmp eax, 0x12
jle 0x40e23e
mov dword [ebp - 0x58], esi
jmp 0x40e222
mov dword [ebp - 0x58], 1
cmp dword [ebp - 0x58], 1
je 0x40e245
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0x5c]
cmp dword [ebp - 0x5c], 0x14
jbe 0x40e1e1
jmp 0x40e245
mov dword [ebp - 0x58], 1
mov eax, dword [ebp - 0x60]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x60], esi
cmp dword [ebp - 0x58], esi
je 0x40e38a
push str.IGFXPERSISTMUTEXT
lea ecx, [ebp + 0x48]
call fcn.004043a4
cmp dword [ebp + 0x60], 0x10
mov eax, dword [ebp + 0x4c]
jae 0x40e273
lea eax, [ebp + 0x4c]
push eax
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40e290
mov dword [ebp - 0x58], esi
push esi
push 1
lea ecx, [ebp + 0x48]
call fcn.00403818
cmp dword [ebp - 0x58], esi
je 0x40e38a
push 1
push 4
mov ecx, edi
call fcn.0040993c
push 0x28
lea eax, [ebp - 0xb0]
push esi
push eax
call fcn.00410400
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0xa0], eax
add esp, 0xc
lea eax, [ebp - 0xb0]
mov ebx, str.PersistClass
push eax
mov dword [ebp - 0xac], 0x40dc30
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x9c], esi
call dword [sym.imp.USER32.dll_RegisterClassA]
push esi
push dword [ebp - 0x64]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push str.PersistWndName
push ebx
push esi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [ebp - 0x64], eax
cmp eax, esi
je 0x40e383
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x4287bc], eax
cmp eax, esi
je 0x40e35e
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSRegisterSessionNotification
push eax
call ebx
push str.WTSUnRegisterSessionNotification
push dword [0x4287bc]
mov dword [0x4287c0], eax
call ebx
mov dword [0x4287c4], eax
mov eax, dword [0x4287c0]
cmp eax, esi
je 0x40e35e
push esi
push dword [ebp - 0x64]
call eax
mov dword [0x4287c8], eax
mov ebx, dword [sym.imp.USER32.dll_GetMessageA]
jmp 0x40e373
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push esi
push esi
push esi
lea eax, [ebp - 0x84]
push eax
call ebx
test eax, eax
jne 0x40e366
mov ecx, edi
call fcn.0040997e
cmp dword [ebp - 0x5c], esi
pop edi
pop esi
pop ebx
je 0x40e39b
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp + 0x64]
mov eax, dword [ebp - 0x68]
xor ecx, ebp
call fcn.00410578
add ebp, 0x68
leave
ret 0x10