Function at 0x401170
Capabilities:
Get common file path
Patch process command line

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x658
mov eax, dword [0x406004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push edi
push str.NtQueryInformationProcess
push 0x40432c
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
mov ebx, eax
test ebx, ebx
je 0x401415
push str.RtlEnterCriticalSection
push 0x40432c
call esi
push eax
call edi
mov dword [ebp - 0x650], eax
test eax, eax
je 0x401415
push str.RtlLeaveCriticalSection
push 0x40432c
call esi
push eax
call edi
mov dword [ebp - 0x658], eax
test eax, eax
je 0x401415
push str.RtlInitUnicodeString
push 0x40432c
call esi
push eax
call edi
mov dword [ebp - 0x654], eax
test eax, eax
je 0x401415
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x438
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, 0xffffffff
je 0x401415
push 0
push 0x18
lea eax, [ebp - 0x638]
push eax
push 0
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 0x63c]
push 0
push 4
push eax
lea eax, [ebp - 0x634]
push eax
push esi
call edi
test eax, eax
je 0x401415
push 0
push 4
lea eax, [ebp - 0x648]
push eax
mov eax, dword [ebp - 0x63c]
add eax, 0xc
push eax
push esi
call edi
test eax, eax
je 0x401415
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.explorer.exe
lea eax, [ebp - 0x210]
push 0x105
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
push 0x104
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
lea eax, [ebp - 0x210]
push eax
push 0x104
push ebx
mov dword [ebp - 0x64c], ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov ecx, dword [ebp - 0x63c]
add esp, 0x1c
push dword [ecx + 0x1c]
call dword [ebp - 0x650]
mov eax, dword [ebp - 0x63c]
push ebx
mov ebx, dword [ebp - 0x654]
mov eax, dword [eax + 0x10]
add eax, 0x38
push eax
call ebx
mov eax, dword [ebp - 0x63c]
push dword [ebp - 0x64c]
mov eax, dword [eax + 0x10]
add eax, 0x40
push eax
call ebx
push 0x104
lea eax, [ebp - 0x620]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [ebp - 0x63c]
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x650], eax
mov eax, dword [ebp - 0x648]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x644], eax
nop dword [eax + eax]
push 0
push 4
lea eax, [ebp - 0x640]
push eax
lea eax, [ebp - 0x644]
push eax
push esi
call edi
test eax, eax
je 0x401415
mov ecx, dword [ebp - 0x640]
push 0
movzx eax, word [ecx + 0x26]
push eax
lea eax, [ebp - 0x418]
push eax
push dword [ecx + 0x28]
push esi
call edi
test eax, eax
je 0x401415
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x620]
push eax
call ebx
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x640]
je 0x4013ae
mov eax, dword [eax]
mov dword [ebp - 0x644], eax
cmp eax, dword [ebp - 0x650]
jne 0x401340
jmp 0x4013d2
push dword [ebp - 0x64c]
mov edi, dword [ebp - 0x654]
add eax, 0x24
push eax
call edi
mov eax, dword [ebp - 0x640]
push dword [ebp - 0x64c]
add eax, 0x2c
push eax
call edi
mov eax, dword [ebp - 0x63c]
push dword [eax + 0x1c]
call dword [ebp - 0x658]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x210]
push eax
call ebx
add esp, 8
test eax, eax
je 0x401415
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004023ff
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004023ff
mov esp, ebp
pop ebp
ret