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

Disassembly:
sub esp, 0x188
mov eax, dword [0x468004]
xor eax, esp
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x190]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x19c]
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.0042f876
push ebx
mov ebp, eax
push 0
push ebp
call fcn.0042e2e0
add esi, 0x10
push esi
call fcn.0042f876
mov esi, eax
mov eax, dword [esp + 0x24]
add eax, 0x10
push eax
push 0
push esi
call fcn.0042e2e0
add esp, 0x20
test esi, esi
je 0x40f9d7
cmp dword [esp + 0x20], 0
je 0x40fadf
push 0x30
lea edx, [esp + 0x64]
push 0
push edx
call fcn.0042e2e0
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 0x40f9df
push esi
call fcn.0042f71f
add esp, 4
or eax, 0xffffffff
jmp 0x40fc06
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 0x40f9ce
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 0x40fa49
push esi
call fcn.0042f71f
mov eax, dword [esp + 0x18]
add esp, 4
mov byte [eax], 0
or eax, 0xffffffff
jmp 0x40fc06
mov ebx, dword [esp + 0x10]
movzx ecx, word [esi + ebx + 2]
push ecx
call fcn.0042f876
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40f9ce
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 0x103
lea ecx, [esp + 0x95]
push 0
push ecx
mov edi, eax
mov byte [esp + 0x9c], 0
call fcn.0042e2e0
push ebp
lea edx, [esp + 0xa0]
push str.cmdline___S
push edx
call fcn.0040dbf0
lea eax, [esp + 0xa8]
push eax
call fcn.004073f0
add esp, 0x1c
test edi, edi
je 0x40fb96
push esi
call fcn.0042f71f
push ebp
call fcn.0042f71f
add esp, 8
or eax, 0xffffffff
jmp 0x40fc06
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 0x40f9ce
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 0x40f9ce
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 0x40f9ce
mov ecx, dword [esp + 0x10]
movzx edx, word [esi + ecx + 2]
push edx
call fcn.0042f876
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40f9ce
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 0x40fac8
push str..EXE
push ebp
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x40fbda
mov ecx, eax
lea edi, [ecx + 2]
jmp 0x40fbb0
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x40fbb0
sub ecx, edi
sar ecx, 1
cmp ecx, 5
jbe 0x40fbda
cmp word [eax + 8], 0x22
jne 0x40fbce
add eax, 0xa
cmp word [eax + 8], 0x20
jne 0x40fbdc
add eax, 8
jmp 0x40fbdc
mov eax, ebp
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0x200
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
call fcn.0042f71f
push ebp
call fcn.0042f71f
add esp, 8
mov ecx, dword [esp + 0x194]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042e2c5
add esp, 0x188
ret