Function at 0x40a470
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 0x4c5676
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x4ea6c4]
xor eax, esp
mov dword [esp + 0x290], eax
push ebx
push esi
push edi
mov eax, dword [0x4ea6c4]
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 + 0x34], esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], ecx
mov word [esp + 0xa0], bx
call fcn.004ae6c0
add esp, 0xc
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x94]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x3c]
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 0x40a53b
mov dword [esi + 4], edi
cmp edi, 5
jne 0x40a547
mov al, 1
jmp 0x40a7c5
cmp edi, ebx
je 0x40a555
mov dword [esi + 4], edi
xor al, al
jmp 0x40a7c5
mov eax, dword [esp + 0x24]
add dword [esp + 0x1c], 1
add eax, 1
xor ecx, ecx
mov dword [esp + 0x24], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ab8e2
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
xor ecx, ecx
add esp, 4
mov dword [esp + 0x3c], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ab8e2
add esp, 4
cmp dword [esp + 0x14], ebx
mov esi, eax
mov dword [esp + 0x18], esi
je 0x40a685
mov esi, dword [esp + 0x2c]
call fcn.00404c00
mov eax, dword [esp + 0x14]
push eax
mov ecx, esi
call fcn.0040a7f0
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
jbe 0x40a681
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x38]
lea edx, [esp + 0x4c]
push edx
mov edx, dword [esp + 0x2c]
push ebx
push ebx
push ebx
lea eax, [esp + 0x54]
push eax
mov eax, dword [edx]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x24]
push esi
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, eax
cmp edi, ebx
jne 0x40a66c
mov eax, esi
mov dword [esp + 0x6c], 7
mov dword [esp + 0x68], ebx
mov word [esp + 0x58], bx
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a620
sub eax, edx
sar eax, 1
push eax
push esi
lea esi, [esp + 0x5c]
call fcn.00401700
mov ecx, esi
mov dword [esp + 0x2b0], ebx
mov esi, dword [esp + 0x2c]
push ecx
call fcn.004087e0
mov dword [esp + 0x2b0], 0xffffffff
cmp dword [esp + 0x6c], 8
jb 0x40a66c
mov edx, dword [esp + 0x58]
push edx
call fcn.004abbe4
add esp, 4
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
jb 0x40a5d6
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x20], ebx
je 0x40a79d
mov edi, dword [esp + 0x34]
mov eax, dword [edi + 8]
cmp dword [edi + 4], eax
mov dword [esp + 0x10], eax
jbe 0x40a6a4
call fcn.004ac22f
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
mov dword [esp + 0x2c], eax
jbe 0x40a6b9
call fcn.004ac22f
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
push ecx
push edi
push eax
push edi
lea edx, [esp + 0x3c]
push edx
push edi
call fcn.00404c40
mov eax, dword [esp + 0x20]
push eax
mov ecx, edi
call fcn.0040a7f0
xor edi, edi
cmp dword [esp + 0x20], ebx
mov dword [esp + 0x10], ebx
jbe 0x40a79d
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x3c]
push esi
mov word [esi], bx
mov edx, dword [ecx]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
cmp edi, ebx
jne 0x40a788
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 0x40a731
sub eax, edx
sar eax, 1
push eax
push esi
lea esi, [esp + 0x7c]
call fcn.00401700
mov eax, esi
mov esi, dword [esp + 0x34]
push eax
mov dword [esp + 0x2b4], 1
call fcn.004087e0
mov dword [esp + 0x2b0], 0xffffffff
cmp dword [esp + 0x8c], 8
jb 0x40a784
mov ecx, dword [esp + 0x78]
push ecx
call fcn.004abbe4
add esp, 4
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
jb 0x40a6e8
mov edx, dword [esp + 0x38]
push edx
call fcn.004ab965
add esp, 4
push esi
call fcn.004ab965
add esp, 4
cmp edi, ebx
je 0x40a7be
mov eax, dword [esp + 0x28]
mov dword [eax + 4], edi
xor eax, eax
cmp edi, ebx
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.004abc64
mov esp, ebp
pop ebp
ret 4