Function at 0x476860
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x62f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0x630f28
push 0xfffffffffffffff7
push 0x20019
lea eax, [ebp - 8]
mov byte [0x636267], 0
push eax
call sym.SystemInformer.exe_PhOpenKey
test eax, eax
js 0x476b06
push 0x50
push 4
push dword [0x636044]
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 [0x636044]
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 0x4769f1
mov edi, edi
cmp eax, 0x80000005
je 0x47690e
cmp eax, 0xc0000023
jne 0x476946
push edi
push 0
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 0x10]
push 4
push dword [0x636044]
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 0x4769eb
cmp dword [edi + 4], 1
jne 0x4769c1
mov ecx, dword [edi + 0xc]
cmp ecx, 2
jbe 0x476976
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 0x47697b
call sym.SystemInformer.exe_PhReferenceEmptyString
mov esi, eax
mov eax, dword [ebp - 0x18]
cmp ebx, eax
jne 0x4769ba
add eax, eax
mov dword [ebp - 0x18], eax
lea ecx, [eax*4]
mov eax, dword [ebp - 0xc]
push ecx
test eax, eax
jne 0x4769a8
push 4
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
jmp 0x4769b7
push eax
push 4
push dword [0x636044]
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 0x476900
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x20], ebx
push edi
push 0
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
xor edi, edi
test ebx, ebx
je 0x476ae8
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 0x476ac5
call sym.SystemInformer.exe_PhGetApplicationFileNameWin32
mov esi, dword [ebp - 0x14]
mov ebx, eax
test ebx, ebx
je 0x476aa8
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 0x476a60
lea ecx, [ebx - 8]
call fcn.004fc420
mov ecx, dword [ebp - 0x18]
test esi, esi
je 0x476a90
mov edx, dword [ecx]
mov ebx, dword [esi]
cmp edx, ebx
ja 0x476a90
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 0x476a90
mov byte [0x636267], 1
mov ecx, dword ds:[ebp - 0x18]
or eax, 0xffffffff
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], eax
dec eax
jne 0x476aa8
call fcn.004fc420
test esi, esi
je 0x476abf
lea ecx, [esi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x476abf
call fcn.004fc420
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 0x476adb
call fcn.004fc420
inc edi
cmp edi, ebx
jb 0x476a10
push esi
push 0
push dword [0x636044]
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.0058078f
mov esp, ebp
pop ebp
ret