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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x57a120]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
cmp dword [esi + 0x14], 8
jb 0x40c4c1
mov edi, dword [esi]
jmp 0x40c4c3
mov edi, esi
push 0x561a38
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c4e9
push 0
push dword [ebp + 8]
push edi
push ebx
call eax
jmp 0x40c4f1
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x40c508
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3b66
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x38], 0
jb 0x40c519
mov ecx, dword [esi]
jmp 0x40c51b
mov ecx, esi
lea eax, [ebp - 0x38]
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 0x40c4f5
test eax, eax
jne 0x40c6cf
push 0xffffffffffffffff
push eax
push esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 8], 7
mov dword [ebp - 0xc], eax
mov word [ebp - 0x1c], ax
call fcn.00407970
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x40c57e
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
cmovae eax, dword [ebp - 0x1c]
cmp word [eax + ecx*2 - 2], 0x5c
je 0x40c57e
push 0x561a58
lea ecx, [ebp - 0x1c]
call fcn.0040cde0
mov edi, dword [ebp - 0xc]
xor eax, eax
mov dword [ebp - 0x20], 7
mov dword [ebp - 0x24], 0
mov word [ebp - 0x34], ax
jmp 0x40c5a0
mov edx, 0x104
mov dword [ebp - 0x3c], 0x104
lea ecx, [ebp - 0x34]
call fcn.0041ffa0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x3c]
push ecx
push eax
push 0
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40c655
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x24]
cmp ecx, eax
ja 0x40c5f4
cmp dword [ebp - 0x20], 8
lea eax, [ebp - 0x34]
mov dword [ebp - 0x24], ecx
cmovae eax, dword [ebp - 0x34]
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x40c601
sub ecx, eax
push 0
push ecx
lea ecx, [ebp - 0x34]
call fcn.0040d8b0
mov ecx, dword [ebp - 0xc]
cmp edi, ecx
ja 0x40c61e
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xc], edi
cmovae eax, dword [ebp - 0x1c]
xor ecx, ecx
mov word [eax + edi*2], cx
jmp 0x40c62d
mov eax, edi
sub eax, ecx
lea ecx, [ebp - 0x1c]
push 0
push eax
call fcn.0040d8b0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040d700
push dword [ebp + 8]
lea edx, [ebp - 0x1c]
mov ecx, ebx
call fcn.0040c4a0
add esp, 4
test eax, eax
je 0x40c5a0
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi + 0x14], 8
jb 0x40c666
mov esi, dword [esi]
push 0x561a38
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c68d
mov edx, dword [ebp + 8]
push 0
push edx
push esi
push ebx
call eax
jmp 0x40c695
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
cmp dword [ebp - 0x20], 8
mov esi, eax
jb 0x40c6a8
push dword [ebp - 0x34]
call fcn.004f2e36
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], 7
cmp dword [ebp - 8], 8
mov dword [ebp - 0x24], 0
mov word [ebp - 0x34], ax
jb 0x40c6cd
push dword [ebp - 0x1c]
call fcn.004f2e36
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f3b66
mov esp, ebp
pop ebp
ret