Function at 0x40f9a0
Capabilities:
Get system information on windows
Patch process command line

Disassembly:
sub esp, 0x884
mov eax, dword [0x468004]
xor eax, esp
mov dword [esp + 0x880], eax
mov eax, dword [esp + 0x88c]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x898]
mov dword [esp + 0x14], eax
xor eax, eax
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
mov eax, dword [esp + 0x3c]
xor ebx, ebx
cmp ax, 9
setne bl
xor ecx, ecx
dec ebx
and ebx, 0x10
add ebx, 0x10
cmp ax, 9
setne cl
mov dword [esp + 0x18], ebx
add ebx, 8
push ebx
dec ecx
and ecx, 0x30
add ecx, 0x40
mov esi, ecx
mov dword [esp + 0x14], esi
call fcn.004300c6
push ebx
mov ebp, eax
push 0
push ebp
call fcn.0042eb30
add esi, 0x10
push esi
call fcn.004300c6
mov esi, eax
mov eax, dword [esp + 0x24]
add eax, 0x10
push eax
push 0
push esi
call fcn.0042eb30
add esp, 0x20
test esi, esi
je 0x40fac7
cmp dword [esp + 0x20], 0
je 0x40fbcf
push 0x30
lea edx, [esp + 0x64]
push 0
push edx
call fcn.0042eb30
add esp, 0xc
push str.NtWow64QueryInformationProcess64
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 0x30
lea ecx, [esp + 0x68]
push ecx
push 0
push edi
call eax
test eax, eax
je 0x40facf
push esi
call fcn.0042ff6f
add esp, 4
or eax, 0xffffffff
jmp 0x40fcf6
push str.NtWow64ReadVirtualMemory64
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
push 0
push 0
push ebx
push ebp
push edx
push ecx
push edi
mov dword [esp + 0x38], eax
call eax
test eax, eax
jne 0x40fabe
mov edx, dword [esp + 0x18]
mov ebp, dword [edx + ebp]
push eax
push eax
mov eax, dword [esp + 0x18]
add eax, 0x10
push eax
push esi
mov eax, ebp
cdq
push edx
push eax
push edi
call dword [esp + 0x38]
test eax, eax
je 0x40fb39
push esi
call fcn.0042ff6f
mov eax, dword [esp + 0x18]
add esp, 4
mov byte [eax], 0
or eax, 0xffffffff
jmp 0x40fcf6
mov ebx, dword [esp + 0x10]
movzx ecx, word [esi + ebx + 2]
push ecx
call fcn.004300c6
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40fabe
movzx eax, word [esi + ebx + 2]
push 0
cdq
push edx
mov edx, dword [esi + ebx + 0xc]
push eax
mov eax, dword [esi + ebx + 8]
push ebp
push edx
push eax
push edi
call dword [esp + 0x38]
push 0x7ff
lea ecx, [esp + 0x95]
push 0
push ecx
mov edi, eax
mov byte [esp + 0x9c], 0
call fcn.0042eb30
push ebp
lea edx, [esp + 0xa0]
push str.cmdline___S
push edx
call fcn.0040dd20
lea eax, [esp + 0xa8]
push eax
call fcn.004073f0
add esp, 0x1c
test edi, edi
je 0x40fc86
push esi
call fcn.0042ff6f
push ebp
call fcn.0042ff6f
add esp, 8
or eax, 0xffffffff
jmp 0x40fcf6
xor eax, eax
push str.NtQueryInformationProcess
push str.ntdll.dll
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 0x18
lea ecx, [esp + 0x2c]
push ecx
push 0
push edi
call eax
test eax, eax
jne 0x40fabe
mov edx, dword [esp + 0x28]
push eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push ebp
push edx
push edi
call ebx
test eax, eax
je 0x40fabe
mov eax, dword [esp + 0x18]
mov ebp, dword [eax + ebp]
mov eax, dword [esp + 0x10]
push 0
add eax, 0x10
push eax
push esi
push ebp
push edi
call ebx
test eax, eax
je 0x40fabe
mov ecx, dword [esp + 0x10]
movzx edx, word [esi + ecx + 2]
push edx
call fcn.004300c6
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40fabe
mov eax, dword [esp + 0x10]
movzx ecx, word [esi + eax + 2]
mov edx, dword [esi + eax + 4]
push 0
push ecx
push ebp
push edx
push edi
call ebx
test eax, eax
je 0x40fbb8
push str..EXE
push ebp
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x40fcca
mov ecx, eax
lea edi, [ecx + 2]
jmp 0x40fca0
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x40fca0
sub ecx, edi
sar ecx, 1
cmp ecx, 5
jbe 0x40fcca
cmp word [eax + 8], 0x22
jne 0x40fcbe
add eax, 0xa
cmp word [eax + 8], 0x20
jne 0x40fccc
add eax, 8
jmp 0x40fccc
mov eax, ebp
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0x800
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
call fcn.0042ff6f
push ebp
call fcn.0042ff6f
add esp, 8
mov ecx, dword [esp + 0x890]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042eb15
add esp, 0x884
ret