Function at 0x40d7a4
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x884
mov eax, dword [0x41e024]
xor eax, esp
mov dword [esp + 0x880], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x1c], eax
push edi
mov dword [esp + 0x4c], esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
push 0x10
call dword [sym.imp.COMCTL32.dll_DPA_CreateEx]
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
je 0x40dca0
xor ecx, ecx
inc ecx
call fcn.0040a309
xor ebx, ebx
push ebx
push ebx
push 0xb
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push 9
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push ebx
push 0x110a
push dword [esi + 0x60]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x98]
mov dword [esp + 0x70], 1
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], 0x400
mov dword [esp + 0x34], 0x48
mov dword [esp + 0x40], ebx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x24]
push eax
push ebx
push 0x113e
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x88]
mov ecx, dword [esi + 0x60]
push ebx
push 0x400
push eax
call fcn.0040de58
test byte [esp + 0x2c], 0x20
mov ebx, eax
mov dword [esp + 0x1c], ebx
je 0x40dbb3
test ebx, ebx
je 0x40db98
lea eax, [esp + 0x18]
push eax
push 8
xor eax, eax
push eax
lea eax, [esp + 0x94]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40db98
push dword [esp + 0x28]
xor ebx, ebx
push ebx
push 0x1113
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x88]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40d8e1
sub ecx, edx
lea eax, [esp + 0x88]
sar ecx, 1
mov edi, 0x3ff
sub edi, ecx
push edi
push eax
xor eax, eax
push eax
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x40d957
mov esi, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
push dword [esp + 0x10]
push ebx
push esi
call dword [sym.imp.COMCTL32.dll_DPA_InsertPtr]
push edi
lea eax, [esp + 0x8c]
inc ebx
push eax
push ebx
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x40d915
mov esi, dword [esp + 0x4c]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x14]
xor eax, eax
push eax
push 0x40dcc0
push edi
call dword [sym.imp.COMCTL32.dll_DPA_Sort]
test ebx, ebx
jne 0x40d99f
push edi
call dword [sym.imp.COMCTL32.dll_DPA_DeleteAllPtrs]
push dword [esp + 0x28]
push 0x8001
push 0x1102
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x44], ebx
jmp 0x40dc00
push dword [esp + 0x28]
mov eax, dword [edi + 4]
dec ebx
push 4
push 0x110a
push dword [esi + 0x60]
mov eax, dword [eax + ebx*4]
mov dword [esp + 0x20], eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, eax
mov dword [esp + 0x64], edi
test edi, edi
je 0x40d9e2
lea eax, [esp + 0x60]
push eax
xor eax, eax
push eax
push 0x113e
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, dword [esp + 0x64]
test ebx, ebx
js 0x40db89
test edi, edi
je 0x40dafc
push dword [esp + 0x10]
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40da3c
push dword [esp + 0x64]
push 1
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x64], eax
test eax, eax
je 0x40da7e
lea eax, [esp + 0x60]
push eax
xor eax, eax
push eax
push 0x113e
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40da7e
jle 0x40daa1
lea eax, [esp + 0x50]
xor edi, edi
push eax
push 9
push edi
push dword [esp + 0x1c]
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40da65
lea ecx, [esp + 0x50]
call fcn.0040e0de
jmp 0x40da67
mov eax, edi
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esi + 0x60]
push eax
push dword [esp + 0x18]
push 0xffff0003
call fcn.0040df5f
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
sub ebx, 1
js 0x40daf3
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4]
mov dword [esp + 0x10], eax
jmp 0x40daea
push dword [esp + 0x64]
push 1
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [esp + 0x64]
mov edi, eax
xor eax, eax
push eax
push 0x1101
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x64], edi
test edi, edi
je 0x40dafc
lea eax, [esp + 0x60]
push eax
xor eax, eax
push eax
push 0x113e
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, dword [esp + 0x64]
jmp 0x40d9ea
mov edi, dword [esp + 0x64]
jmp 0x40db89
xor edi, edi
lea eax, [esp + 0x54]
push eax
push 9
push edi
push dword [esp + 0x1c]
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40db23
lea ecx, [esp + 0x54]
call fcn.0040e0de
jmp 0x40db25
mov eax, edi
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esi + 0x60]
push eax
push dword [esp + 0x18]
push 0xffff0003
call fcn.0040df5f
push edi
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
sub ebx, 1
js 0x40db8d
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4]
mov dword [esp + 0x10], eax
jmp 0x40dafe
push edi
push 1
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [esp + 0x64]
mov edi, eax
xor eax, eax
push eax
push 0x1101
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x64], edi
test edi, edi
jne 0x40db5d
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.COMCTL32.dll_DPA_DeleteAllPtrs]
push dword [esp + 0x28]
push 4
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
xor ebx, ebx
jmp 0x40d856
test ebx, ebx
je 0x40dc16
push dword [esp + 0x28]
push 0x8001
push 0x1102
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x58]
push eax
push 9
xor eax, eax
push eax
lea eax, [esp + 0x94]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40dbf8
lea ecx, [esp + 0x58]
call fcn.0040e0de
xor ebx, ebx
jmp 0x40dbfc
xor ebx, ebx
mov eax, ebx
mov dword [esp + 0x44], eax
lea eax, [esp + 0x24]
push eax
push ebx
push 0x113f
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40dc18
xor ebx, ebx
push dword [esp + 0x28]
jmp 0x40dc3b
push dword [esp + 0x28]
push 3
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x28], eax
test eax, eax
je 0x40dc54
push eax
push 1
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x40dc1e
jmp 0x40d856
push edi
call dword [sym.imp.COMCTL32.dll_DPA_Destroy]
push ebx
push 1
push 0xb
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push 9
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, dword [esp + 0x20]
cmp eax, dword [esp + 0x5c]
jne 0x40dc90
push edi
mov ecx, esi
call fcn.00414cd4
test eax, eax
je 0x40dc99
push ecx
push edi
mov ecx, esi
call fcn.0040c973
xor ecx, ecx
call fcn.0040a309
mov ecx, dword [esp + 0x88c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041cc10
mov esp, ebp
pop ebp
ret 4