Function at 0x406090
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push ebx
push esi
push edi
mov dword [ebp - 0x210], 0
cmp dword [0x46221c], 0xa
jne 0x4060b8
jmp 0x406493
lea eax, [ebp - 0x208]
push eax
push 0x20119
push 0
push str.SOFTWAREMicrosoftPowerShell1PowerShellEngine
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x204], eax
cmp dword [ebp - 0x204], 0
jne 0x40641f
mov dword [ebp - 0x20c], 0x200
lea edi, [ebp - 0x200]
xor eax, eax
mov ecx, 0x80
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x200]
push eax
push 0
push 0
push str.ApplicationBase
mov eax, dword [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x204], eax
cmp dword [ebp - 0x204], 0
jne 0x40640d
cmp dword [0x46221c], 1
jne 0x406155
mov dword [ebp - 0x210], 0
jmp 0x406344
lea edi, [ebp - 0x200]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 8
jge 0x40618b
mov dword [ebp - 0x214], 0
jmp 0x406192
sub dword [ebp - 0x214], 8
cmp dword [ebp - 0x214], 0
je 0x406344
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x200]
cmp eax, 0x53
je 0x4061cd
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x200]
cmp eax, 0x73
jne 0x4062eb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1ff]
cmp eax, 0x59
je 0x4061fb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1ff]
cmp eax, 0x79
jne 0x4062eb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fe]
cmp eax, 0x53
je 0x406229
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fe]
cmp eax, 0x73
jne 0x4062eb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fd]
cmp eax, 0x54
je 0x406257
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fd]
cmp eax, 0x74
jne 0x4062eb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fc]
cmp eax, 0x45
je 0x406285
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fc]
cmp eax, 0x65
jne 0x4062eb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fb]
cmp eax, 0x4d
je 0x4062b3
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fb]
cmp eax, 0x6d
jne 0x4062eb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1fa]
cmp eax, 0x33
jne 0x4062eb
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x1f9]
cmp eax, 0x32
jne 0x4062eb
mov dword [ebp - 0x214], 0
cmp dword [ebp - 0x214], 0
je 0x40633f
inc dword [ebp - 0x210]
mov eax, dword [ebp - 0x210]
cmp dword [ebp - 0x214], eax
jge 0x40631f
mov dword [ebp - 0x214], 0
jmp 0x40633f
mov eax, dword [ebp - 0x210]
movsx eax, byte [ebp + eax - 0x200]
test eax, eax
jne 0x40633f
mov dword [ebp - 0x214], 0
jmp 0x406192
cmp dword [ebp - 0x210], 0
je 0x4063e5
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, 0x20
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x210]
lea esi, [ebp - 0x200]
mov edi, dword [ebp + 8]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, str.sysnative
mov edi, dword [ebp + 8]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov eax, dword [edx]
mov dword [edi], eax
mov eax, dword [edx + 4]
mov dword [edi + 4], eax
mov ax, word [edx + 8]
mov word [edi + 8], ax
add dword [ebp - 0x210], 8
mov eax, dword [ebp - 0x210]
lea edi, [ebp + eax - 0x200]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, edi
mov ebx, ecx
mov edi, dword [ebp + 8]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov esi, edx
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40640d
lea edi, [ebp - 0x200]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov edx, edi
mov edi, dword [ebp + 8]
mov esi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40641f
mov edi, dword [ebp + 8]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
je 0x406475
dec dword [ebp - 0x210]
mov eax, dword [ebp - 0x210]
mov ecx, dword [ebp + 8]
movsx eax, byte [eax + ecx]
cmp eax, 0x5c
je 0x406475
mov edi, dword [ebp + 8]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
mov ax, word [0x460e88]
mov word [edi - 1], ax
cmp dword [0x45e03c], 0
je 0x406493
mov eax, dword [ebp + 8]
push eax
push str._r_nPSRun:_r_n___s_r_n
call fcn.00452380
add esp, 8
pop edi
pop esi
pop ebx
leave
ret