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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor ebx, ebx
mov dword [ebp + 0x10], eax
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push dword [ebp + 8]
mov esi, 0x41d890
mov dword [0x41d900], 0x41a5d8
mov dword [0x41d96c], esi
push 0x41d948
push esi
mov dword [0x41d890], 0x84
mov dword [0x41d8f4], 0x300
call fcn.0040820c
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push str.Uninited
mov ecx, 0x41d91c
mov dword [0x41d914], eax
call fcn.00401523
mov edi, 0x41a674
mov dword [ebp - 8], ebx
push edi
mov dword [ebp - 4], 1
push dword [ebp + 0x10]
call fcn.004061fc
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp + 0x10], eax
je 0x406ca5
push str.UnregServer
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x406c77
push str.RegServer
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x406c8b
push edi
push dword [ebp + 0x10]
jmp 0x406c41
push ebx
push ebx
push 0x64
push esi
call fcn.00406e9e
push ebx
push ebx
push esi
call fcn.004084d9
jmp 0x406c9f
push ebx
push 1
push 0x64
push esi
call fcn.00406e9e
push ebx
push 1
push esi
call fcn.00408360
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
push str.Uninited
lea ecx, [ebp - 0xc]
call fcn.00402ccf
push eax
mov ecx, 0x41d91c
call fcn.00406e73
test eax, eax
jne 0x406cca
cmp dword [ebp - 4], ebx
mov byte [ebp + 0x13], 1
jne 0x406ccd
mov byte [ebp + 0x13], bl
mov ecx, dword [ebp - 0xc]
cmp ecx, ebx
je 0x406cd9
call fcn.0040112d
cmp byte [ebp + 0x13], bl
je 0x406d39
push 0x118
call fcn.0040ca5b
cmp eax, ebx
pop ecx
je 0x406cf8
mov ecx, eax
call fcn.00408f6f
mov edi, eax
jmp 0x406cfa
xor edi, edi
cmp dword [edi + 0x110], ebx
jle 0x406d2a
push ebx
mov ecx, edi
call fcn.00408871
push eax
call fcn.0040cad0
test eax, eax
pop ecx
jbe 0x406d2a
push ebx
mov ecx, edi
call fcn.00408871
push eax
mov ecx, 0x41d91c
call fcn.00401523
jmp 0x406d2d
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x406d39
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004056e6
mov edi, str.igfxhkmutext
push edi
call fcn.0040cad0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.004058f3
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jne 0x406d6a
mov eax, 0x416374
push 0x104
push eax
lea eax, [ebp - 0x168]
push eax
call fcn.0040d4c0
lea eax, [ebp - 0x168]
push eax
call fcn.0040a911
mov edi, eax
push edi
call fcn.0040cad0
add esp, 0x14
lea ecx, [ebp - 0x1c]
push eax
push edi
call fcn.004058f3
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jne 0x406da9
mov eax, 0x416374
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x406dc3
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], ebx
je 0x406e59
push 1
push 4
push esi
call fcn.0040828f
push 0x28
lea eax, [ebp - 0x44]
push ebx
push eax
call fcn.0040ca70
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x44]
mov edi, str.HkClass
push eax
mov dword [ebp - 0x40], 0x40636f
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], ebx
call dword [sym.imp.USER32.dll_RegisterClassA]
push ebx
push dword [ebp + 8]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push str.HkWndName
push edi
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
push ebx
push ebx
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
push ebx
lea eax, [ebp - 0x60]
push ebx
push eax
call edi
test eax, eax
je 0x406e53
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
lea eax, [ebp - 0x60]
push ebx
push eax
jmp 0x406e3a
push esi
call fcn.00408324
call dword [sym.imp.ole32.dll_CoUninitialize]
push 1
lea ecx, [ebp - 0x1c]
call fcn.004056e6
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10