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

Disassembly:
mov eax, 0x4101d3
call fcn.00408c5c
sub esp, 0xa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
push ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ole32.dll_CoInitialize]
lea ecx, [ebp - 0x7c]
mov dword [ebp - 4], ebx
call fcn.00403136
push ecx
mov eax, esp
mov dword [ebp - 0x3c], esp
xor edi, edi
push eax
lea ecx, [ebp - 0x7c]
inc edi
mov byte [ebp - 4], 1
call fcn.00403645
lea eax, [ebp - 0x18]
push eax
call fcn.00406bf5
pop ecx
pop ecx
lea eax, [ebp - 0xb4]
push eax
mov byte [ebp - 4], 2
call fcn.004010ef
mov esi, eax
cmp esi, ebx
pop ecx
mov ecx, dword [ebp - 0x18]
jne 0x401f02
cmp ecx, ebx
je 0x401ef0
call fcn.004010b7
jmp 0x401ef2
xor eax, eax
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
mov dword [0x415b04], eax
jmp 0x401f3a
cmp ecx, ebx
lea eax, [ebp - 0xb4]
mov dword [ebp - 0x60], 0xc
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], ebx
je 0x401f20
call fcn.004010b7
jmp 0x401f22
xor eax, eax
push eax
push ebx
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
push esi
mov dword [0x415b04], eax
call fcn.004011fb
pop ecx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
je 0x402362
cmp eax, 5
je 0x402362
lea eax, [ebp - 0x1c]
push eax
call fcn.00406597
pop ecx
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
mov byte [ebp - 4], 3
je 0x401f70
call fcn.004010b7
jmp 0x401f72
xor eax, eax
push ebx
push 0x80
push 3
push ebx
push ebx
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
push ebx
mov dword [ebp - 0x20], eax
mov eax, 0x400
push eax
push eax
push ebx
lea eax, [ebp - 0xa0]
push eax
mov dword [ebp - 0x50], edi
call dword [sym.imp.USER32.dll_PeekMessageA]
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004025e2
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
xor esi, eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
xor esi, eax
push esi
call fcn.00408ec6
mov dword [ebp - 0x14], edi
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x28]
jge 0x402079
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + eax*4]
mov cl, byte [eax]
cmp cl, 0x2f
je 0x401ffd
cmp cl, 0x2d
jne 0x402053
lea esi, [eax + 1]
push str.RegServer
push esi
call edi
test eax, eax
jne 0x402022
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [ebp - 0x20], ebx
call fcn.00401a3d
jmp 0x4022d4
push str.UnregServer
push esi
call edi
test eax, eax
jne 0x402044
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [ebp - 0x20], ebx
call fcn.004048dd
jmp 0x4022d4
push str.norename
push esi
call edi
test eax, eax
jne 0x402058
mov dword [ebp - 0x50], ebx
inc dword [ebp - 0x14]
jmp 0x401fdf
push 0x4113c8
push esi
call edi
test eax, eax
jne 0x402053
mov eax, dword [ebp - 0x14]
inc eax
cmp eax, dword [ebp - 0x28]
jge 0x402053
mov ecx, dword [ebp - 0x2c]
push dword [ecx + eax*4]
call fcn.004019d6
pop ecx
lea ecx, [ebp - 0x7c]
call fcn.004049fc
push ebx
push ebx
push ebx
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4020a6
push 1
push str.GetMessage
push 3
call fcn.00405f81
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp esi, ebx
jne 0x402114
call fcn.0040366a
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.004023c7
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x4020d7
call fcn.004013dd
mov dword [ebp - 0x1c], ebx
mov ecx, dword [ebp - 0x18]
cmp ecx, ebx
je 0x4020e6
call fcn.004013dd
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], bl
call fcn.0040360d
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10
cmp dword [ebp - 0x9c], 0x16
je 0x40234c
cmp dword [ebp - 0x9c], 0x113
jne 0x402081
cmp dword [ebp - 0x94], ebx
jne 0x402081
lea eax, [ebp - 0x14]
push eax
call fcn.00406597
pop ecx
cmp dword [ebp - 0x50], ebx
mov byte [ebp - 4], 5
je 0x402323
mov esi, str..exe
push esi
lea ecx, [ebp - 0x30]
call fcn.0040129e
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x4c]
push eax
push ecx
mov eax, esp
mov dword [ebp - 0x44], esp
push eax
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 6
call fcn.00403645
lea eax, [ebp - 0x40]
push eax
call fcn.004069f2
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 7
call fcn.004017b2
push eax
lea eax, [ebp - 0x24]
push eax
mov byte [ebp - 4], 8
call fcn.004063ac
pop ecx
pop ecx
mov ecx, dword [ebp - 0x4c]
cmp ecx, ebx
je 0x4021b2
call fcn.004013dd
mov dword [ebp - 0x4c], ebx
mov ecx, dword [ebp - 0x40]
cmp ecx, ebx
je 0x4021c1
call fcn.004013dd
mov dword [ebp - 0x40], ebx
mov ecx, dword [ebp - 0x30]
cmp ecx, ebx
mov byte [ebp - 4], 0xa
je 0x4021d4
call fcn.004013dd
mov dword [ebp - 0x30], ebx
push esi
lea ecx, [ebp - 0x34]
call fcn.0040129e
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x48]
push eax
push ecx
mov eax, esp
mov dword [ebp - 0x44], esp
push eax
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 0xd
call fcn.00403645
lea eax, [ebp - 0x3c]
push eax
call fcn.004069f2
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 0xe
call fcn.004017b2
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 0xf
call fcn.004063ac
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x24]
call fcn.004016cd
mov ecx, dword [ebp - 0x54]
cmp ecx, ebx
je 0x402236
call fcn.004013dd
mov dword [ebp - 0x54], ebx
mov ecx, dword [ebp - 0x48]
cmp ecx, ebx
je 0x402245
call fcn.004013dd
mov dword [ebp - 0x48], ebx
mov ecx, dword [ebp - 0x3c]
cmp ecx, ebx
je 0x402254
call fcn.004013dd
mov dword [ebp - 0x3c], ebx
mov ecx, dword [ebp - 0x34]
cmp ecx, ebx
mov byte [ebp - 4], 0xa
je 0x402267
call fcn.004013dd
mov dword [ebp - 0x34], ebx
mov ecx, dword [ebp - 0x24]
cmp ecx, ebx
je 0x402277
call fcn.004010b7
mov edi, eax
jmp 0x402279
xor edi, edi
mov ecx, dword [ebp - 0x14]
cmp ecx, ebx
je 0x402289
call fcn.004010b7
mov esi, eax
jmp 0x40228b
xor esi, esi
push edi
call fcn.00408dcb
pop ecx
push eax
push esi
call fcn.00408dcb
pop ecx
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpA]
test eax, eax
je 0x402310
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [ebp - 0x20], ebx
call fcn.00401a3d
mov ecx, dword [ebp - 0x24]
cmp ecx, ebx
je 0x4022c5
call fcn.004013dd
mov dword [ebp - 0x24], ebx
mov ecx, dword [ebp - 0x14]
cmp ecx, ebx
je 0x4022d4
call fcn.004013dd
mov dword [ebp - 0x14], ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.004023c7
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x4022ef
call fcn.004013dd
mov dword [ebp - 0x1c], ebx
mov ecx, dword [ebp - 0x18]
cmp ecx, ebx
je 0x4022fe
call fcn.004013dd
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], bl
call fcn.0040360d
xor eax, eax
jmp 0x402103
mov ecx, dword [ebp - 0x24]
cmp ecx, ebx
mov byte [ebp - 4], 5
je 0x402323
call fcn.004013dd
mov dword [ebp - 0x24], ebx
call fcn.0040366a
lea ecx, [ebp - 0x7c]
call fcn.004049fc
mov ecx, dword [ebp - 0x14]
cmp ecx, ebx
mov byte [ebp - 4], 4
je 0x402081
call fcn.004013dd
mov dword [ebp - 0x14], ebx
jmp 0x402081
cmp dword [ebp - 0x98], ebx
je 0x402081
call fcn.0040366a
jmp 0x402081
push edi
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x44], esp
push str.CreateMutex
call fcn.0040124a
push 3
call fcn.00405f34
mov esi, dword [ebp - 0x84]
mov ecx, esi
call fcn.00405b49
mov eax, dword [esi]
mov dword [ebp - 0x38], eax
mov eax, 0x4020f1
ret