Function at 0x4521a0
Capabilities:
Patch process command line

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e2060
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x53d9f8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
push str.GetProcessCmdLine:__d_
push str.kupdate::KProcessUtils::GetProcessCmdLine
push 0x495
push str.H:_rc_v12_i18n_20231201_branchCoding_supportwpsupdateUpdateClient_srcutilKProcessUtils.cpp
push 7
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x38], eax
call fcn.00412750
xor esi, esi
add esp, 0x18
mov dword [ebp - 0x44], esi
xor edi, edi
mov dword [ebp - 4], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x48], edi
push ebx
push edi
push 0x410
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x452356
mov esi, ebx
mov dword [ebp - 0x44], esi
cmp ebx, 0xffffffff
je 0x452356
push str.NtQueryInformationProcess
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push 0x18
lea ecx, [ebp - 0x28]
push ecx
push edi
push ebx
call eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x452356
push edi
push 4
lea ecx, [ebp - 0x30]
add eax, 0x10
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x452356
push edi
push 8
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x30]
add eax, 0x40
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x452356
mov ax, word [ebp - 0x40]
cmp ax, 2
jb 0x452356
movzx eax, ax
xor ecx, ecx
shr eax, 1
mov edx, 2
mov dword [ebp - 0x50], eax
lea ebx, [eax + 1]
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004bee3b
push ebx
mov edi, eax
push 0
push edi
mov dword [ebp - 0x48], edi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov dword [ebp - 0x34], 0
lea eax, [ebp - 0x34]
push eax
movzx eax, word [ebp - 0x40]
push eax
push edi
push dword [ebp - 0x3c]
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x452356
movzx eax, word [ebp - 0x40]
cmp dword [ebp - 0x34], eax
jne 0x452356
lea eax, [ebp - 0x29]
push eax
mov eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x28]
lea eax, [edi + eax*2]
push eax
push edi
call fcn.004513a0
mov ecx, dword [ebp - 0x38]
push eax
call fcn.00405210
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x452356
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45234c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x45234c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004bee2d
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x14], 8
jb 0x452369
mov eax, dword [eax]
push eax
push dword [ebp - 0x54]
push str.PID:__d__cmdline_is:__s_
push str.kupdate::KProcessUtils::GetProcessCmdLine
push 0x4c3
push str.H:_rc_v12_i18n_20231201_branchCoding_supportwpsupdateUpdateClient_srcutilKProcessUtils.cpp
push 7
call fcn.00412750
add esp, 0x1c
test edi, edi
je 0x452398
push edi
call fcn.004bee44
add esp, 4
test esi, esi
je 0x4523a8
cmp esi, 0xffffffff
je 0x4523a8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bee49
mov esp, ebp
pop ebp
ret