Function at 0x1004661
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x28c
push 0x1004900
call fcn.010027c0
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x26c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x268], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x274], eax
xor ebx, ebx
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x240], ebx
xor eax, eax
inc eax
mov dword [ebp - 0x244], eax
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x1006b55
cmp edi, 2
mov dword [ebp - 0x248], ebx
je 0x1006b55
cmp esi, ebx
je 0x1006b60
cmp dword [esi], 0x34
jne 0x1006b60
cmp edi, dword [esi + 0xc]
jae 0x1006b60
push edi
push 0x10048e0
call fcn.010028d6
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x1006a16
cmp edi, 1
jle 0x1004706
cmp edi, 3
jle 0x1006a16
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
or dword [esi + 0x28], 0xffffffff
mov dword [ebp - 0x250], ebx
mov eax, dword [0x1040184]
mov ebx, edi
shl ebx, 3
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp - 0x250]
cmp edx, dword [ebx + ecx]
jae 0x1004af0
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x28c]
rep stosd dword es:[edi], eax
push 1
lea ecx, [ebp - 0x29c]
call fcn.01002827
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x288], eax
mov dword [ebp - 0x28c], 1
mov edi, dword [ebp - 0x250]
shl edi, 2
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
lea eax, [ebp - 0x284]
push eax
call fcn.01004963
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push dword [ebp + 0xc]
push 0x10048f0
call fcn.01004921
mov eax, dword [esi + 0x10]
lea eax, [eax + ebx + 4]
mov ecx, dword [eax]
mov ecx, dword [edi + ecx]
mov dword [esi + 0x20], ecx
or dword [esi + 0x28], 0xffffffff
mov eax, dword [eax]
push dword [eax + edi]
push esi
call fcn.010049a3
cmp dword [ebp - 0x25c], 0
jne 0x1006801
lea eax, [esi + 0x24]
push eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
push dword [ebp - 0x248]
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push esi
call fcn.01004542
mov dword [ebp - 0x23c], eax
mov dword [esi + 0x28], eax
test eax, eax
jne 0x100d11e
and dword [ebp - 0x264], 0
xor eax, eax
mov word [ebp - 0x11c], ax
and dword [ebp - 0x258], eax
push esi
call fcn.010040ed
push dword [ebp - 0x274]
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x26c]
push dword [ebp + 0xc]
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
call fcn.01004348
mov dword [ebp - 0x23c], eax
push esi
call fcn.01004aa2
mov eax, dword [ebp - 0x23c]
mov dword [esi + 0x28], eax
cmp eax, 0x6b5
ja 0x1024464
je 0x102448c
test eax, eax
jne 0x101929d
cmp dword [ebp - 0x258], 0
jne 0x1004803
lea ecx, [ebp - 0x29c]
call fcn.01002045
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x27c], 1
lea eax, [ebp - 0x28c]
push eax
push 3
push 0x1910
push 0
call sub.ntdll.dll_WinSqmAddToStream
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push dword [ebp + 0xc]
push 0x1004a58
call fcn.01004921
cmp dword [ebp - 0x23c], 0
jne 0x10245a6
mov eax, dword [0x1040184]
inc dword [ebp - 0x250]
mov edi, dword [ebp + 0xc]
jmp 0x100471e
cmp eax, 0x1040184
je 0x1004b1b
test byte [eax + 0x1c], 1
je 0x1004b1b
cmp byte [eax + 0x19], 4
jb 0x1004b1b
push dword [ebp - 0x240]
push 0x1003b94
push 0x54
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001f65
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x23c], eax
mov dword [ebp - 4], 0xfffffffe
call fcn.01004b65
push dword [ebp + 0xc]
push 0x1004b50
call fcn.010028d6
mov eax, dword [ebp - 0x23c]
call fcn.01002808
ret 0x18
cmp dword [0x1040208], 0x20
jb 0x10047c3
push 0x80
lea eax, [ebp - 0x11c]
push eax
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push esi
call fcn.01006847
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x268]
call dword [ebp - 0x25c]
jmp 0x10047c3
cmp dword [0x1040208], ebx
jne 0x1004706
mov dword [ebp - 0x238], ebx
push 0x118
push ebx
lea eax, [ebp - 0x234]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [0x1040208], 0x40
mov dword [ebp - 0x238], 0x11c
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x1006a75
cmp byte [ebp - 0x11e], 1
jne 0x1006a75
mov dword [0x1040208], 0x10
lea eax, [ebp - 0x24c]
push eax
push 1
push 0
push 0x1004b68
mov ebx, 0x80000002
push ebx
mov edi, dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
call edi
test eax, eax
jne 0x1006add
mov dword [ebp - 0x260], 4
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x270]
push eax
push 0
push 0x100cdc0
push dword [ebp - 0x24c]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
test eax, eax
je 0x10243dd
push dword [ebp - 0x24c]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
lea eax, [ebp - 0x24c]
push eax
push 1
push 0
push 0x1002970
push ebx
call edi
test eax, eax
jne 0x1006b4b
mov dword [ebp - 0x260], 4
lea eax, [ebp - 0x260]
push eax
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x270]
push eax
push 0
push 0x100cda4
push dword [ebp - 0x24c]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x1006b3f
mov eax, dword [ebp - 0x254]
neg eax
sbb eax, eax
and eax, 0x30
add eax, 0x10
mov dword [0x1040208], eax
push dword [ebp - 0x24c]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
xor ebx, ebx
mov edi, dword [ebp + 0xc]
jmp 0x1004706
mov dword [ebp - 0x248], eax
jmp 0x10046c8
mov eax, 0xa0
jmp 0x1004b46
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push dword [ebp + 0xc]
push 0x100d1a8
call fcn.01004921
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push dword [ebp + 0xc]
push 0x1004a58
call fcn.01004921
lea ecx, [ebp - 0x29c]
call fcn.010034d4
lea ecx, [ebp - 0x29c]
call fcn.01002045
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x27c], 1
lea eax, [ebp - 0x28c]
push eax
push 3
push 0x1910
push 0
call sub.ntdll.dll_WinSqmAddToStream
mov eax, dword [esi + 0x10]
lea ebx, [ebx + eax + 4]
mov eax, dword [ebx]
mov eax, dword [edi + eax]
mov dword [esi + 0x24], eax
cmp dword [ebp - 0x244], 0
jne 0x10048c8
jmp 0x102441d
cmp eax, 0x3e5
jne 0x102445d
lea eax, [ebp - 0x11c]
push eax
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push dword [ebp + 0xc]
push 0x1019330
call fcn.01019345
xor eax, eax
cmp ax, word [ebp - 0x11c]
je 0x10192e4
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x268]
call dword [ebp - 0x25c]
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x101931f
test byte [eax + 0x1c], 1
je 0x101931f
cmp byte [eax + 0x19], 4
jb 0x101931f
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, dword [esi + 0x10]
mov ecx, dword [ebx + ecx + 4]
push dword [edi + ecx]
push 0x1003b94
push 0x4d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01004481
mov dword [ebp - 0x258], 1
jmp 0x1004803
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x102440d
test byte [eax + 0x1c], 1
je 0x102440d
cmp byte [eax + 0x19], 4
jb 0x102440d
push dword [ebp - 0x254]
push 0x1003b94
push 0x4b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001f65
mov eax, dword [ebp - 0x254]
mov dword [0x1040208], eax
jmp 0x1006ad1
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x1004b27
test byte [eax + 0x1c], 1
je 0x1004b27
cmp byte [eax + 0x19], 2
jb 0x1004b27
mov ecx, dword [ebx]
push dword [edi + ecx]
push 0x1003b94
push 0x4c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010020c5
jmp 0x1004b27
cmp eax, 0x6a6
jmp 0x102447e
cmp eax, 0x6ba
je 0x102448c
cmp eax, 0x6bd
jbe 0x1024480
cmp eax, 0x6bf
jbe 0x102448c
cmp eax, 0x6d9
je 0x102448c
and dword [ebp - 0x244], 0
jmp 0x100486b
and dword [ebp - 0x244], 0
cmp dword [ebp - 0x264], 0
je 0x10244e1
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x100486b
test byte [eax + 0x1c], 1
je 0x100486b
cmp byte [eax + 0x19], 2
jb 0x100486b
mov ecx, dword [esi + 0x10]
mov ecx, dword [ebx + ecx + 4]
push dword [edi + ecx]
push 0x1003b94
push 0x4e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010020c5
jmp 0x100486b
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x1024515
test byte [eax + 0x1c], 1
je 0x1024515
cmp byte [eax + 0x19], 2
jb 0x1024515
mov ecx, dword [esi + 0x10]
mov ecx, dword [ebx + ecx + 4]
push dword [edi + ecx]
push 0x1003b94
push 0x4f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010020c5
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
call fcn.010180b7
lea eax, [esi + 0x24]
push eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
push dword [ebp - 0x248]
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push esi
call fcn.01004542
mov dword [ebp - 0x23c], eax
mov dword [esi + 0x28], eax
test eax, eax
jne 0x1024597
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x102458d
test byte [eax + 0x1c], 1
je 0x102458d
cmp byte [eax + 0x19], 4
jb 0x102458d
mov ecx, dword [esi + 0x10]
mov ecx, dword [ebx + ecx + 4]
push dword [edi + ecx]
push 0x1003b94
push 0x50
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010020c5
mov dword [ebp - 0x258], 1
mov dword [ebp - 0x264], 1
jmp 0x100486b
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
push 1
lea eax, [ebp - 0x23c]
push eax
push 4
mov eax, dword [ebp - 0x248]
neg eax
sbb eax, eax
and eax, 3
add eax, 0x80001771
push eax
push 2
call fcn.0100d1bd
add esp, 0x18
mov eax, dword [esi + 0x10]
mov eax, dword [ebx + eax + 4]
push dword [eax + edi]
call fcn.010180b7
cmp dword [ebp - 0x248], 0
je 0x10246ab
cmp dword [ebp - 0x244], 0
jne 0x10246ab
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x102464a
test byte [eax + 0x1c], 1
je 0x102464a
cmp byte [eax + 0x19], 2
jb 0x102464a
push dword [ebp - 0x23c]
mov ecx, dword [ebp + 0xc]
push dword [ecx*4 + 0x1003ba4]
mov ecx, dword [esi + 0x10]
mov ecx, dword [ebx + ecx + 4]
push dword [edi + ecx]
push 0x1003b94
push 0x51
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010390b0
mov eax, dword [0x1040184]
cmp dword [ebp - 0x240], 0
je 0x1024663
cmp dword [ebp - 0x240], 0x6d9
jne 0x1004b27
cmp eax, 0x1040184
je 0x1024694
test byte [eax + 0x1c], 1
je 0x1024694
cmp byte [eax + 0x19], 4
jb 0x1024694
push dword [ebp - 0x23c]
push dword [ebp - 0x240]
push 0x1003b94
push 0x52
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002a94
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x240], eax
mov eax, dword [esi + 0x20]
mov dword [esi + 0x24], eax
jmp 0x1004b27
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x10048cd
test byte [eax + 0x1c], 1
je 0x10048cd
cmp byte [eax + 0x19], 2
jb 0x10048cd
push dword [ebp - 0x23c]
mov ecx, dword [ebp + 0xc]
push dword [ecx*4 + 0x1003ba4]
mov ecx, dword [esi + 0x10]
mov ecx, dword [ebx + ecx + 4]
push dword [edi + ecx]
push 0x1003b94
push 0x53
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010390b0
jmp 0x10048c8