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

Disassembly:
sub esp, 0x264
mov eax, dword [0x45ce14]
xor eax, esp
mov dword [esp + 0x260], eax
mov eax, dword [esp + 0x270]
push ebx
mov ebx, dword [esp + 0x26c]
push ebp
mov ebp, dword [esp + 0x274]
push esi
mov esi, ecx
mov dword [esp + 0x1c], ebp
push edi
lea ecx, [esp + 0x3c]
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
call fcn.0040b450
mov edi, dword [esi + 0xc]
mov eax, dword [esp + 0x18]
or edi, 0x20019
mov ebp, dword [ebp + 0x10]
mov esi, dword [esi]
test eax, eax
je 0x409861
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 0x80000004
je 0x4098de
cmp esi, 0x80000050
je 0x4098de
lea eax, [esp + 0x18]
push eax
push edi
push 0
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4098e2
push 0
push ebp
push eax
lea ecx, [esp + 0x48]
call fcn.00404f10
test al, al
jne 0x4098e2
or dword [ebx + 0x14], 0x200
lea ecx, [esp + 0x44]
call fcn.0040bbb0
mov esi, eax
push esi
call fcn.0040a830
add esp, 4
mov edi, eax
mov ecx, ebx
push edi
call fcn.00409390
test al, al
je 0x409ba1
push edi
push esi
push dword [ebx + 0x28]
call fcn.0041f9c0
mov dword [ebx + 0x20], 1
add esp, 0xc
mov bl, 1
jmp 0x409ba3
mov dword [esp + 0x18], esi
mov ecx, dword [esp + 0x20]
mov esi, dword [ebx]
call fcn.004074e0
push eax
mov eax, dword [esi + 0x14]
mov ecx, ebx
call eax
test al, al
je 0x409ba1
or dword [ebx + 0x14], 1
xor edi, edi
cmp dword [ebx + 0x24], edi
jne 0x409947
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x18]
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x40992e
cmp eax, 0xea
jne 0x409947
lea eax, [esp + 0x34]
mov dword [esp + 0x10], edi
push eax
lea ecx, [esp + 0x14]
call fcn.00403910
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x24], eax
push 0
push 0x108
push 2
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x5c]
call fcn.00403130
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov ebp, dword [esp + 0x2c]
mov word [eax], cx
mov ecx, dword [ebp]
mov eax, ecx
shr eax, 2
not al
test al, 1
je 0x409a59
nop dword [eax]
mov eax, dword [esp + 0x58]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 0
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x70]
push edi
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x4099b6
cmp eax, 0xea
jne 0x409a56
push 1
push dword [esp + 0x60]
mov ecx, ebx
inc edi
call fcn.004060a0
mov esi, eax
test esi, esi
je 0x409b94
lea eax, [esp + 0x34]
push eax
lea ecx, [esi + 0x24]
call fcn.00403910
mov ecx, dword [ebp]
shr ecx, 3
not cl
test cl, 1
je 0x409980
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x24]
push 0x45ef20
push 0x20019
mov dword [esp + 0x2c], 0
push dword [eax + 0x10]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x34], 0
push dword [eax]
call fcn.004095a0
test al, al
je 0x409a36
push dword [ebp]
mov ecx, dword [esp + 0x18]
push 0x45ef20
push 0
push esi
push 0
push dword [esp + 0x38]
call fcn.00409be0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x409980
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x24], 0
jmp 0x409980
mov ecx, dword [ebp]
shr ecx, 1
xor esi, esi
not cl
test cl, 1
je 0x409aef
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
nop
mov eax, dword [esp + 0x58]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x30]
push eax
push 0
lea eax, [esp + 0x2c]
mov dword [esp + 0x38], 0
push eax
push 0
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x70]
push esi
push dword [esp + 0x34]
call edi
test eax, eax
je 0x409aa9
cmp eax, 0xea
jne 0x409aef
mov eax, dword [esp + 0x5c]
mov ecx, ebx
cmp word [eax], 0
je 0x409ac7
push 0
push eax
call fcn.004060a0
mov ecx, eax
test ecx, ecx
je 0x409b94
mov eax, dword [esp + 0x24]
inc esi
mov dword [ecx + 0x20], eax
lea eax, [esp + 0x3c]
push dword [ebp]
push eax
push dword [esp + 0x18]
push ecx
push dword [esp + 0x6c]
mov ecx, dword [esp + 0x28]
push dword [esp + 0x2c]
call fcn.00409be0
jmp 0x409a70
mov eax, dword [esp + 0x18]
test eax, eax
je 0x409b06
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x18], 0
mov edi, dword [esp + 0x284]
test edi, edi
je 0x409b87
mov ebx, dword [ebx + 0xc]
test ebx, ebx
je 0x409b87
test byte [ebx + 0x14], 1
je 0x409b80
push dword [ebx + 0x18]
mov esi, dword [esp + 0x24]
mov ecx, esi
call fcn.00406d90
test al, al
je 0x409b94
mov ecx, dword [esp + 0x14]
lea eax, [edi - 1]
push eax
push ebp
push esi
push ebx
call fcn.004097f0
test al, al
je 0x409b94
push 0
mov ecx, esi
call fcn.004079d0
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x409b80
mov edi, dword [esi + 4]
lea eax, [esi + 0x24]
push eax
lea ecx, [ebp + 4]
call fcn.004045b0
test al, al
jne 0x409b6f
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov esi, edi
test edi, edi
jne 0x409b54
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x284]
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x409b18
lea ecx, [esp + 0x4c]
mov bl, 1
call fcn.004031c0
jmp 0x409ba3
lea ecx, [esp + 0x4c]
xor bl, bl
call fcn.004031c0
jmp 0x409ba3
xor bl, bl
lea ecx, [esp + 0x3c]
call fcn.0040b4a0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x409bbb
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x270]
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041e282
add esp, 0x264
ret 0x10