Function at 0x401970
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x529d06
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x56fcac]
xor eax, esp
mov dword [esp + 0x290], eax
push ebx
push esi
push edi
mov eax, dword [0x56fcac]
xor eax, esp
push eax
lea eax, [esp + 0x2a8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, edx
xor ebx, ebx
push 0x206
lea edx, [esp + 0x9a]
push ebx
push edx
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], ecx
mov word [esp + 0xa0], bx
call fcn.004ec1b0
add esp, 0xc
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x94]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esi]
push ebx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0xbc]
push eax
push ecx
mov dword [esp + 0x70], 0x104
mov dword [esp + 0x44], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov edi, eax
cmp edi, ebx
je 0x401a3b
mov dword [esi + 4], edi
cmp edi, 5
jne 0x401a47
mov al, 1
jmp 0x401cdb
cmp edi, ebx
je 0x401a55
mov dword [esi + 4], edi
xor al, al
jmp 0x401cdb
mov eax, dword [esp + 0x28]
add dword [esp + 0x20], 1
add eax, 1
xor ecx, ecx
mov dword [esp + 0x28], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004aaa5e
mov esi, dword [esp + 0x24]
mov ebx, eax
xor ecx, ecx
add esp, 4
mov eax, esi
mov edx, 2
mul edx
seto cl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x38], esi
neg ecx
or ecx, eax
push ecx
call fcn.004aaa5e
add esp, 4
cmp dword [esp + 0x14], 0
mov esi, eax
mov dword [esp + 0x24], esi
je 0x401b9f
mov eax, dword [esp + 0x30]
call fcn.00402170
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x30]
push eax
call fcn.00401f70
cmp dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
jbe 0x401b9f
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x4c]
push edx
mov edx, dword [esp + 0x30]
push 0
push 0
push 0
lea eax, [esp + 0x54]
push eax
mov eax, dword [edx]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x24]
push ebx
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, eax
xor edx, edx
cmp edi, edx
jne 0x401b8a
mov eax, ebx
mov dword [esp + 0x6c], 7
mov dword [esp + 0x68], edx
mov word [esp + 0x58], dx
lea esi, [eax + 2]
jmp 0x401b30
mov cx, word [eax]
add eax, 2
cmp cx, dx
jne 0x401b30
sub eax, esi
sar eax, 1
push eax
push ebx
lea ecx, [esp + 0x5c]
call fcn.00402af0
lea ecx, [esp + 0x54]
mov dword [esp + 0x2b0], 0
mov esi, dword [esp + 0x30]
push ecx
call fcn.004020c0
mov dword [esp + 0x2b0], 0xffffffff
cmp dword [esp + 0x6c], 8
jb 0x401b82
mov edx, dword [esp + 0x58]
push edx
call fcn.004aaa59
add esp, 4
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
jb 0x401ae2
cmp dword [esp + 0x18], 0
je 0x401cb7
mov ebx, dword [esp + 0x3c]
mov eax, dword [ebx + 8]
cmp dword [ebx + 4], eax
mov dword [esp + 0x30], eax
jbe 0x401bbf
call fcn.004ec14b
mov edi, dword [ebx + 4]
cmp edi, dword [ebx + 8]
jbe 0x401bcc
call fcn.004ec14b
mov eax, dword [esp + 0x30]
push eax
push ebx
push edi
push ebx
lea ecx, [esp + 0x40]
push ecx
call fcn.00402700
mov edx, dword [esp + 0x18]
push edx
mov ecx, ebx
call fcn.00401f70
xor edi, edi
cmp dword [esp + 0x18], edi
mov dword [esp + 0x10], edi
jbe 0x401cb3
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x48]
push ecx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x40]
push esi
mov word [esi], bx
mov ecx, dword [eax]
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
cmp edi, ebx
jne 0x401c9e
mov eax, esi
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401c45
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0x7c]
call fcn.00402af0
mov esi, dword [esp + 0x3c]
lea edx, [esp + 0x74]
push edx
mov dword [esp + 0x2b4], 1
call fcn.004020c0
mov dword [esp + 0x2b0], 0xffffffff
cmp dword [esp + 0x8c], 8
jb 0x401c9a
mov eax, dword [esp + 0x78]
push eax
call fcn.004aaa59
add esp, 4
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jb 0x401bfa
mov ebx, dword [esp + 0x1c]
push ebx
call fcn.004aaa63
add esp, 4
push esi
call fcn.004aaa63
add esp, 4
test edi, edi
je 0x401cd4
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 4], edi
xor eax, eax
test edi, edi
sete al
mov ecx, dword [esp + 0x2a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.004ead41
mov esp, ebp
pop ebp
ret 4