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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f7488
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x5470b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
push edi
lea eax, [ebp - 0x224]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
push str._RegSaveKeyExTest_
mov dword [ebp - 4], edi
push ebx
mov dword [ebp - 0x224], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x48757c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x21c], esp
push eax
push str._TestRegSaveKey:_could_not_create__RegSaveKeyExTest__key__LE_d
push ecx
call fcn.00475230
add esp, 0xc
call fcn.00486cb0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x487575
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x4876d4
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x21c], esp
mov esi, esp
push eax
call fcn.00425486
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00478330
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x224]
add esp, 4
push 2
push edi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSaveKeyExW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x21c], esp
push eax
push edi
push str.TestRegSaveKey:_RegSaveKeyEx_returned_Res_d__LE_d
push ecx
call fcn.00475230
add esp, 0x10
call fcn.00486cb0
mov edx, dword [ebp - 0x224]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x220]
push eax
push 0x10008
push 0
push str._RegSaveKeyExTest_
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x48767c
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
nop
mov eax, dword [ebp - 0x220]
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x218]
push edx
push 0
push eax
mov dword [ebp - 0x21c], 0x104
call esi
cmp eax, 0x103
je 0x487663
test eax, eax
jne 0x48766f
mov edx, dword [ebp - 0x220]
push eax
lea ecx, [ebp - 0x218]
push ecx
push edx
call fcn.00476370
add esp, 0xc
test eax, eax
je 0x487610
jmp 0x48766f
push str._RegSaveKeyExTest_
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov eax, dword [ebp - 0x220]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x228], esp
mov esi, esp
push eax
call fcn.00425486
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00478330
xor ecx, ecx
add esp, 4
test edi, edi
sete cl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov esi, ecx
mov ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4876d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d14fc
mov esp, ebp
pop ebp
ret