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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d4178
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x518f10]
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 0x4788ec
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.00466ad0
add esp, 0xc
call fcn.00478020
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 0x4788e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x478a44
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x21c], esp
mov esi, esp
push eax
call fcn.004252a0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00469bd0
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.00466ad0
add esp, 0x10
call fcn.00478020
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 0x4789ec
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 0x4789d3
test eax, eax
jne 0x4789df
mov edx, dword [ebp - 0x220]
push eax
lea ecx, [ebp - 0x218]
push ecx
push edx
call fcn.00467c10
add esp, 0xc
test eax, eax
je 0x478980
jmp 0x4789df
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.004252a0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00469bd0
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 0x478a42
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.004b134c
mov esp, ebp
pop ebp
ret