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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor edi, edi
mov dword [ebp + 0x10], eax
push edi
call dword [sym.imp.ole32.dll_CoInitialize]
push dword [ebp + 8]
mov esi, 0x416238
mov dword [0x4162a8], 0x413188
mov dword [0x416210], esi
push 0x413140
push esi
mov dword [0x416238], 0x84
mov dword [0x41629c], 0x300
call fcn.00406a9c
mov eax, 0x4102d0
mov ecx, eax
test ecx, ecx
je 0x4068c9
push 0x10
push eax
push 0x416228
call fcn.00408790
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, 0x4132c8
mov dword [0x4162bc], eax
push ebx
mov dword [ebp - 8], edi
push dword [ebp + 0x10]
mov dword [ebp - 4], 1
call fcn.00406818
pop ecx
cmp eax, edi
pop ecx
mov dword [ebp + 0x10], eax
je 0x40694c
push str.UnregServer
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40691d
push str.RegServer
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x406932
push ebx
push dword [ebp + 0x10]
jmp 0x4068e7
push edi
push edi
push 0x64
push esi
call fcn.004053ce
push edi
push 1
push esi
call fcn.00406e19
jmp 0x406946
push edi
push 1
push 0x64
push esi
call fcn.004053ce
push edi
push 1
push esi
call fcn.00406ca0
mov dword [ebp - 8], eax
mov dword [ebp - 4], edi
mov al, byte [ebp + 0xb]
push edi
lea ecx, [ebp - 0x18]
mov byte [ebp - 0x18], al
call fcn.004041ef
mov ebx, str.IgfxExt_Mutex_Name
push ebx
call fcn.004084f0
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x18]
call fcn.00404415
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x40697d
mov eax, 0x41024c
push 0x104
push eax
lea eax, [ebp - 0x164]
push eax
call fcn.00409200
lea eax, [ebp - 0x164]
push eax
call fcn.004076ee
mov ebx, eax
push ebx
call fcn.004084f0
add esp, 0x14
lea ecx, [ebp - 0x18]
push eax
push ebx
call fcn.00404415
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x4069bc
mov eax, 0x41024c
push eax
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4069d9
mov dword [ebp - 4], edi
cmp dword [ebp - 4], edi
je 0x406a73
mov ecx, esi
call fcn.004067c3
push 1
push 4
push esi
call fcn.00406b1f
push 0x28
lea eax, [ebp - 0x40]
push edi
push eax
call fcn.00408620
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x40]
mov ebx, str.IgfxExt_Wnd_Class
push eax
mov dword [ebp - 0x3c], 0x4071ba
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x2c], edi
call dword [sym.imp.USER32.dll_RegisterClassA]
push edi
push dword [ebp + 8]
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push str.IgfxExt_Wnd_Name
push ebx
push edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov ebx, dword [sym.imp.USER32.dll_GetMessageA]
push edi
push edi
lea eax, [ebp - 0x5c]
push edi
push eax
call ebx
test eax, eax
je 0x406a62
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push edi
push edi
lea eax, [ebp - 0x5c]
push edi
push eax
jmp 0x406a49
push esi
call fcn.00406bb4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00406bf0
call dword [sym.imp.ole32.dll_CoUninitialize]
push 1
lea ecx, [ebp - 0x18]
call fcn.004041ef
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10