Function at 0x40d714
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 0x40dc14
xor ecx, ecx
inc ecx
call fcn.0040a299
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.0040ddc8
test byte [esp + 0x2c], 0x20
mov ebx, eax
mov dword [esp + 0x1c], ebx
je 0x40db27
test ebx, ebx
je 0x40db0c
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 0x40db0c
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 0x40d851
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 0x40d8c7
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 0x40d885
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 0x40dc30
push edi
call dword [sym.imp.COMCTL32.dll_DPA_Sort]
test ebx, ebx
jne 0x40d90f
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 0x40db74
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 0x40d952
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 0x40dafd
test edi, edi
je 0x40da6c
push dword [esp + 0x10]
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40d9ac
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 0x40d9ee
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 0x40d9ee
jle 0x40da11
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 0x40d9d5
lea ecx, [esp + 0x50]
call fcn.0040e04e
jmp 0x40d9d7
mov eax, edi
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esi + 0x60]
push eax
push dword [esp + 0x18]
push 0xffff0003
call 0x49ce78
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
sub ebx, 1
js 0x40da63
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4]
mov dword [esp + 0x10], eax
jmp 0x40da5a
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 0x40da6c
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 0x40d95a
mov edi, dword [esp + 0x64]
jmp 0x40dafd
lea eax, [esp + 0x54]
mov edi, ebx
push eax
push 9
xor eax, eax
push eax
push dword [esp + 0x1c]
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40da95
lea ecx, [esp + 0x54]
call fcn.0040e04e
jmp 0x40da97
xor eax, eax
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esi + 0x60]
push eax
push dword [esp + 0x18]
push 0xffff0003
call fcn.0040decf
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
dec ebx
test edi, edi
jle 0x40db01
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4]
mov dword [esp + 0x10], eax
jmp 0x40da6c
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 0x40dad1
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 0x40d7c6
test ebx, ebx
je 0x40db8a
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 0x40db6c
lea ecx, [esp + 0x58]
call fcn.0040e04e
xor ebx, ebx
jmp 0x40db70
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 0x40db8c
xor ebx, ebx
push dword [esp + 0x28]
jmp 0x40dbaf
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 0x40dbc8
push eax
push 1
push 0x110a
push dword [esi + 0x60]
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x40db92
jmp 0x40d7c6
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 0x40dc04
push edi
mov ecx, esi
call fcn.00414c0a
test eax, eax
je 0x40dc0d
push ecx
push edi
mov ecx, esi
call fcn.0040c8e3
xor ecx, ecx
call fcn.0040a299
mov ecx, dword [esp + 0x88c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041ca70
mov esp, ebp
pop ebp
ret 4