Function at 0x415ff0
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x63c
mov eax, dword [0x4e7018]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x18], 0
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x634], eax
mov eax, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x63c], esi
mov dword [ebp - 0x638], eax
je 0x4160b5
push 0
push 0
push 0
push eax
push 1
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
je 0x416071
cmp eax, 2
je 0x416061
cmp eax, 3
je 0x416061
push ebx
push eax
push str.DeleteKeyChildren:_could_not_set_owner_for_key:_0x_08x__S
push 1
call fcn.004439a0
add esp, 0x10
jmp 0x416071
push ebx
push str.DeleteKeyChildren:_could_not_set_owner_for_key_since_not_found:__S
push 4
call fcn.004439a0
add esp, 0xc
push 0
push 0
push 0
push 0
push 4
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
je 0x4160b5
cmp eax, 2
je 0x4160a5
cmp eax, 3
je 0x4160a5
push ebx
push eax
push str.DeleteKeyChildren:_could_not_set_permissions_for_key:_0x_08x__S
push 1
call fcn.004439a0
add esp, 0x10
jmp 0x4160b5
push ebx
push str.DeleteKeyChildren:_could_not_set_permissions_for_key_since_not_found:__S
push 4
call fcn.004439a0
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x41626d
push 0x200
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0040f160
push 0x20a
xor edi, edi
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.0040f160
add esp, 0x18
mov dword [ebp - 0x620], 0x105
lea eax, [ebp - 0x62c]
push eax
push 0xf003f
push edi
push esi
push dword [ebp - 0x634]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x41614e
push esi
cmp eax, 2
je 0x41613a
push eax
push str.DeleteKeyChildren:_could_not_open_subkey_with_all_access:_0x_08x__S
push 1
call fcn.004439a0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push str.DeleteKeyChildren:_subkey_already_deleted:__S
push 4
call fcn.004439a0
add esp, 0xc
jmp 0x4162ff
lea eax, [ebp - 0x628]
mov esi, 1
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x210]
push eax
push 0
push dword [ebp - 0x62c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x4161e0
cmp edi, 0x80
jge 0x4161e0
lea eax, [ebp - 0x210]
push eax
call fcn.0047b1bd
add esp, 4
mov dword [ebp + edi*4 - 0x61c], eax
test eax, eax
je 0x4162a8
lea ecx, [ebp - 0x628]
mov dword [ebp - 0x620], 0x105
push ecx
push 0
push 0
push 0
lea ecx, [ebp - 0x620]
mov eax, esi
push ecx
lea ecx, [ebp - 0x210]
inc edi
push ecx
push eax
push dword [ebp - 0x62c]
inc esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x416180
xor esi, esi
mov dword [ebp - 0x630], esi
test edi, edi
jle 0x41625b
nop dword [eax]
push 0x20a
lea eax, [ebp - 0x41c]
push 0
push eax
call fcn.0040f160
mov esi, dword [ebp + esi*4 - 0x61c]
lea eax, [ebp - 0x41c]
push esi
push ebx
push 0x49a55c
push 0x105
push eax
call fcn.004159a0
push dword [ebp - 0x638]
lea eax, [ebp - 0x41c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push eax
push dword [ebp - 0x62c]
call fcn.00415ff0
push esi
call fcn.0047b1a0
mov esi, dword [ebp - 0x630]
add esp, 0x3c
inc esi
mov dword [ebp - 0x630], esi
cmp esi, edi
jl 0x4161f0
push dword [ebp - 0x62c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x63c]
push esi
push dword [ebp - 0x634]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push esi
push ebx
test eax, eax
je 0x4162f0
cmp eax, 2
je 0x4162e7
push eax
push str.DeleteKeyChildren:_could_not_delete_key:_0x_08x__S__S
push 1
call fcn.004439a0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push str.DeleteKeyChildren:_out_of_memory
push 1
call fcn.004439a0
add esp, 8
sub edi, 1
js 0x4162d4
nop dword [eax]
push dword [ebp + edi*4 - 0x61c]
call fcn.0047b1a0
add esp, 4
sub edi, 1
jns 0x4162c0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bf1
mov esp, ebp
pop ebp
ret
push str.DeleteKeyChildren:_key_already_deleted:__S__S
push 0x20
jmp 0x4162f7
push str.DeleteKeyChildren:_deleted:__S__S
push 0x10
call fcn.004439a0
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401bf1
mov esp, ebp
pop ebp
ret