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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x654
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push edi
push str.NtQueryInformationProcess
push str.ntdll.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
mov ebx, eax
test ebx, ebx
je 0x401294
push str.RtlEnterCriticalSection
push str.ntdll.dll
call esi
push eax
call edi
mov dword [ebp - 0x18], eax
test eax, eax
je 0x401294
push str.RtlLeaveCriticalSection
push str.ntdll.dll
call esi
push eax
call edi
mov dword [ebp - 0x20], eax
test eax, eax
je 0x401294
push str.RtlInitUnicodeString
push str.ntdll.dll
call esi
push eax
call edi
mov dword [ebp - 0x14], eax
test eax, eax
je 0x401294
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 0x401294
push 0
push 0x18
lea eax, [ebp - 0x38]
push eax
push 0
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 4]
push 0
push 4
push eax
lea eax, [ebp - 0x34]
push eax
push esi
call edi
test eax, eax
je 0x401294
push 0
push 4
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
add eax, 0xc
push eax
push esi
call edi
test eax, eax
je 0x401294
push 0x104
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.explorer.exe
lea eax, [ebp - 0x244]
push 0x105
push eax
call fcn.00404493
push 0x104
call fcn.00404852
mov ebx, eax
lea eax, [ebp - 0x244]
push eax
push 0x104
push ebx
mov dword [ebp - 0x10], ebx
call fcn.0040442f
mov ecx, dword [ebp - 4]
add esp, 0x1c
push dword [ecx + 0x1c]
call dword [ebp - 0x18]
mov eax, dword [ebp - 4]
push ebx
mov ebx, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
add eax, 0x38
push eax
call ebx
mov eax, dword [ebp - 4]
push dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
add eax, 0x40
push eax
call ebx
push 0x104
lea eax, [ebp - 0x654]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov ebx, dword [eax + 0xc]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], eax
nop dword [eax]
push 0
push 4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
call edi
test eax, eax
je 0x401294
mov ecx, dword [ebp - 8]
push 0
movzx eax, word [ecx + 0x26]
push eax
lea eax, [ebp - 0x44c]
push eax
push dword [ecx + 0x28]
push esi
call edi
test eax, eax
je 0x401294
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x654]
push eax
call fcn.0040432e
add esp, 8
test eax, eax
mov eax, dword [ebp - 8]
je 0x40124a
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
cmp eax, ebx
jne 0x4011f0
jmp 0x401261
mov edi, dword [ebp - 0x10]
add eax, 0x24
mov ebx, dword [ebp - 0x14]
push edi
push eax
call ebx
mov eax, dword [ebp - 8]
push edi
add eax, 0x2c
push eax
call ebx
mov eax, dword [ebp - 4]
push dword [eax + 0x1c]
call dword [ebp - 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x244]
push eax
call fcn.0040432e
add esp, 8
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret