Function at 0x410501
Capabilities:
Accept command line arguments

Disassembly:
push ebp
lea ebp, [esp - 0x177c]
mov eax, 0x17fc
call fcn.00414690
mov eax, dword [0x43ec80]
xor eax, ebp
mov dword [ebp + 0x1778], eax
push ebx
push esi
push edi
mov esi, 0x1770
push esi
call fcn.0041375e
push 0xc
pop edi
mov dword [0x44bcb0], eax
push edi
mov byte [eax], 0
lea eax, [ebp - 0x80]
push 0
push eax
call fcn.00415e40
add esp, 0x10
push 0x14
push 0x40
mov dword [ebp - 0x80], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
xor ebx, ebx
inc ebx
push ebx
push eax
mov dword [ebp - 0x7c], eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
xor edi, edi
push edi
push edi
push ebx
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push edi
call fcn.00405160
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.004061f8
push 0x9e
mov dword [ebp - 0x68], edi
call fcn.004038fd
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
test eax, eax
je 0x4105ab
lea eax, [ebp - 0x80]
mov dword [ebp - 0x68], eax
push str.Global_
jmp 0x4106e1
push 0xc8
call fcn.004038fd
pop ecx
test eax, eax
je 0x4105c4
push str.Local_
jmp 0x4106e1
push str.user_single_instance
call fcn.0040ff78
and dword [ebp - 0x64], 0
pop ecx
lea eax, [ebp - 0x64]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4106b7
mov ebx, 0x3f0
push ebx
call fcn.0041375e
and dword [ebp - 0x74], 0
pop ecx
lea ecx, [ebp - 0x74]
push ecx
push ebx
push eax
push 1
push dword [ebp - 0x64]
mov dword [ebp - 0x6c], eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x410691
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x6c]
push dword [eax]
call sub.ADVAPI32.dll_ConvertSidToStringSidA
test eax, eax
je 0x41067c
push str.Global_
push esi
push dword [0x44bcb0]
call fcn.00419a84
add esp, 0xc
push dword [ebp - 0x70]
push dword [0x44bcb0]
call fcn.00414100
pop ecx
mov ecx, esi
sub ecx, eax
push ecx
push dword [0x44bcb0]
call fcn.00414100
add eax, dword [0x44bcb0]
pop ecx
push eax
call fcn.00419a10
add esp, 0xc
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x80]
mov dword [ebp - 0x68], eax
jmp 0x4106a0
push dword [ebp - 0x74]
call edi
push eax
push str.could_not_get_convert_sid__d__d
call fcn.0040ff78
add esp, 0xc
jmp 0x4106a0
call edi
push eax
push str.could_not_get_token_information__d
call fcn.0040ff78
pop ecx
pop ecx
push dword [ebp - 0x6c]
call fcn.00416040
pop ecx
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
inc ebx
jmp 0x4106c6
call edi
push eax
push str.could_not_open_process_token__d
call fcn.0040ff78
pop ecx
pop ecx
mov eax, dword [0x44bcb0]
cmp byte [eax], 0
jne 0x4106f0
push str.user_single_instance_failed__fall_back_to_session_single_instance
call fcn.0040ff78
mov dword [esp], str.Local_
push esi
push dword [0x44bcb0]
call fcn.00419a84
add esp, 0xc
lea eax, [ebp - 0x60]
push eax
push dword [0x44bcb0]
call fcn.00414100
mov esi, eax
add esi, dword [0x44bcb0]
pop ecx
call fcn.00410108
mov dword [esp], 0x2715
call fcn.004038fd
pop ecx
test eax, eax
je 0x41083b
push str.single_instance_mode
call fcn.0040ff78
pop ecx
push dword [0x44bcb0]
push ebx
push ebx
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov esi, eax
call edi
push esi
mov edi, eax
push edi
push dword [0x44bcb0]
push str.semaphore_name__S__code__d__value__p
call fcn.0040ff78
add esp, 0x10
cmp edi, 0xb7
jne 0x41081f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00410066
xor edi, edi
jmp 0x41078a
mov eax, edi
inc edi
cmp eax, 0x32
jge 0x410790
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00410066
mov esi, eax
test esi, esi
je 0x410775
push esi
push str.other_pid__d
call fcn.0040ff78
pop ecx
pop ecx
test esi, esi
je 0x410807
push 0x2718
call fcn.004038fd
pop ecx
test eax, eax
je 0x4107b9
push ebx
push esi
call fcn.00411cff
pop ecx
pop ecx
cmp byte [ebp + 0x1784], 0
je 0x410807
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
cmp word [eax], 0x22
jne 0x4107e6
add eax, 2
push 0x22
push eax
call fcn.00415aa5
pop ecx
pop ecx
test eax, eax
jne 0x4107e6
mov eax, 0x434674
jmp 0x4107fe
push 0x20
push eax
call fcn.00415aa5
pop ecx
pop ecx
test eax, eax
je 0x4107df
jmp 0x4107f8
inc eax
inc eax
cmp word [eax], 0x20
je 0x4107f6
push eax
push esi
call fcn.00410402
pop ecx
pop ecx
push str.exiting
call fcn.0040ff78
push 0
call fcn.004047b4
pop ecx
pop ecx
jmp 0x4108f3
call fcn.0040ffd1
cmp byte [ebp + 0x1784], 0
je 0x4108f3
call fcn.004103a5
jmp 0x4108f3
and dword [ebp - 0x64], 0
push 0
lea eax, [ebp + 0x1710]
push 0x437018
push eax
call fcn.00415111
lea eax, [ebp + 0x1710]
push eax
push dword [0x44bcb0]
call fcn.00414590
add esp, 0x14
push dword [0x44bcb0]
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
jmp 0x4108cc
cmp dword [ebp - 0x64], 0x186a0
jge 0x4108dc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [0x44bcb0]
inc dword [ebp - 0x64]
lea eax, [ebp - 0x60]
push eax
call fcn.00410108
push dword [ebp - 0x64]
lea eax, [ebp + 0x1744]
push 0x437018
push eax
call fcn.00415111
lea eax, [ebp + 0x1744]
push eax
push dword [0x44bcb0]
call fcn.00414590
add esp, 0x18
push dword [0x44bcb0]
push 1
push 1
push dword [ebp - 0x68]
call ebx
mov esi, eax
call edi
cmp eax, 0xb7
je 0x410877
push esi
call edi
push eax
push dword [0x44bcb0]
push str.semaphore_name__S__code__d__value__p
call fcn.0040ff78
add esp, 0x10
mov ecx, dword [ebp + 0x1778]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414678
add ebp, 0x177c
leave
ret