Function at 0x4f9ab0
Capabilities:
Patch process command line
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x10300]
mov eax, 0x10300
call fcn.005e00d0
push 0xfffffffffffffffe
push 0x672ed8
push 0x5dfbd0
mov eax, dword fs:[0]
push eax
sub esp, 0x314
mov eax, dword [0x6aae14]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x102fc], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, dword [ebp + 0x1030c]
mov dword [ebp - 0x5c], edi
mov eax, dword [ebp + 0x10310]
mov dword [ebp - 0x48], eax
mov esi, dword [ebp + 0x10314]
mov dword [ebp - 0x64], esi
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], ebx
push 0x10020
push ebx
lea ecx, [ebp]
push ecx
call fcn.005dfd60
push 0x1d8
push ebx
lea edx, [ebp + 0x10020]
push edx
call fcn.005dfd60
push 0x290
push ebx
lea eax, [ebp - 0x324]
push eax
call fcn.005dfd60
add esp, 0x24
cmp esi, ebx
je 0x4f9b69
mov dword [esi], ebx
cmp edi, ebx
je 0x4f9b6f
mov byte [edi], bl
mov eax, dword [ebp - 0x48]
cmp eax, ebx
je 0x4f9b78
mov byte [eax], bl
mov eax, dword [ebp + 0x10308]
cmp eax, ebx
jne 0x4f9b88
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, eax
mov dword [ebp], edi
mov dword [ebp - 4], ebx
cmp esi, ebx
je 0x4f9b9a
mov dword [esi], 0x65
push 0x61bf44
call fcn.004f4be0
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x4f9bcf
cmp esi, ebx
je 0x4f9bb5
mov dword [esi], 1
push 0xfffffffffffffffe
lea ecx, [ebp - 0x10]
push ecx
push 0x6aae14
call fcn.005e42c4
add esp, 0xc
xor eax, eax
jmp 0x4fa499
cmp esi, ebx
je 0x4f9bd9
mov dword [esi], 0x66
push str.NtQueryInformationProcess
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x40], eax
cmp eax, ebx
jne 0x4f9c1f
lea edx, [ebp - 0x24]
push edx
call fcn.004f37c0
add esp, 4
mov dword [ebp - 0x24], ebx
cmp esi, ebx
je 0x4f9c05
mov dword [esi], 2
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x6aae14
call fcn.005e42c4
add esp, 0xc
xor eax, eax
jmp 0x4fa499
cmp esi, ebx
je 0x4f9c29
mov dword [esi], 0x67
push edi
push ebx
push 0x410
call fcn.004e45c0
add esp, 0xc
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x4f9c73
lea ecx, [ebp - 0x24]
push ecx
call fcn.004f37c0
add esp, 4
mov dword [ebp - 0x24], ebx
cmp esi, ebx
je 0x4f9c59
mov dword [esi], 3
push 0xfffffffffffffffe
lea edx, [ebp - 0x10]
push edx
push 0x6aae14
call fcn.005e42c4
add esp, 0xc
xor eax, eax
jmp 0x4fa499
cmp esi, ebx
je 0x4f9c7d
mov dword [esi], 0x68
push 0x18
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp edi, ebx
jne 0x4f9cbe
lea eax, [ebp - 0x1c]
push eax
call fcn.004dca10
lea ecx, [ebp - 0x24]
push ecx
call fcn.004f37c0
add esp, 4
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], ebx
cmp esi, ebx
je 0x4f9c59
mov dword [esi], 5
jmp 0x4f9c59
cmp esi, ebx
je 0x4f9cc8
mov dword [esi], 0x6a
lea eax, [ebp - 0x3c]
push eax
push 0x18
push edi
push ebx
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
cmp esi, ebx
je 0x4f9ce4
mov dword [esi], 0x6b
cmp eax, ebx
jl 0x4f9d5e
cmp dword [ebp - 0x3c], 0x18
jbe 0x4f9d5e
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x2c], ebx
mov edx, dword [ebp - 0x3c]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp edi, ebx
jne 0x4f9d4a
lea eax, [ebp - 0x1c]
push eax
call fcn.004dca10
lea ecx, [ebp - 0x24]
push ecx
call fcn.004f37c0
add esp, 4
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], ebx
cmp esi, ebx
je 0x4f9c59
mov dword [esi], 6
jmp 0x4f9c59
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
push edi
push ebx
mov edx, dword [ebp - 0x1c]
push edx
call dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
cmp esi, ebx
je 0x4f9d68
mov dword [esi], 0x6c
cmp eax, ebx
jne 0x4f9d75
cmp dword [edi + 4], ebx
jne 0x4fa093
cmp dword [ebp - 0x48], ebx
je 0x4fa093
mov edi, 1
mov dword [ebp - 0x50], edi
call fcn.004d96c0
test eax, eax
je 0x4fa089
mov dword [ebp - 0x58], ebx
cmp esi, ebx
je 0x4f9da0
mov dword [esi], 0x6d
cmp dword [0x74ba88], ebx
jne 0x4f9dbb
mov dword [0x74ba88], edi
push 0x74ba64
call fcn.004f7780
add esp, 4
cmp esi, ebx
je 0x4f9dc5
mov dword [esi], 0x6e
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.004d9690
add esp, 8
xor ecx, ecx
mov ax, word [0x74ba64]
cmp ax, 9
setne cl
dec ecx
and ecx, 0x10
add ecx, 0x10
mov dword [ebp - 0x40], ecx
xor edx, edx
cmp ax, 9
setne dl
dec edx
and edx, 0x30
add edx, 0x40
mov edi, edx
mov dword [ebp - 0x54], edi
cmp esi, ebx
je 0x4f9e10
mov dword [esi], 0x6f
mov eax, dword [ebp - 0x40]
add eax, 8
push eax
call fcn.005e20e4
add esp, 4
mov dword [ebp - 0x38], eax
cmp esi, ebx
je 0x4f9e2c
mov dword [esi], 0x70
add edi, 0x10
mov dword [ebp - 0x4c], edi
push edi
call fcn.005e20e4
add esp, 4
mov dword [ebp - 0x30], eax
cmp esi, ebx
je 0x4f9e48
mov dword [esi], 0x71
cmp dword [ebp - 0x38], ebx
je 0x4fa065
cmp dword [ebp - 0x30], 0
je 0x4fa065
mov eax, dword [ebp - 0x40]
add eax, 8
push eax
push 0
mov eax, dword [ebp - 0x38]
push eax
call fcn.005dfd60
mov ecx, dword [ebp - 0x4c]
push ecx
push 0
mov edx, dword [ebp - 0x30]
push edx
call fcn.005dfd60
add esp, 0x18
test esi, esi
je 0x4f9e89
mov dword [esi], 0x72
cmp dword [ebp - 0x58], 0
je 0x4fa065
push 0x30
push 0
lea eax, [ebp - 0x94]
push eax
call fcn.005dfd60
add esp, 0xc
test esi, esi
je 0x4f9eb0
mov dword [esi], 0x73
push str.NtWow64QueryInformationProcess64
push 0x61bf44
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4fa05b
push 0
push 0x30
lea ecx, [ebp - 0x94]
push ecx
push 0
mov edi, dword [ebp - 0x1c]
push edi
call eax
test eax, eax
jne 0x4fa05b
test esi, esi
je 0x4f9ef6
mov dword [esi], 0x74
push str.NtWow64ReadVirtualMemory64
push 0x61bf44
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x4f9f31
push 0
push 0
mov eax, dword [ebp - 0x40]
add eax, 8
push eax
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0x8c]
push ecx
push edi
call ebx
jmp 0x4f9f36
mov eax, 0x57
test esi, esi
je 0x4f9f40
mov dword [esi], 0x75
test eax, eax
jne 0x4fa04f
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x38]
lea edi, [eax + edx]
lea ecx, [ebp - 0x44]
test esi, esi
je 0x4f9f5e
mov dword [esi], 0x76
xor eax, eax
mov dword [ebp - 0x60], eax
cmp eax, 8
jge 0x4f9f71
mov dl, byte [eax + edi]
mov byte [eax + ecx], dl
inc eax
jmp 0x4f9f60
test esi, esi
je 0x4f9f7b
mov dword [esi], 0x77
push 0
push 0
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call ebx
test eax, eax
jne 0x4fa043
test esi, esi
je 0x4f9fa7
mov dword [esi], 0x78
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x54]
lea eax, [edx + eax + 2]
mov dword [ebp - 0x4c], eax
movzx ecx, word [eax]
push ecx
call fcn.005e20e4
add esp, 4
mov edi, eax
test edi, edi
je 0x4fa037
test esi, esi
je 0x4f9fd0
mov dword [esi], 0x79
push 0
mov edx, dword [ebp - 0x4c]
movzx eax, word [edx]
cdq
push edx
push eax
push edi
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x54]
mov edx, dword [eax + ecx + 0xc]
push edx
mov eax, dword [eax + ecx + 8]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call ebx
test eax, eax
jne 0x4fa022
push eax
push eax
push 0x8000
mov edx, dword [ebp - 0x48]
push edx
push 0xffffffffffffffff
push edi
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, 1
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x28], eax
push edi
call fcn.005e0865
add esp, 4
jmp 0x4fa065
test esi, esi
je 0x4fa02c
mov dword [esi], 0x1a
push edi
call fcn.005e0865
add esp, 4
jmp 0x4fa065
test esi, esi
je 0x4fa065
mov dword [esi], 0x19
jmp 0x4fa065
test esi, esi
je 0x4fa065
mov dword [esi], 0x18
jmp 0x4fa065
test esi, esi
je 0x4fa065
mov dword [esi], 0x17
jmp 0x4fa065
test esi, esi
je 0x4fa065
mov dword [esi], 0x16
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4fa075
push eax
call fcn.005e0865
add esp, 4
cmp dword [ebp - 0x30], 0
je 0x4fa093
mov eax, dword [ebp - 0x30]
push eax
call fcn.005e0865
add esp, 4
jmp 0x4fa093
cmp esi, ebx
je 0x4fa093
mov dword [esi], 0x14
cmp dword [ebp - 0x50], 0
jne 0x4fa46c
test esi, esi
je 0x4fa0a7
mov dword [esi], 0xc8
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x14]
mov dword [ebp + 4], ecx
mov edx, dword [eax + 0xc]
mov dword [ebp + 0x14], edx
mov ecx, dword [eax]
mov dword [ebp + 0x18], ecx
mov edx, dword [eax + 4]
mov dword [ebp + 0xc], edx
mov ecx, dword [eax + 8]
mov dword [ebp + 0x10], ecx
test esi, esi
je 0x4fa0d1
mov dword [esi], 0xf0
cmp dword [eax + 4], 0
je 0x4fa443
test esi, esi
je 0x4fa0e5
mov dword [esi], 0xca
lea edx, [ebp - 0x34]
push edx
push 0x1d8
lea ecx, [ebp + 0x10020]
push ecx
mov edx, dword [eax + 4]
push edx
mov ebx, dword [ebp - 0x1c]
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call edi
test eax, eax
je 0x4fa3ed
mov eax, dword [ebp + 0x101f4]
mov dword [ebp + 8], eax
mov cl, byte [ebp + 0x10022]
mov byte [ebp + 0x1c], cl
test esi, esi
je 0x4fa129
mov dword [esi], 0xcb
mov dword [ebp - 0x34], 0
lea edx, [ebp - 0x34]
push edx
push 0x290
lea eax, [ebp - 0x324]
push eax
mov ecx, dword [ebp + 0x10030]
push ecx
push ebx
call edi
test eax, eax
je 0x4fa3e1
mov dword [ebp - 0x28], 1
test esi, esi
je 0x4fa163
mov dword [esi], 0xcc
mov ax, word [ebp - 0x2e4]
test ax, ax
jbe 0x4fa2a5
test esi, esi
je 0x4fa17d
mov dword [esi], 0xcd
movzx edx, ax
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x4fa34a
test esi, esi
je 0x4fa1a7
mov dword [esi], 0xce
lea eax, [ebp - 0x34]
push eax
movzx ecx, word [ebp - 0x2e4]
push ecx
push edi
mov edx, dword [ebp - 0x2e0]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4fa24b
mov ecx, 0x8000
mov ax, word [ebp - 0x2e4]
cmp ax, cx
jb 0x4fa1e0
lea eax, [ecx - 1]
jmp 0x4fa1e3
movzx eax, ax
push 0
push 0
push 0x8000
lea edx, [ebp + 0x801d]
push edx
shr eax, 1
push eax
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test esi, esi
je 0x4fa20b
mov dword [esi], 0xcf
mov edx, dword [ebp - 0x48]
test edx, edx
je 0x4fa25c
test esi, esi
je 0x4fa21c
mov dword [esi], 0x816
cmp byte [ebp + 0x801d], 0
je 0x4fa25c
test esi, esi
je 0x4fa22f
mov dword [esi], 0x817
lea ecx, [ebp + 0x801d]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x4fa235
test esi, esi
je 0x4fa25c
mov dword [esi], 0x819
jmp 0x4fa25c
test esi, esi
je 0x4fa255
mov dword [esi], 7
mov dword [ebp - 0x28], 0
mov dword [ebp - 4], 1
push edi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], edi
jmp 0x4fa2a8
mov edi, dword [ebp - 0x20]
test esi, esi
je 0x4fa2b2
mov dword [esi], 0x818
mov ax, word [ebp - 0x2ec]
test ax, ax
jbe 0x4fa450
mov ebx, dword [ebp - 0x5c]
test ebx, ebx
je 0x4fa450
test esi, esi
je 0x4fa2d7
mov dword [esi], 0xd0
mov dword [ebp - 0x34], 0
movzx eax, ax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x4fa3ce
test esi, esi
je 0x4fa308
mov dword [esi], 0xd1
lea ecx, [ebp - 0x34]
push ecx
movzx edx, word [ebp - 0x2ec]
push edx
push edi
mov eax, dword [ebp - 0x2e8]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4fa3a3
test esi, esi
je 0x4fa334
mov dword [esi], 0xd2
mov edx, 0x8000
mov ax, word [ebp - 0x2ec]
cmp ax, dx
jb 0x4fa360
lea eax, [edx - 1]
jmp 0x4fa363
test esi, esi
je 0x4fa354
mov dword [esi], 8
mov dword [ebp - 0x28], 0
jmp 0x4fa2a8
movzx eax, ax
push 0
push 0
push 0x8000
lea ecx, [ebp + 0x1d]
push ecx
shr eax, 1
push eax
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp byte [ebp + 0x1d], 0
je 0x4fa3b4
lea ecx, [ebp + 0x1d]
mov edx, ebx
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x4fa390
mov dword [ebp - 0x28], 1
jmp 0x4fa3b4
test esi, esi
je 0x4fa3ad
mov dword [esi], 9
mov dword [ebp - 0x28], 0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
mov dword [ebp - 0x20], edi
jmp 0x4fa450
test esi, esi
je 0x4fa3d8
mov dword [esi], 0xa
mov dword [ebp - 0x28], 0
jmp 0x4fa450
test esi, esi
je 0x4fa44d
mov dword [esi], 0xb
jmp 0x4fa44d
call fcn.004dbc80
test eax, eax
je 0x4fa437
mov byte [ebp + 0x101f8], 0
push 0x103
push 0
lea edx, [ebp + 0x101f9]
push edx
call fcn.005dfd60
push 0x104
lea eax, [ebp + 0x101f8]
push eax
call fcn.004d8c20
lea ecx, [ebp + 0x101f8]
push ecx
push str._MONITOR__ReadProcessMemory_Failed__Reason:__s
push 0
call fcn.004f0f30
add esp, 0x20
test esi, esi
je 0x4fa44d
mov dword [esi], 0xc
jmp 0x4fa44d
test esi, esi
je 0x4fa44d
mov dword [esi], 0xd
mov edi, dword [ebp - 0x20]
cmp dword [ebp], 4
jne 0x4fa46f
push 0x8000
lea edx, [ebp + 0x1d]
push edx
push str._SystemRoot_System32_ntoskrnl.exe
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
jmp 0x4fa46f
mov edi, dword [ebp - 0x20]
xor esi, esi
mov eax, dword [ebp - 0x2c]
cmp eax, esi
je 0x4fa48a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 4], 0xfffffffe
call fcn.004fa4c3
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x102fc]
xor ecx, ebp
call fcn.005dfbbe
add ebp, 0x10300
mov esp, ebp
pop ebp
ret