Function at 0x54d860
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ca8d
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x5da084]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x18], ebx
cmp byte [0x5df50d], 0
mov esi, dword [ebp + 8]
je 0x54d8a7
push esi
push str.RecurseDeleteKey:__s_n
call fcn.005438a0
add esp, 8
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x28], vtable.sibcrux::CSafeRegKey.0
mov dword [ebp - 0x24], 0
call fcn.00414d80
push ecx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
mov edi, dword [ebp + 0xc]
push edi
push esi
push ebx
call fcn.0054d400
or ebx, 0xffffffff
test al, al
je 0x54d972
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x54d908
push dword [ebp - 0x20]
push str.Cannot_query_info_key_in__s:_parent_was_not_created
push edi
call fcn.00544cc0
add esp, 0xc
cmp byte [0x5df50d], 0
je 0x54d972
push dword [edi]
push str._s_n
jmp 0x54d952
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x54d9c8
push dword [ebp - 0x20]
push str.Cannot_query_registry_key__s
push edi
call fcn.00544cc0
add esp, 0xc
cmp byte [0x5df50d], 0
je 0x54d972
push dword [edi]
push str.QueryInfoKey:__s_n
call fcn.005438a0
add esp, 8
cmp byte [0x5df50d], 0
je 0x54d972
push dword [edi]
push 0x5cc5cc
call fcn.005438a0
add esp, 8
xor bl, bl
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], vtable.sibcrux::CSafeRegKey.0
test eax, eax
je 0x54d990
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x20]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54d9b2
cmp dword [ecx + 4], 0
jle 0x54d9b2
push ecx
call fcn.00577de8
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x54da71
dec eax
lea ecx, [ebp + 0xc]
mov dword [ebp - 0x10], eax
call fcn.00414d80
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp + 0xc]
inc eax
mov dword [ebp - 0x14], eax
dec eax
cmp dword [esi - 8], 1
jg 0x54d9f9
cmp eax, dword [esi - 0xc]
jle 0x54da05
push eax
lea ecx, [ebp + 0xc]
call fcn.00416600
mov esi, dword [ebp + 0xc]
push edi
sub esp, 0xc
lea eax, [ebp - 0x14]
push eax
push esi
push ecx
lea ecx, [ebp - 0x28]
call fcn.0054d7c0
test al, al
je 0x54db13
push dword [ebp - 0x14]
lea ecx, [ebp + 0xc]
call fcn.005444c0
push 0x100
push edi
push esi
lea ecx, [ebp - 0x28]
call fcn.0054d860
test al, al
je 0x54db13
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 8], eax
dec eax
test eax, eax
jg 0x54da63
cmp dword [esi + 4], 0
jle 0x54da63
push esi
call fcn.00577de8
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x54d9d3
mov esi, dword [ebp + 8]
dec eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x54da8a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x18]
push esi
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov dword [ebp + 8], eax
test eax, eax
je 0x54db56
cmp byte [0x5df50d], 0
je 0x54dabc
push esi
push str.RecurseDeleteKey:__s_ERR_n
call fcn.005438a0
mov eax, dword [ebp + 8]
add esp, 8
mov edx, eax
lea ecx, [ebp + 8]
call fcn.005440a0
mov byte [ebp - 4], 2
push dword [eax]
mov eax, dword [ebp - 0x18]
push dword [eax + 8]
push esi
push str.Cannot_delete_key__s_in__s:__s
push edi
call fcn.00544cc0
mov byte [ebp - 4], 0
add esp, 0x14
mov ecx, dword [ebp + 8]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 8], eax
dec eax
test eax, eax
jg 0x54d95a
cmp dword [ecx + 4], 0
jle 0x54d95a
push ecx
call fcn.00577de8
add esp, 4
jmp 0x54d95a
cmp byte [0x5df50d], 0
je 0x54db2b
push dword [edi]
push 0x5cc5cc
call fcn.005438a0
add esp, 8
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 8], eax
dec eax
test eax, eax
jg 0x54d972
cmp dword [esi + 4], 0
jle 0x54d972
push esi
call fcn.00577de8
add esp, 4
jmp 0x54d972
mov bl, 1
jmp 0x54d974