Function at 0x476440
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x62e040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0x62ff28
push 0xfffffffffffffff7
push 0x20019
lea eax, [ebp - 8]
mov byte [0x635267], 0
push eax
call sym.SystemInformer.exe_PhOpenKey
test eax, eax
js 0x4766e6
push 0x50
push 4
push dword [0x635044]
xor ebx, ebx
mov dword [ebp - 0x18], 0x14
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0x100
push 4
push dword [0x635044]
mov esi, eax
mov dword [ebp - 0x28], ebx
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0x100
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push edi
push 1
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.ntdll.dll_NtEnumerateValueKey]
cmp eax, 0x8000001a
je 0x4765d1
mov edi, edi
cmp eax, 0x80000005
je 0x4764ee
cmp eax, 0xc0000023
jne 0x476526
push edi
push 0
push dword [0x635044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 0x10]
push 4
push dword [0x635044]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push edi
push 1
push dword [ebp - 0x28]
push dword [ebp - 0x14]
call dword [sym.imp.ntdll.dll_NtEnumerateValueKey]
test eax, eax
js 0x4765cb
cmp dword [edi + 4], 1
jne 0x4765a1
mov ecx, dword [edi + 0xc]
cmp ecx, 2
jbe 0x476556
mov eax, dword [edi + 8]
add eax, edi
mov dword [ebp - 0x24], ecx
push 0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push 0
push eax
call sym.SystemInformer.exe_PhCreateString3
jmp 0x47655b
call sym.SystemInformer.exe_PhReferenceEmptyString
mov esi, eax
mov eax, dword [ebp - 0x18]
cmp ebx, eax
jne 0x47659a
add eax, eax
mov dword [ebp - 0x18], eax
lea ecx, [eax*4]
mov eax, dword [ebp - 0xc]
push ecx
test eax, eax
jne 0x476588
push 4
push dword [0x635044]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
jmp 0x476597
push eax
push 4
push dword [0x635044]
call dword [sym.imp.ntdll.dll_RtlReAllocateHeap]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [eax + ebx*4], esi
inc ebx
lfence
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x10]
inc eax
push edi
push 1
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call dword [sym.imp.ntdll.dll_NtEnumerateValueKey]
nop
cmp eax, 0x8000001a
jne 0x4764e0
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x20], ebx
push edi
push 0
push dword [0x635044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
xor edi, edi
test ebx, ebx
je 0x4766c8
lea eax, ds:[ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [esi + edi*4]
call sym.SystemInformer.exe_PhParseCommandLineFuzzy
test al, al
je 0x4766a5
call sym.SystemInformer.exe_PhGetApplicationFileNameWin32
mov esi, dword [ebp - 0x14]
mov ebx, eax
test ebx, ebx
je 0x476688
push ebx
call sym.SystemInformer.exe_PhGetBaseName
mov ecx, eax
or edx, 0xffffffff
mov dword [ebp - 0x18], ecx
lock xadd dword [ebx - 4], edx
dec edx
jne 0x476640
lea ecx, [ebx - 8]
call fcn.004fc020
mov ecx, dword [ebp - 0x18]
test esi, esi
je 0x476670
mov edx, dword [ecx]
mov ebx, dword [esi]
cmp edx, ebx
ja 0x476670
mov eax, dword [esi + 4]
sub eax, edx
mov dword [ebp - 0x34], edx
add eax, ebx
push 1
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
push ecx
push eax
call sym.SystemInformer.exe_PhEqualStringRef
test al, al
je 0x476670
mov byte [0x635267], 1
mov ecx, dword ds:[ebp - 0x18]
or eax, 0xffffffff
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], eax
dec eax
jne 0x476688
call fcn.004fc020
test esi, esi
je 0x47669f
lea ecx, [esi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x47669f
call fcn.004fc020
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0xc]
mov ecx, dword [esi + edi*4]
or eax, 0xffffffff
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4766bb
call fcn.004fc020
inc edi
cmp edi, ebx
jb 0x4765f0
push esi
push 0
push dword [0x635044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword ds:[ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005802ef
mov esp, ebp
pop ebp
ret