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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x47bbb0]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
cmp dword [edi + 0x14], 8
jb 0x405911
mov esi, dword [edi]
jmp 0x405913
mov esi, edi
push str.RegDeleteKeyExW
push 0x474e0c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405939
push 0
push dword [ebp + 8]
push esi
push ebx
call eax
jmp 0x405941
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x405958
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0043834d
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x3c], 0
jb 0x405969
mov ecx, dword [edi]
jmp 0x40596b
mov ecx, edi
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp + 8]
or eax, 8
push eax
push 0
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, 2
je 0x405945
test eax, eax
jne 0x405af4
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x10], eax
mov word [ebp - 0x20], ax
call fcn.00406080
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x4059ce
cmp dword [ebp - 0xc], 8
lea eax, [ebp - 0x20]
cmovae eax, dword [ebp - 0x20]
cmp word [eax + ecx*2 - 2], 0x5c
je 0x4059ce
push 0x474e1c
lea ecx, [ebp - 0x20]
call fcn.00405ce0
mov esi, dword [ebp - 0x10]
xor eax, eax
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], 0
mov word [ebp - 0x38], ax
nop word [eax + eax]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x40], 0x104
call fcn.00408690
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x40]
push ecx
push eax
push 0
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x405aa0
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x28]
cmp ecx, eax
ja 0x405a3f
cmp dword [ebp - 0x24], 8
lea eax, [ebp - 0x38]
mov dword [ebp - 0x28], ecx
cmovae eax, dword [ebp - 0x38]
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x405a4c
sub ecx, eax
push 0
push ecx
lea ecx, [ebp - 0x38]
call fcn.00406350
mov ecx, dword [ebp - 0x10]
cmp esi, ecx
ja 0x405a69
cmp dword [ebp - 0xc], 8
lea eax, [ebp - 0x20]
mov dword [ebp - 0x10], esi
cmovae eax, dword [ebp - 0x20]
xor ecx, ecx
mov word [eax + esi*2], cx
jmp 0x405a78
mov eax, esi
sub eax, ecx
lea ecx, [ebp - 0x20]
push 0
push eax
call fcn.00406350
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x20]
call fcn.00405030
push dword [ebp + 8]
lea edx, [ebp - 0x20]
mov ecx, ebx
call fcn.004058f0
add esp, 4
test eax, eax
je 0x4059f0
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [edi + 0x14], 8
jb 0x405ab1
mov edi, dword [edi]
push str.RegDeleteKeyExW
push 0x474e0c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405ad8
mov edx, dword [ebp + 8]
push 0
push edx
push edi
push ebx
call eax
jmp 0x405ae0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea ecx, [ebp - 0x38]
mov esi, eax
call fcn.00404640
lea ecx, [ebp - 0x20]
call fcn.00404640
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043834d
mov esp, ebp
pop ebp
ret