Function at 0x40d16f
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x41b014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x240], ecx
xor ecx, ecx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x23c], ebx
cmp byte [ebp + 0x18], cl
jne 0x40d2a9
xor eax, eax
mov dword [ebp - 0x220], ecx
mov word [ebp - 0x228], ax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x228]
mov dword [ebp - 0x234], ecx
push eax
push ebx
mov dword [ebp - 0x230], ecx
mov dword [ebp - 0x22c], ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x40d2a1
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x220]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
test eax, eax
je 0x40d2a1
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x234]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorGroup]
test eax, eax
je 0x40d2a1
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x40d2a1
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x40d2a1
push dword [ebp - 0x228]
lea eax, [ebp + 0xc]
push eax
call fcn.0040cf3e
push dword [ebp - 0x22c]
mov ebx, dword [ebp + 0xc]
push dword [ebp - 0x230]
push dword [ebp - 0x234]
push dword [ebp - 0x220]
push ebx
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
xor ecx, ecx
test eax, eax
je 0x40d2ac
mov dword [esi], 1
jmp 0x40d2ac
mov dword [esi], 1
xor ecx, ecx
mov ebx, dword [ebp + 0xc]
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
lea eax, [ebp - 0x238]
mov dword [ebp - 0x21c], ecx
push eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x238], ecx
push eax
push ecx
push ecx
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x40d349
cmp eax, 5
jne 0x40d301
lea eax, [ebp - 0x214]
push eax
push ebx
push 0x20001
call fcn.0040cadf
push eax
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40d30c
mov dword [esi], 1
jmp 0x40d45a
xor ecx, ecx
lea eax, [ebp - 0x238]
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push eax
lea eax, [ebp - 0x21c]
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
push dword [ebp - 0x214]
test eax, eax
je 0x40d343
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40d301
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x21c], 0
je 0x40d45a
push 0x104
lea eax, [ebp - 0x210]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x40d398
cmp eax, 5
jne 0x40d301
lea eax, [ebp - 0x214]
push eax
push 8
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d301
mov eax, dword [ebp - 0x214]
jmp 0x40d3a0
mov eax, edi
mov dword [ebp - 0x214], eax
xor ecx, ecx
mov dword [ebp - 0x220], ecx
cmp dword [ebp - 0x21c], ecx
jbe 0x40d44f
push 0x104
lea edx, [ebp - 0x210]
push edx
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x40d3d4
mov dword [esi], 1
jmp 0x40d430
lea eax, [ebp - 0x218]
push eax
push ebx
push 0x2000000
call fcn.0040cadf
push eax
push 0
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d3cc
mov ecx, dword [ebp - 0x240]
push eax
push esi
push dword [ebp - 0x23c]
push ebx
push dword [ebp - 0x218]
call fcn.0040d16f
mov dword [ebp - 0x224], eax
test eax, eax
jne 0x40d46f
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x214]
inc ecx
mov dword [ebp - 0x220], ecx
cmp ecx, dword [ebp - 0x21c]
jb 0x40d3b4
cmp eax, edi
je 0x40d45a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419cc0
mov esp, ebp
pop ebp
ret 0x14
cmp dword [ebp - 0x214], edi
je 0x40d483
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x224]
jmp 0x40d45c