Function at 0x4147a0
Capabilities:
Get common file path
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x49f73c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2014
call fcn.004929f0
push ebx
push esi
push edi
push 0x7ff
lea eax, [esp + 0x24]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, dword [0x4c41fc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4c41fc
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x202c], 0
mov edx, dword [0x4c41fc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4c41fc
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x20]
mov byte [esp + 0x202c], 1
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x414830
sub eax, edx
lea ecx, [esp + 0x20]
sar eax, 1
push ecx
lea edx, [esp + 0x14]
push edx
mov ebx, eax
call fcn.00402e20
lea eax, [esp + 0x1020]
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str._restart
lea ecx, [esp + 0x28]
push ecx
push str.__s___s_d
lea edi, [esp + 0x24]
call fcn.004020e0
add esp, 0x10
cmp byte [0x4c7d60], 0
jne 0x4148ed
push str.pl._Restart_1
call fcn.004261a0
mov edi, dword [esp + 0x18]
mov ebx, 1
add esp, 4
cmp dword [edi - 4], ebx
jle 0x4148bb
mov edx, dword [edi - 0xc]
push edx
lea eax, [esp + 0x18]
push eax
call fcn.00401ff0
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
cmp dword [esi - 4], ebx
jle 0x4148d6
mov ecx, dword [esi - 0xc]
push ecx
lea edx, [esp + 0x14]
push edx
call fcn.00401ff0
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x1020]
push eax
call fcn.0042cc80
add esp, 4
mov esi, eax
jmp 0x414a52
mov edx, dword [0x4c41fc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4c41fc
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x202c], 2
mov edx, dword [0x4c41fc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4c41fc
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x1020]
push ecx
push str._sProcessGovernor.exe.manifest
lea edi, [esp + 0x24]
mov byte [esp + 0x2034], 3
call fcn.004020e0
lea edx, [esp + 0x1028]
push edx
push str._sProcessGovernor.exe.manifest.HighestAvailablerights
lea edi, [esp + 0x28]
call fcn.004020e0
mov eax, dword [esp + 0x2c]
add esp, 0x10
call fcn.0042b820
mov edi, dword [esp + 0x18]
mov esi, eax
mov eax, edi
call fcn.0042b820
cmp esi, eax
jne 0x414978
test eax, eax
jne 0x4149c0
mov esi, dword [esp + 0x14]
mov ebx, 1
cmp dword [esi - 4], ebx
jle 0x414998
mov eax, dword [esi - 0xc]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00401ff0
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
cmp dword [eax - 4], ebx
jle 0x4149b3
mov edx, dword [eax - 0xc]
push edx
lea eax, [esp + 0x14]
push eax
call fcn.00401ff0
mov eax, dword [esp + 0x10]
push eax
mov ecx, esi
call fcn.0042e100
add esp, 4
jmp 0x414a05
mov ebx, dword [esp + 0x14]
mov esi, 1
cmp dword [ebx - 4], esi
jle 0x4149e0
mov ecx, dword [ebx - 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.00401ff0
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 4], esi
jle 0x4149fb
mov eax, dword [ecx - 0xc]
push eax
lea ecx, [esp + 0x14]
push ecx
call fcn.00401ff0
mov ecx, dword [esp + 0x10]
call fcn.0042cd50
mov ebx, 1
mov esi, eax
lea eax, [edi - 0x10]
mov byte [esp + 0x202c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x414a2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x202c], bl
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x414a52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x414a75
lea ecx, [esp + 0x18]
push ecx
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x414a75
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]