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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x427470]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2c], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor esi, esi
push esi
mov dword [ebp - 0x30], eax
call dword [sym.imp.ole32.dll_CoInitialize]
push esi
push edi
mov edi, 0x428850
push 0x42882c
mov ecx, edi
call fcn.00408398
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, 0x422b80
push ebx
push dword [ebp - 0x30]
mov dword [0x428880], eax
mov dword [ebp - 0x34], esi
jmp 0x40e68c
push str.UnregServer
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40e69c
push str.RegServer
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40e6b1
push ebx
push dword [ebp - 0x24]
call fcn.00407dd1
pop ecx
mov dword [ebp - 0x24], eax
pop ecx
cmp eax, esi
jne 0x40e664
jmp 0x40e6c9
push esi
push esi
push 0x64
push edi
call fcn.0040bb2c
push esi
push esi
mov ecx, edi
call fcn.0040b296
jmp 0x40e6c6
push esi
push 1
push 0x64
push edi
call fcn.0040bb2c
push esi
push 1
mov ecx, edi
call fcn.0040b227
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x28]
push eax
push 0x4220e8
push 0x15
push esi
push 0x422148
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40e867
cmp dword [ebp - 0x28], esi
je 0x40e867
call fcn.00408fb7
mov ebx, eax
call fcn.0040ce4b
mov dword [0x4287f4], eax
cmp ebx, esi
jne 0x40e733
cmp eax, esi
jne 0x40e733
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
lea edx, [ebp - 0x1c]
push edx
push 0x18
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40e73a
cmp dword [ebp - 0xc], esi
jle 0x40e72e
cmp dword [ebp - 0xc], 0x15
jle 0x40e733
mov dword [ebp - 0x24], esi
jmp 0x40e73a
mov dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x24], esi
je 0x40e867
push str.IGFXPERSISTMUTEXT
lea ecx, [ebp - 0x20]
call fcn.00403f65
cmp dword [ebp - 8], 0x10
mov eax, dword [ebp - 0x1c]
jae 0x40e768
lea eax, [ebp - 0x1c]
push eax
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40e785
mov dword [ebp - 0x24], esi
push esi
push 1
lea ecx, [ebp - 0x20]
call fcn.00403909
cmp dword [ebp - 0x24], esi
je 0x40e867
push 1
push 4
mov ecx, edi
call fcn.00409455
push 0x28
lea eax, [ebp - 0x5c]
push esi
push eax
call fcn.00410ca0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x4c], eax
add esp, 0xc
lea eax, [ebp - 0x5c]
mov ebx, str.PersistClass
push eax
mov dword [ebp - 0x58], 0x40e0b5
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x48], esi
call dword [sym.imp.USER32.dll_RegisterClassA]
push esi
push dword [ebp - 0x2c]
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 - 0x2c], eax
cmp eax, esi
je 0x40e860
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x4287c4], eax
cmp eax, esi
je 0x40e841
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSRegisterSessionNotification
push eax
call ebx
push str.WTSUnRegisterSessionNotification
push dword [0x4287c4]
mov dword [0x4287c8], eax
call ebx
mov dword [0x4287cc], eax
mov eax, dword [0x4287c8]
cmp eax, esi
je 0x40e841
push esi
push dword [ebp - 0x2c]
call eax
mov dword [0x4287d0], eax
mov ebx, dword [sym.imp.USER32.dll_GetMessageA]
jmp 0x40e853
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push esi
push esi
push esi
lea eax, [ebp - 0x78]
push eax
call ebx
test eax, eax
jne 0x40e849
mov ecx, edi
call fcn.00409497
cmp dword [ebp - 0x30], esi
pop edi
pop esi
pop ebx
je 0x40e878
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x34]
xor ecx, ebp
call fcn.00410d1a
leave
ret 0x10