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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
push str.NtQueryInformationProcess
push 0x4292ec
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40462e
xor eax, eax
jmp 0x404884
push str.RtlEnterCriticalSection
push 0x429318
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x404655
xor eax, eax
jmp 0x404884
push str.RtlLeaveCriticalSection
push 0x429344
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40467c
xor eax, eax
jmp 0x404884
push str.RtlInitUnicodeString
push 0x429370
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4046a3
xor eax, eax
jmp 0x404884
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x28]
push 0
push 0x438
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4046cc
xor eax, eax
jmp 0x404884
push 0
push 0x18
lea eax, [ebp - 0x48]
push eax
push 0
push dword [ebp - 4]
call dword [ebp - 0x1c]
push 0
push 4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x4046fc
xor eax, eax
jmp 0x404884
push 0
push 4
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 8]
add eax, 0xc
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x40471f
xor eax, eax
jmp 0x404884
push 0x104
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.explorer.exe
push 0x105
lea eax, [ebp - 0x254]
push eax
call fcn.0040eb10
add esp, 0xc
push 0x104
call fcn.0040f2e1
pop ecx
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x254]
push eax
push 0x104
push dword [ebp - 0xc]
call fcn.0040eb7f
add esp, 0xc
mov eax, dword [ebp - 8]
push dword [eax + 0x1c]
call dword [ebp - 0x20]
push dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
add eax, 0x38
push eax
call dword [ebp - 0x10]
push dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
add eax, 0x40
push eax
call dword [ebp - 0x10]
push 0x104
lea eax, [ebp - 0x664]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x18], eax
push 0
push 4
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x4047e1
xor eax, eax
jmp 0x404884
push 0
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 0x26]
push eax
lea eax, [ebp - 0x45c]
push eax
mov eax, dword [ebp - 0x14]
push dword [eax + 0x28]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x404809
xor eax, eax
jmp 0x404884
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x664]
push eax
call fcn.0040f0de
pop ecx
pop ecx
test eax, eax
jne 0x40483e
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
add eax, 0x24
push eax
call dword [ebp - 0x10]
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
add eax, 0x2c
push eax
call dword [ebp - 0x10]
jmp 0x404852
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x30]
jne 0x4047c1
mov eax, dword [ebp - 8]
push dword [eax + 0x1c]
call dword [ebp - 0x24]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x254]
push eax
call fcn.0040f0de
pop ecx
pop ecx
test eax, eax
jne 0x404881
xor eax, eax
jmp 0x404884
xor eax, eax
inc eax
leave
ret