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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ca9b
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x41107c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, ecx
push 0
mov dword [ebp - 0x2b0], ebx
mov dword [ebp - 0x29c], eax
call edi
push 0
call edi
push 0
call edi
push 0
call edi
push 0
call edi
push 0
call edi
push 0
call edi
xor ecx, ecx
lea esi, [ecx + 4]
lea eax, [ebp - 0x284]
mov dword [ebp - 0x270], 7
mov dword [ebp - 0x274], 0
mov word [ebp - 0x284], cx
call fcn.00401f40
mov dword [ebp - 4], 0
cmp dword [ebp - 0x274], 0
jbe 0x401d26
push 0
call edi
push 0
call edi
push 0
call edi
push 0
call edi
push 0
call edi
push 0
call edi
push 0
call edi
mov eax, dword [ebp - 0x29c]
lea edx, [ebp - 0x28c]
push edx
push 0xf003f
push 0
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x401a35
cmp dword [ebp - 0x270], 8
jb 0x401d3e
mov ecx, dword [ebp - 0x284]
push ecx
jmp 0x401d36
push 0
push 0
lea edx, [ebp - 0x2c8]
push edx
lea eax, [ebp - 0x2cc]
push eax
lea ecx, [ebp - 0x2d4]
push ecx
mov ecx, dword [ebp - 0x28c]
push 0
lea edx, [ebp - 0x298]
push edx
lea eax, [ebp - 0x2a8]
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x401ac6
mov eax, dword [ebp - 0x298]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040237c
add esp, 4
cmp dword [ebp - 0x2a8], 0
mov edi, eax
mov dword [ebp - 0x2a0], edi
mov dword [ebp - 0x288], 0
ja 0x401ae6
push edi
call fcn.004025b9
mov ecx, dword [ebp - 0x28c]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x270], 8
jb 0x401d3e
mov edx, dword [ebp - 0x284]
push edx
jmp 0x401d36
mov ebx, dword [ebp - 0x2b0]
mov eax, dword [ebp - 0x298]
lea ecx, [eax + eax + 2]
push ecx
push 0
push edi
call fcn.00407550
mov edx, dword [ebp - 0x298]
mov ecx, dword [ebp - 0x288]
add esp, 0xc
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x2bc]
push eax
inc edx
push edi
mov dword [ebp - 0x2bc], edx
mov edx, dword [ebp - 0x28c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x401ab0
push 0x256
push eax
lea ecx, [ebp - 0x266]
push ecx
mov word [ebp - 0x268], ax
call fcn.00407550
mov edx, dword [ebp - 0x29c]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
add esp, 0xc
push edx
lea eax, [ebp - 0x268]
push eax
call esi
push 0x40f410
lea ecx, [ebp - 0x268]
push ecx
call esi
push edi
lea edx, [ebp - 0x268]
push edx
call esi
lea eax, [ebp - 0x290]
push eax
push 0xf003f
push 0
lea ecx, [ebp - 0x268]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401ab0
push eax
push eax
lea edx, [ebp - 0x294]
push edx
lea eax, [ebp - 0x2a4]
push eax
lea ecx, [ebp - 0x2ac]
push ecx
mov ecx, dword [ebp - 0x290]
push 0
lea edx, [ebp - 0x2c0]
push edx
lea eax, [ebp - 0x2d0]
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x401ab0
mov eax, dword [ebp - 0x2a4]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040237c
mov esi, eax
mov eax, dword [ebp - 0x294]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040237c
xor ebx, ebx
add esp, 8
mov edi, eax
cmp dword [ebp - 0x2ac], ebx
jbe 0x401cc7
mov eax, dword [ebp - 0x294]
mov dword [ebp - 0x2b8], eax
mov eax, dword [ebp - 0x2a4]
lea edx, [eax + eax + 2]
push edx
lea ecx, [eax + 1]
push 0
push esi
mov dword [ebp - 0x2b4], ecx
call fcn.00407550
mov eax, dword [ebp - 0x294]
push eax
push 0
push edi
call fcn.00407550
add esp, 0x18
lea ecx, [ebp - 0x2b8]
push ecx
mov ecx, dword [ebp - 0x290]
push edi
lea edx, [ebp - 0x2c4]
push edx
push 0
lea eax, [ebp - 0x2b4]
push eax
push esi
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x401cc7
push 0x40f414
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x401cba
push 0x40f244
push edi
call fcn.00402bdb
add esp, 8
test eax, eax
jne 0x401d07
inc ebx
cmp ebx, dword [ebp - 0x2ac]
jb 0x401c33
push esi
call fcn.004025b9
push edi
call fcn.004025b9
mov edx, dword [ebp - 0x290]
add esp, 8
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x288]
mov edi, dword [ebp - 0x2a0]
inc eax
mov dword [ebp - 0x288], eax
cmp eax, dword [ebp - 0x2a8]
jb 0x401ae0
jmp 0x401ab0
cmp dword [ebp - 0x270], 8
jb 0x401d1f
mov eax, dword [ebp - 0x284]
push eax
call fcn.004025ae
add esp, 4
mov eax, 1
jmp 0x401d40
cmp dword [ebp - 0x270], 8
jb 0x401d3e
mov eax, dword [ebp - 0x284]
push eax
call fcn.004025ae
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00402464
mov esp, ebp
pop ebp
ret