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

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x914
push ebx
push ebp
xor ebp, ebp
push esi
test eax, eax
push edi
je 0x40d1ab
mov ebx, dword [esp + 0x92c]
test ebx, ebx
je 0x40d1ab
cmp byte [ebx], 0
je 0x40d1ab
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x524]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x528]
push ecx
call fcn.00420960
xor edi, edi
add esp, 8
cmp eax, edi
jne 0x40d00b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x914
ret
mov ecx, dword [esp + 0x928]
mov byte [eax], 0
inc eax
lea edx, [esp + 0x10]
mov dword [esp + 0x18], eax
push edx
push 0x2001f
lea eax, [esp + 0x52c]
push edi
push eax
push ecx
mov dword [esp + 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d1ab
xor esi, esi
lea edx, [esp + 0x1c]
mov eax, edi
push 0x105
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
inc edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x40d07c
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
push edx
call fcn.00421240
mov esi, eax
add esp, 8
neg esi
sbb esi, esi
inc esi
je 0x40d042
jmp 0x40d084
test esi, esi
je 0x40d19b
mov ecx, dword [esp + 0x928]
lea eax, [esp + 0x14]
push eax
push 0x2001f
push 0
push ebx
push ecx
mov ebp, 1
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d183
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push 0x105
push edx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x40d178
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x124]
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x124]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x43b6a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x124]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x124]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x92c]
push ecx
call fcn.0040cf90
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40d0b4
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x40d1a0
xor ebp, ebp
jmp 0x40d1a0
mov ebp, 1
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x914
ret