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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa94
mov eax, dword [0x101647c]
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 4], eax
lea eax, [ebp - 0xa44]
push eax
push 0x20019
xor ebx, ebx
push ebx
push 0x1001844
push 0x80000000
mov dword [ebp - 0xa44], ebx
call edi
cmp eax, ebx
jne 0x10056c7
mov dword [ebp - 0xa54], ebx
push esi
push 0x105
lea eax, [ebp - 0x41c]
push eax
push dword [ebp - 0xa54]
push dword [ebp - 0xa44]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, ebx
jne 0x10056ac
cmp word [ebp - 0x41c], 0x2e
jne 0x10056aa
mov esi, dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
lea eax, [ebp - 0xa94]
push eax
lea eax, [ebp - 0x41a]
push eax
push 0x100182c
push dword [0x101602c]
mov dword [ebp - 0xa5c], ebx
mov dword [ebp - 0xa4c], ebx
call esi
test eax, eax
jne 0x1005672
lea eax, [ebp - 0xa94]
push eax
lea eax, [ebp - 0x41a]
push eax
push 0x1001814
push dword [0x101602c]
call esi
test eax, eax
jne 0x10056aa
lea eax, [ebp - 0xa5c]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x41c]
push eax
push dword [ebp - 0xa44]
call edi
test eax, eax
jne 0x10056aa
lea eax, [ebp - 0xa74]
push eax
lea eax, [ebp - 0xa40]
push eax
lea eax, [ebp - 0xa48]
push eax
push ebx
push ebx
push dword [ebp - 0xa5c]
mov dword [ebp - 0xa74], 0x20a
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100565e
cmp dword [ebp - 0xa48], 1
jne 0x100565e
lea eax, [ebp - 0xa68]
push eax
mov esi, 0x20019
push esi
push ebx
lea eax, [ebp - 0xa40]
push eax
push dword [ebp - 0xa44]
mov dword [ebp - 0xa68], ebx
call edi
test eax, eax
jne 0x100565e
lea eax, [ebp - 0xa50]
push eax
push esi
push ebx
push 0x1001808
push dword [ebp - 0xa68]
mov dword [ebp - 0xa50], ebx
call edi
cmp eax, ebx
jne 0x1005652
mov dword [ebp - 0xa60], ebx
push 0x105
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0xa60]
push dword [ebp - 0xa50]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, ebx
jne 0x1005638
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
lea eax, [ebp - 0x834]
push 0x10017fc
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x1005411
lea eax, [ebp - 0x834]
push 0x10017f0
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005636
lea eax, [ebp - 0xa58]
push eax
mov esi, 0x20019
push esi
push ebx
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0xa50]
mov dword [ebp - 0xa58], ebx
call edi
test eax, eax
jne 0x1005636
lea eax, [ebp - 0xa64]
push eax
push esi
push ebx
push 0x10017e0
push dword [ebp - 0xa58]
mov dword [ebp - 0xa64], ebx
call edi
test eax, eax
jne 0x100562a
lea eax, [ebp - 0xa70]
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0xa48]
push eax
push ebx
push ebx
push dword [ebp - 0xa64]
mov dword [ebp - 0xa70], 0x20a
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1005618
inc eax
cmp dword [ebp - 0xa48], eax
je 0x10054ab
cmp dword [ebp - 0xa48], 2
jne 0x1005618
cmp word [ebp - 0x210], 0x22
mov dword [ebp - 0xa6c], ebx
jne 0x10054c7
lea esi, [ebp - 0x20e]
push 0x22
mov eax, esi
jmp 0x10054e7
mov dword [ebp - 0xa6c], eax
lea esi, [ebp - 0x210]
mov eax, esi
push 0x20
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
cmp eax, ebx
pop ecx
pop ecx
jne 0x10054f4
push ebx
mov eax, esi
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
cmp eax, ebx
pop ecx
pop ecx
je 0x1005558
sub eax, esi
sar eax, 1
shl eax, 1
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x628]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebp + eax - 0x628], bx
lea eax, [ebp - 0x628]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
cmp eax, ebx
pop ecx
pop ecx
je 0x1005558
inc eax
inc eax
je 0x1005558
lea ecx, [ebp - 0xa84]
push ecx
push eax
push 0x10017c4
push dword [0x101602c]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
jne 0x1005558
mov dword [ebp - 0xa4c], 1
cmp dword [ebp - 0xa4c], ebx
je 0x1005618
cmp dword [ebp - 0xa6c], ebx
je 0x1005618
lea eax, [ebp - 0x210]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x1005618
inc esi
inc esi
je 0x1005618
mov edi, dword [sym.imp.msvcrt.dll_wcschr]
push 0x20
push esi
call edi
cmp eax, ebx
pop ecx
pop ecx
jne 0x10055ae
push ebx
push esi
call edi
cmp eax, ebx
pop ecx
pop ecx
je 0x1005618
sub eax, esi
sar eax, 1
shl eax, 1
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x628]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebp + eax - 0x628], bx
lea eax, [ebp - 0x628]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
cmp eax, ebx
pop ecx
pop ecx
je 0x10055eb
inc eax
inc eax
jmp 0x10055f1
lea eax, [ebp - 0x628]
cmp eax, ebx
je 0x1005618
lea ecx, [ebp - 0xa84]
push ecx
push eax
push 0x10017c4
push dword [0x101602c]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
je 0x1005618
mov dword [ebp - 0xa4c], ebx
push dword [ebp - 0xa64]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push dword [ebp - 0xa58]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc dword [ebp - 0xa60]
cmp eax, ebx
je 0x10053b9
push dword [ebp - 0xa50]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0xa68]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0xa5c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0xa4c], ebx
je 0x10056aa
push 3
lea eax, [ebp - 0x41a]
push eax
call sub.MIGISM.dll_IsmIsComponentSelected
test eax, eax
jne 0x10056aa
push 1
push 3
lea eax, [ebp - 0x41a]
push eax
call sub.MIGISM.dll_IsmSelectComponent
test eax, eax
jne 0x10056aa
push ebx
push 3
lea eax, [ebp - 0x41a]
push eax
push 2
push ebx
call sub.MIGISM.dll_IsmAddComponentAlias
xor eax, eax
inc dword [ebp - 0xa54]
cmp eax, ebx
je 0x1005272
push dword [ebp - 0xa44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
inc eax
pop ebx
call fcn.01011c2a
leave
ret