Function at 0x40a809
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x884
mov eax, dword [0x41b014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x81c], ecx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
push 0x10
call dword [sym.imp.COMCTL32.dll_DPA_CreateEx]
mov edi, eax
mov dword [ebp - 0x810], edi
test edi, edi
je 0x40ad5a
mov esi, dword [0x41b080]
xor ecx, ecx
inc ecx
mov dword [ebp - 0x848], esi
call fcn.00407d9b
xor ebx, ebx
push ebx
push ebx
push 0xb
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push 9
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push ebx
mov dword [ebp - 0x858], eax
lea eax, [ebp - 0x808]
push 0x110a
push esi
mov dword [ebp - 0x880], 1
mov dword [ebp - 0x870], eax
mov dword [ebp - 0x86c], 0x400
mov dword [ebp - 0x844], 0x48
mov dword [ebp - 0x838], ebx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x840], eax
lea eax, [ebp - 0x844]
push eax
push ebx
push 0x113e
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [ebp - 0x840]
lea eax, [ebp - 0x808]
push ebx
push 0x400
push eax
mov ecx, esi
call fcn.0040af0b
test byte [ebp - 0x83c], 0x20
mov ebx, eax
mov dword [ebp - 0x818], ebx
je 0x40ac61
test ebx, ebx
je 0x40ac46
lea eax, [ebp - 0x814]
push eax
push 8
xor eax, eax
push eax
lea eax, [ebp - 0x808]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ac46
push dword [ebp - 0x840]
xor ebx, ebx
push ebx
push 0x1113
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [ebp - 0x808]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40a94b
sub ecx, edx
lea eax, [ebp - 0x808]
sar ecx, 1
mov edi, 0x3ff
sub edi, ecx
push edi
push eax
xor eax, eax
push eax
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x40a9cc
mov esi, dword [ebp - 0x810]
xor eax, eax
mov dword [ebp - 0x80c], eax
lea eax, [ebp - 0x808]
push eax
lea eax, [ebp - 0x80c]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
push dword [ebp - 0x80c]
push ebx
push esi
call dword [sym.imp.COMCTL32.dll_DPA_InsertPtr]
push edi
lea eax, [ebp - 0x808]
inc ebx
push eax
push ebx
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x40a982
mov esi, dword [ebp - 0x848]
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x810]
xor eax, eax
push eax
push 0x40ad70
push edi
call dword [sym.imp.COMCTL32.dll_DPA_Sort]
test ebx, ebx
jne 0x40aa1a
push edi
call dword [sym.imp.COMCTL32.dll_DPA_DeleteAllPtrs]
push dword [ebp - 0x840]
push 0x8001
push 0x1102
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x824], ebx
jmp 0x40acb3
push dword [ebp - 0x840]
mov eax, dword [edi + 4]
dec ebx
push 4
push 0x110a
push esi
mov eax, dword [eax + ebx*4]
mov dword [ebp - 0x80c], eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, eax
mov dword [ebp - 0x87c], edi
test edi, edi
je 0x40aa63
lea eax, [ebp - 0x880]
push eax
xor eax, eax
push eax
push 0x113e
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, dword [ebp - 0x87c]
test ebx, ebx
js 0x40ac35
test edi, edi
je 0x40ab97
push dword [ebp - 0x80c]
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40aac0
push dword [ebp - 0x87c]
push 1
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x87c], eax
test eax, eax
je 0x40ab0d
lea eax, [ebp - 0x880]
push eax
xor eax, eax
push eax
push 0x113e
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40ab0d
jle 0x40ab36
lea eax, [ebp - 0x84c]
xor edi, edi
push eax
push 9
push edi
push dword [ebp - 0x80c]
push dword [ebp - 0x818]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40aaf1
lea ecx, [ebp - 0x84c]
call fcn.0040b188
jmp 0x40aaf3
mov eax, edi
mov edx, dword [ebp - 0x840]
push ecx
push eax
push dword [ebp - 0x80c]
mov ecx, esi
push 0xffff0003
call fcn.0049adf4
xor eax, eax
push eax
lea eax, [ebp - 0x80c]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
sub ebx, 1
js 0x40ab8c
mov eax, dword [ebp - 0x810]
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4]
mov dword [ebp - 0x80c], eax
jmp 0x40ab81
push dword [ebp - 0x87c]
push 1
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp - 0x87c]
mov edi, eax
xor eax, eax
push eax
push 0x1101
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x87c], edi
test edi, edi
je 0x40ab97
lea eax, [ebp - 0x880]
push eax
xor eax, eax
push eax
push 0x113e
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, dword [ebp - 0x87c]
jmp 0x40aa6b
mov edi, dword [ebp - 0x87c]
jmp 0x40ac35
xor edi, edi
lea eax, [ebp - 0x850]
push eax
push 9
push edi
push dword [ebp - 0x80c]
push dword [ebp - 0x818]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40abc6
lea ecx, [ebp - 0x850]
call fcn.0040b188
jmp 0x40abc8
mov eax, edi
mov edx, dword [ebp - 0x840]
push ecx
push eax
push dword [ebp - 0x80c]
mov ecx, esi
push 0xffff0003
call fcn.0040b005
push edi
lea eax, [ebp - 0x80c]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
sub ebx, 1
js 0x40ac39
mov eax, dword [ebp - 0x810]
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4]
mov dword [ebp - 0x80c], eax
jmp 0x40ab99
push edi
push 1
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp - 0x87c]
mov edi, eax
xor eax, eax
push eax
push 0x1101
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x87c], edi
test edi, edi
jne 0x40ac09
mov edi, dword [ebp - 0x810]
push edi
call dword [sym.imp.COMCTL32.dll_DPA_DeleteAllPtrs]
push dword [ebp - 0x840]
push 4
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
xor ebx, ebx
jmp 0x40a8ba
test ebx, ebx
je 0x40acc9
push dword [ebp - 0x840]
push 0x8001
push 0x1102
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x854]
push eax
push 9
xor eax, eax
push eax
lea eax, [ebp - 0x808]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40aca9
lea ecx, [ebp - 0x854]
call fcn.0040b188
xor ebx, ebx
jmp 0x40acad
xor ebx, ebx
mov eax, ebx
mov dword [ebp - 0x824], eax
lea eax, [ebp - 0x844]
push eax
push ebx
push 0x113f
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40accb
xor ebx, ebx
push dword [ebp - 0x840]
jmp 0x40acf2
push dword [ebp - 0x840]
push 3
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x840], eax
test eax, eax
je 0x40ad09
push eax
push 1
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x40acd3
jmp 0x40a8ba
push edi
call dword [sym.imp.COMCTL32.dll_DPA_Destroy]
push ebx
push 1
push 0xb
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push 9
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, dword [ebp - 0x858]
je 0x40ad3b
mov ecx, dword [ebp - 0x81c]
jmp 0x40ad4e
mov esi, dword [ebp - 0x81c]
mov ecx, esi
call fcn.00411d18
test eax, eax
je 0x40ad53
mov ecx, esi
call fcn.00409a13
xor ecx, ecx
call fcn.00407d9b
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419cc0
mov esp, ebp
pop ebp
ret