Function at 0x407da0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.SOFTWAREMicrosoftPowerShell
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x407e00
mov ecx, dword [str.powershell.exe]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov edx, dword [0x40c380]
mov dword [eax + 4], edx
mov ecx, dword [0x40c384]
mov dword [eax + 8], ecx
mov dx, word [0x40c388]
mov word [eax + 0xc], dx
mov cl, byte [0x40c38a]
mov byte [eax + 0xe], cl
pop esi
mov esp, ebp
pop ebp
ret
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
lea edx, [ebp - 0x14]
push edx
mov edx, dword [ebp - 4]
push 0
push 0
push 0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x424]
push ecx
push 0
mov ebx, 0x104
push edx
mov dword [ebp - 8], ebx
call edi
test eax, eax
jne 0x407e87
jmp 0x407e40
xor eax, eax
jmp 0x407e50
mov cl, byte [ebp + eax - 0x424]
mov byte [ebp + eax - 0x21c], cl
inc eax
test cl, cl
jne 0x407e50
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
push 0
push 0
push 0
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x424]
push edx
inc esi
push esi
push eax
mov dword [ebp - 8], ebx
call edi
test eax, eax
je 0x407e40
mov ecx, dword [ebp - 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call ebx
mov ecx, 7
mov esi, str.SOFTWAREMicrosoftPowerShell_
lea edi, [ebp - 0x118]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
cmp byte [ebp - 0x118], 0
lea ecx, [ebp - 0x21c]
lea eax, [ebp - 0x118]
je 0x407ec6
lea ecx, [ecx]
inc eax
cmp byte [eax], 0
jne 0x407ec0
mov edx, eax
lea eax, [ebp - 0x21c]
sub edx, eax
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x407ed0
cmp byte [ebp - 0x118], 0
mov ecx, str.ShellIdsMicrosoft.PowerShell
lea eax, [ebp - 0x118]
je 0x407ef6
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x407ef0
mov edx, eax
sub edx, str.ShellIdsMicrosoft.PowerShell
mov edi, edi
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x407f00
lea ecx, [ebp - 4]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x118]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407f5c
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x424]
push eax
push 0
push 0
push str.Path
push ecx
mov dword [ebp - 0xc], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 4]
push edx
mov esi, eax
call ebx
test esi, esi
je 0x407f94
mov ecx, dword [str.powershell.exe]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov edx, dword [0x40c380]
mov dword [eax + 4], edx
mov ecx, dword [0x40c384]
mov dword [eax + 8], ecx
mov dx, word [0x40c388]
pop edi
mov word [eax + 0xc], dx
mov cl, byte [0x40c38a]
pop ebx
mov byte [eax + 0xe], cl
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x424]
push eax
mov edx, 0x22
push esi
mov word [esi], dx
call fcn.00407330
push 0x40c330
push esi
call fcn.00407330
add esp, 0x10
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret