Function at 0x40f48b
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x17f4
call fcn.00413d20
mov eax, dword [0x455834]
xor eax, esp
mov dword [esp + 0x17f0], eax
push ebx
push ebp
push esi
push edi
mov edi, 0x1770
push edi
call fcn.004137f4
push 0xc
pop esi
mov dword [0x462368], eax
xor ebx, ebx
push esi
mov byte [eax], bl
lea eax, [esp + 0x24]
push ebx
push eax
call fcn.00415560
add esp, 0x10
mov dword [esp + 0x1c], esi
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 1
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebx
push ebx
push 1
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push ebx
call fcn.00404641
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00404568
push 0x9e
mov ebp, ebx
call fcn.004015c7
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
test eax, eax
je 0x40f531
lea ebp, [esp + 0x1c]
push str.Global_
jmp 0x40f66e
push 0xc8
call fcn.004015c7
pop ecx
test eax, eax
je 0x40f54a
push str.Local_
jmp 0x40f66e
push str.user_single_instance
call fcn.0040f3f5
pop ecx
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ebx
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40f645
push 0x3f0
call fcn.004137f4
pop ecx
mov edi, eax
mov dword [esp + 0x18], ebx
lea eax, [esp + 0x18]
push eax
push 0x3f0
push edi
push 1
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x40f61e
lea eax, [esp + 0x14]
push eax
push dword [edi]
call sub.ADVAPI32.dll_ConvertSidToStringSidA
test eax, eax
je 0x40f608
push str.Global_
mov ebp, 0x1770
push ebp
push dword [0x462368]
call fcn.004202cc
add esp, 0xc
push dword [esp + 0x14]
push dword [0x462368]
call fcn.0041f750
pop ecx
sub ebp, eax
push ebp
push dword [0x462368]
call fcn.0041f750
add eax, dword [0x462368]
pop ecx
push eax
call fcn.00427499
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ebp, [esp + 0x1c]
jmp 0x40f62d
push dword [esp + 0x18]
call esi
push eax
push str.could_not_get_convert_sid__d__d
call fcn.0040f3f5
add esp, 0xc
jmp 0x40f62d
call esi
push eax
push str.could_not_get_token_information__d
call fcn.0040f3f5
pop ecx
pop ecx
push edi
call fcn.00413d73
pop ecx
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0x1770
jmp 0x40f654
call esi
push eax
push str.could_not_open_process_token__d
call fcn.0040f3f5
pop ecx
pop ecx
mov eax, dword [0x462368]
cmp byte [eax], bl
jne 0x40f67d
push str.user_single_instance_failed__fall_back_to_session_single_instance
call fcn.0040f3f5
mov dword [esp], str.Local_
push edi
push dword [0x462368]
call fcn.004202cc
add esp, 0xc
lea eax, [esp + 0x90]
push eax
push dword [0x462368]
call fcn.0041f750
add eax, dword [0x462368]
pop ecx
push eax
call fcn.0040fcf6
push 0x2715
call fcn.004015c7
add esp, 0xc
test eax, eax
je 0x40f7ce
push str.single_instance_mode
call fcn.0040f3f5
pop ecx
push dword [0x462368]
push 1
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov edi, eax
call esi
push edi
mov esi, eax
push esi
push dword [0x462368]
push str.semaphore_name__S__code__d__value__p
call fcn.0040f3f5
add esp, 0x10
cmp esi, 0xb7
jne 0x40f7b2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0040f920
mov edi, ebx
jmp 0x40f71a
mov ecx, edi
inc edi
cmp ecx, 0x32
jge 0x40f720
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040f920
mov esi, eax
test esi, esi
je 0x40f705
push esi
push str.other_pid__d
call fcn.0040f3f5
pop ecx
pop ecx
test esi, esi
je 0x40f79b
push 0x2718
call fcn.004015c7
pop ecx
test eax, eax
je 0x40f74a
push 1
push esi
call fcn.0041129b
pop ecx
pop ecx
cmp byte [esp + 0x1808], bl
je 0x40f79b
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push 0x22
pop ecx
cmp word [eax], cx
jne 0x40f778
push ecx
add eax, 2
push eax
call fcn.0041592b
pop ecx
pop ecx
test eax, eax
jne 0x40f778
mov eax, 0x441a18
jmp 0x40f792
push 0x20
pop edi
push edi
push eax
call fcn.0041592b
pop ecx
pop ecx
test eax, eax
je 0x40f771
jmp 0x40f78d
add eax, 2
cmp word [eax], di
je 0x40f78a
push eax
push esi
call fcn.0040fc0a
pop ecx
pop ecx
push str.exiting
call fcn.0040f3f5
push ebx
call fcn.004039fe
pop ecx
pop ecx
jmp 0x40f86c
call fcn.0040fd31
cmp byte [esp + 0x1808], bl
je 0x40f86c
call fcn.0040f885
jmp 0x40f86c
push ebx
lea eax, [esp + 0x2c]
push 0x444770
push eax
call fcn.00403394
lea eax, [esp + 0x34]
push eax
push dword [0x462368]
call fcn.0041f660
add esp, 0x14
jmp 0x40f839
cmp ebx, 0x186a0
jge 0x40f855
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x90]
inc ebx
push eax
push dword [0x462368]
call fcn.0040fcf6
push ebx
lea eax, [esp + 0x68]
push 0x444770
push eax
call fcn.00403394
lea eax, [esp + 0x70]
push eax
push dword [0x462368]
call fcn.0041f660
add esp, 0x1c
push dword [0x462368]
push 1
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov edi, eax
call esi
cmp eax, 0xb7
je 0x40f7f3
push edi
call esi
push eax
push dword [0x462368]
push str.semaphore_name__S__code__d__value__p
call fcn.0040f3f5
add esp, 0x10
mov ecx, dword [esp + 0x1800]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00413c4b
add esp, 0x17f4
ret