Function at 0x40e410
Capabilities:
Query or enumerate registry value
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x45bd15
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x473354]
xor eax, esp
mov dword [esp + 0x13c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x473354]
xor eax, esp
push eax
lea eax, [esp + 0x154]
mov dword fs:[0], eax
mov eax, dword [esp + 0x16c]
mov esi, dword [esp + 0x168]
push str.System32_ntdll.dll
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], eax
call fcn.00406590
xor edi, edi
push esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x160], edi
call fcn.00406500
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
mov ecx, eax
mov byte [esp + 0x164], 1
call fcn.004097a0
mov esi, dword [eax]
mov byte [esp + 0x15c], 2
cmp esi, edi
je 0x40e4be
cmp dword [esi + 4], edi
jne 0x40e4b9
mov eax, dword [esi]
push eax
call fcn.0042e110
mov dword [esi + 4], eax
mov esi, dword [esi + 4]
jmp 0x40e4c0
xor esi, esi
push esi
call fcn.00416f90
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ebx, dword [sym.imp.OLEAUT32.dll_SysStringLen]
add esp, 4
cmp eax, 0xffffffff
mov eax, dword [esp + 0x24]
sete byte [esp + 0x37]
cmp eax, edi
je 0x40e51b
mov esi, eax
add eax, 8
push eax
call ebp
cmp eax, edi
jne 0x40e517
cmp esi, edi
je 0x40e517
mov eax, dword [esi]
cmp eax, edi
je 0x40e4fe
push eax
call ebx
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40e50e
push eax
call fcn.00430786
add esp, 4
push esi
call fcn.0042f2c2
add esp, 4
mov dword [esp + 0x24], edi
mov esi, dword [esp + 0x18]
cmp esi, edi
je 0x40e557
lea ecx, [esi + 8]
push ecx
call ebp
cmp eax, edi
jne 0x40e553
cmp esi, edi
je 0x40e553
mov eax, dword [esi]
cmp eax, edi
je 0x40e53a
push eax
call ebx
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40e54a
push eax
call fcn.00430786
add esp, 4
push esi
call fcn.0042f2c2
add esp, 4
mov dword [esp + 0x18], edi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x15c], 0xffffffff
cmp esi, edi
je 0x40e596
lea edx, [esi + 8]
push edx
call ebp
cmp eax, edi
jne 0x40e596
mov eax, dword [esi]
cmp eax, edi
je 0x40e57d
push eax
call ebx
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40e58d
push eax
call fcn.00430786
add esp, 4
push esi
call fcn.0042f2c2
add esp, 4
cmp byte [esp + 0x37], 0
je 0x40e5b9
mov eax, dword [esp + 0x164]
push str.The_specified_directory_is_not_a_Windows_system_root
push eax
call fcn.00403dc0
add esp, 8
xor eax, eax
jmp 0x40ef5b
push str._system32config_system
lea ecx, [esp + 0x18]
call fcn.00406590
mov ebx, dword [esp + 0x2c]
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x160], 3
call fcn.00406500
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
mov ecx, eax
mov byte [esp + 0x164], 4
call fcn.004097a0
mov esi, dword [eax]
mov byte [esp + 0x15c], 5
cmp esi, edi
je 0x40e61c
cmp dword [esi + 4], edi
jne 0x40e617
mov eax, dword [esi]
push eax
call fcn.0042e110
mov dword [esi + 4], eax
mov esi, dword [esi + 4]
jmp 0x40e61e
xor esi, esi
mov ebp, dword [sym.imp.ADVAPI32.dll_RegLoadKeyA]
push esi
push str.autoruns.system
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.004095d0
lea ecx, [esp + 0x24]
call fcn.004095d0
lea ecx, [esp + 0x14]
mov dword [esp + 0x15c], 0xffffffff
call fcn.004095d0
cmp esi, 0x522
jne 0x40e67d
mov ecx, dword [esp + 0x164]
push str.Autoruns_requires_Administrator_privilege_to_analyze_an_offline_system
push ecx
call fcn.00403dc0
add esp, 8
xor eax, eax
jmp 0x40ef5b
cmp esi, edi
je 0x40e69d
mov edx, dword [esp + 0x164]
push str.Cannot_load_registry_hive_system_of_the_selected_system_root
push edx
call fcn.00403dc0
add esp, 8
xor eax, eax
jmp 0x40ef5b
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x38]
push eax
push 0xf003f
push edi
push str.autoruns.system
push reloc.OLEAUT32.dll_SysReAllocString
call esi
cmp eax, edi
je 0x40e6da
mov ecx, dword [esp + 0x164]
push str.Cannot_open_system_registry_key_of_the_selected_system_root
push ecx
call fcn.00403dc0
add esp, 8
xor eax, eax
jmp 0x40ef5b
push str._system32config_software
lea ecx, [esp + 0x18]
call fcn.00406590
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x160], 6
call fcn.00406500
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
mov ecx, eax
mov byte [esp + 0x164], 7
call fcn.004097a0
mov ecx, eax
mov byte [esp + 0x15c], 8
call fcn.00406660
push eax
push str.autoruns.software
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
lea ecx, [esp + 0x18]
mov ebx, eax
call fcn.004095d0
lea ecx, [esp + 0x24]
call fcn.004095d0
lea ecx, [esp + 0x14]
mov dword [esp + 0x15c], 0xffffffff
call fcn.004095d0
cmp ebx, edi
je 0x40e77a
mov edx, dword [esp + 0x164]
push str.Cannot_load_registry_hive_software_of_the_selected_system_root
push edx
call fcn.00403dc0
add esp, 8
xor eax, eax
jmp 0x40ef5b
lea eax, [esp + 0x3c]
push eax
push 0xf003f
push edi
push str.autoruns.software
push reloc.OLEAUT32.dll_SysReAllocString
call esi
cmp eax, edi
jne 0x40e6be
push str._ntuser.dat
lea ecx, [esp + 0x18]
call fcn.00406590
mov edx, dword [esp + 0x28]
push edx
lea ecx, [esp + 0x28]
mov dword [esp + 0x160], 9
call fcn.00406500
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
mov ecx, eax
mov byte [esp + 0x164], 0xa
call fcn.004097a0
mov ecx, eax
mov byte [esp + 0x15c], 0xb
call fcn.00406660
push eax
push str.autoruns.user
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
lea ecx, [esp + 0x18]
mov ebx, eax
call fcn.004095d0
lea ecx, [esp + 0x24]
call fcn.004095d0
lea ecx, [esp + 0x14]
mov dword [esp + 0x15c], 0xffffffff
call fcn.004095d0
cmp ebx, edi
je 0x40e83d
mov eax, dword [esp + 0x164]
push str.Cannot_load_user_registry_hive_of_the_offline_system
push eax
call fcn.00403dc0
add esp, 8
xor eax, eax
jmp 0x40ef5b
lea ecx, [esp + 0x48]
push ecx
push 0xf003f
push edi
push str.autoruns.user
push reloc.OLEAUT32.dll_SysReAllocString
call esi
cmp eax, edi
je 0x40e874
mov edx, dword [esp + 0x164]
push str.Cannot_open_system_registry_key_of_the_selected_system_root
push edx
call fcn.00403dc0
add esp, 8
xor eax, eax
jmp 0x40ef5b
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x1c]
push eax
push 0x20019
push edi
push str.MicrosoftWindowsCurrentVersion
push ecx
mov dword [esp + 0x30], edi
call esi
mov eax, dword [esp + 0x1c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x30]
push edx
push 0x474920
push edi
push edi
push str.ProgramFilesDir
mov ebp, 0x104
push eax
mov dword [esp + 0x48], ebp
mov byte [0x474920], 0
call ebx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ecx
push 0x4746b0
push edi
push edi
push str.ProgramFilesDir__x86_
push edx
mov dword [esp + 0x48], ebp
mov byte [0x4746b0], 0
call ebx
cmp byte [0x4746b0], 0
jne 0x40e8fc
push 0x474920
push ebp
push 0x4746b0
call fcn.004327a5
add esp, 0xc
mov ebp, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x474920
push str.PROGRAMFILES
call ebp
push 0x474920
push str.ProgramW6432
call ebp
push 0x4746b0
push str.PROGRAMFILES_X86_
call ebp
lea ecx, [esp + 0x20]
call fcn.00401140
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push edi
push edi
push str.CommonFilesDir
push ecx
mov dword [esp + 0x170], 0xc
call fcn.00416ab0
mov edx, dword [esp + 0x34]
add esp, 0x14
push edx
push str.CommonProgramFiles
call ebp
push 0x46043c
lea ecx, [esp + 0x24]
call fcn.00401200
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push edi
push edi
push str.CommonFilesDir__x86_
push ecx
call fcn.00416ab0
mov edx, dword [esp + 0x34]
add esp, 0x14
push edx
push str.CommonProgramFiles_x86_
call ebp
push 0x46043c
lea ecx, [esp + 0x24]
call fcn.00401200
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push edi
push edi
push str.CommonW6432Dir
push ecx
call fcn.00416ab0
mov edx, dword [esp + 0x34]
add esp, 0x14
push edx
push str.CommonProgramW6432
call ebp
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call edi
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
push 0
push str.MicrosoftWindows_NTCurrentVersion
push edx
mov dword [esp + 0x30], 0
call esi
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push 0x474b68
push 0
push 0
mov dword [esp + 0x40], 0x104
mov byte [0x474b68], 0
push str.SystemRoot
push ecx
call ebx
push 0x474b68
push str.SystemRoot
call ebp
push 0x474b68
push str.WinDir
call ebp
mov edx, dword [esp + 0x1c]
push edx
call edi
push str.System32
lea ecx, [esp + 0x18]
call fcn.00406590
push 0x474b68
lea ecx, [esp + 0x1c]
mov byte [esp + 0x160], 0xd
call fcn.00406500
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x2c]
push edx
mov ecx, eax
mov byte [esp + 0x164], 0xe
call fcn.004097a0
mov ecx, eax
mov byte [esp + 0x15c], 0xf
call fcn.00406660
mov ecx, 0x474a28
jmp 0x40ea90
mov dl, byte [eax]
mov byte [ecx], dl
inc eax
inc ecx
test dl, dl
jne 0x40ea90
lea ecx, [esp + 0x28]
call fcn.004095d0
lea ecx, [esp + 0x18]
call fcn.004095d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x15c], 0xc
call fcn.004095d0
push str.SysWow64
lea ecx, [esp + 0x18]
call fcn.00406590
push 0x474b68
lea ecx, [esp + 0x1c]
mov byte [esp + 0x160], 0x10
call fcn.00406500
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x2c]
push edx
mov ecx, eax
mov byte [esp + 0x164], 0x11
call fcn.004097a0
mov ecx, eax
mov byte [esp + 0x15c], 0x12
call fcn.00406660
mov edx, 0x474c70
mov edi, edi
mov cl, byte [eax]
mov byte [edx], cl
inc eax
inc edx
test cl, cl
jne 0x40eb10
lea ecx, [esp + 0x28]
call fcn.004095d0
lea ecx, [esp + 0x18]
call fcn.004095d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x15c], 0xc
call fcn.004095d0
push 0x474c70
call fcn.00416f90
add esp, 4
cmp eax, 0xffffffff
jne 0x40eb62
xor eax, eax
mov cl, byte [eax + 0x474a28]
mov byte [eax + 0x474c70], cl
inc eax
test cl, cl
jne 0x40eb51
push str.autoruns.system
lea ecx, [esp + 0x1c]
call fcn.00406500
push str.SYSTEM
lea ecx, [esp + 0x18]
mov byte [esp + 0x160], 0x13
call fcn.00406500
lea eax, [esp + 0x18]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x1c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, 0x474ec8
mov byte [esp + 0x16c], 0x14
call fcn.0040e270
lea ecx, [esp + 0x14]
call fcn.004095d0
lea ecx, [esp + 0x18]
mov byte [esp + 0x15c], 0xc
call fcn.004095d0
push str.autoruns.software
lea ecx, [esp + 0x1c]
call fcn.00406500
push str.SOFTWARE
lea ecx, [esp + 0x18]
mov byte [esp + 0x160], 0x15
call fcn.00406500
lea edx, [esp + 0x18]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
lea eax, [esp + 0x1c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, 0x474ec8
mov byte [esp + 0x16c], 0x16
call fcn.0040e270
lea ecx, [esp + 0x14]
call fcn.004095d0
lea ecx, [esp + 0x18]
mov byte [esp + 0x15c], 0xc
call fcn.004095d0
push str.autoruns.user
lea ecx, [esp + 0x1c]
call fcn.00406500
push 0x46043c
lea ecx, [esp + 0x18]
mov byte [esp + 0x160], 0x17
call fcn.00406500
lea ecx, [esp + 0x18]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
lea edx, [esp + 0x1c]
push edx
push SysReAllocString
mov ecx, 0x474ec8
mov byte [esp + 0x16c], 0x18
call fcn.0040e270
lea ecx, [esp + 0x14]
call fcn.004095d0
lea ecx, [esp + 0x18]
mov byte [esp + 0x15c], 0xc
call fcn.004095d0
push str.autoruns.softwareClasses
lea ecx, [esp + 0x1c]
call fcn.00406500
push 0x46043c
lea ecx, [esp + 0x18]
mov byte [esp + 0x160], 0x19
call fcn.00406500
lea eax, [esp + 0x18]
mov byte [esp + 0x15c], 0x1a
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x1c]
push ecx
push SysReAllocString
mov ecx, 0x474ec8
call fcn.0040e270
lea ecx, [esp + 0x14]
call fcn.004095d0
lea ecx, [esp + 0x18]
call fcn.004095d0
push 0x474b68
lea ecx, [esp + 0x2c]
call fcn.00401160
mov edx, dword [esp + 0x2c]
push edx
lea ecx, [esp + 0x28]
call fcn.00401160
mov ebx, dword [esp + 0x28]
push 0x5c
push ebx
mov byte [esp + 0x164], 0x1c
call fcn.004306d0
mov byte [eax], 0
mov eax, dword [esp + 0x2c]
push 0x5c
push eax
call fcn.004306d0
mov ecx, dword [esp + 0x34]
add esp, 0x10
push ecx
lea ecx, [esp + 0x18]
mov byte [eax], 0
call fcn.00406500
push ebx
lea ecx, [esp + 0x30]
mov byte [esp + 0x160], 0x1d
call fcn.00406500
lea edx, [esp + 0x14]
push edx
push 0
lea eax, [esp + 0x34]
push eax
push 0
mov ecx, 0x474ec8
mov byte [esp + 0x16c], 0x1e
call fcn.0040e270
lea ecx, [esp + 0x2c]
call fcn.004095d0
lea ecx, [esp + 0x14]
call fcn.004095d0
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0042f4d9
push ebx
mov byte [esp + 0x164], 0xc
call fcn.0042f4d9
mov eax, dword [esp + 0x40]
add esp, 8
lea edx, [esp + 0x1c]
push edx
push 0x20019
xor ebx, ebx
push ebx
push str.Select
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x54], 0xffffffff
call esi
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x44]
push edx
push ebx
push ebx
mov dword [esp + 0x40], 4
push str.Default
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x1c]
push ecx
call edi
mov edx, dword [esp + 0x40]
push edx
lea eax, [esp + 0x50]
push str.RegistryMachine_autoruns.systemControlSet_03d
push eax
call fcn.00432395
mov ecx, dword [esp + 0x44]
add esp, 0xc
push str.CurrentControlSet
push ecx
push ecx
lea edx, [esp + 0x58]
mov ecx, esp
mov dword [esp + 0x50], esp
push edx
call fcn.00406500
call fcn.0040a6a0
mov ecx, dword [esp + 0x44]
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
push 0x20019
push ebx
push str.CurrentControlSetControlSession_ManagerEnvironment
push ecx
mov dword [esp + 0x30], ebx
call esi
push 0x46043c
mov ecx, 0x474ef4
call fcn.00401200
mov edx, dword [esp + 0x1c]
push 0x474ef4
push ebx
push ebx
push str.Path
push edx
call fcn.00416ab0
mov eax, dword [esp + 0x30]
add esp, 0x14
push eax
call edi
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
push ebx
push str.Environment
push edx
mov dword [esp + 0x30], ebx
call esi
push 0x46043c
lea ecx, [esp + 0x24]
call fcn.00401200
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push ebx
push ebx
push str.Path
push ecx
call fcn.00416ab0
mov edx, dword [esp + 0x30]
add esp, 0x14
push edx
call edi
push 0x474ef4
mov eax, 0x4610e4
lea ecx, [esp + 0x30]
call fcn.004068d0
lea ecx, [esp + 0x24]
push ecx
lea esi, [esp + 0x30]
call fcn.004068a0
add esp, 8
push eax
mov ecx, 0x474ef4
call fcn.00401690
mov edx, dword [esp + 0x28]
push edx
call fcn.0042f4d9
mov eax, dword [esp + 0x30]
push eax
call fcn.0042f4d9
mov ecx, dword [0x474ef4]
push ecx
lea edx, [esp + 0x50]
push edx
call fcn.00416cc0
add esp, 0x10
push eax
mov ecx, 0x474ef4
call fcn.00401690
mov eax, dword [esp + 0x44]
push eax
call fcn.0042f4d9
mov ecx, dword [0x474ef4]
add esp, 4
push ecx
push str.PATH
call ebp
mov edx, dword [esp + 0x38]
push edx
call edi
mov eax, dword [esp + 0x3c]
push eax
call edi
mov ecx, dword [esp + 0x48]
push ecx
call edi
mov edx, dword [esp + 0x20]
push edx
call fcn.0042f4d9
add esp, 4
lea eax, [ebx + 1]
mov ecx, dword [esp + 0x154]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x13c]
xor ecx, esp
call fcn.00430430
add esp, 0x14c
ret