Function at 0x40c980
Capabilities:
Delete registry key
Delete registry value
Encode data using xor
Query or enumerate registry value
Set registry value

Disassembly:
mov ecx, dword [0x42768c]
sub esp, 0x38
push ebx
push esi
mov esi, dword [ecx*4 + 0x427450]
test esi, esi
je 0x40cbf5
mov edx, dword [ecx*4 + 0x427390]
xor eax, eax
test edx, edx
jbe 0x40c9c4
mov bl, byte [eax + esi]
mov cl, al
add cl, 0x41
xor bl, cl
mov byte [eax + esi], bl
mov edx, dword [0x42768c]
inc eax
cmp eax, dword [edx*4 + 0x427390]
jb 0x40c9a7
xor eax, eax
mov ax, word [esi]
add esi, 2
test eax, eax
jbe 0x40cbf5
push ebp
push edi
mov dword [esp + 0x2c], eax
mov ebp, dword [esi]
mov bl, byte [esi + 4]
add esi, 4
or ecx, 0xffffffff
inc esi
xor eax, eax
mov edi, esi
mov dword [esp + 0x14], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esi + ecx + 1]
or ecx, 0xffffffff
mov edi, edx
mov dword [esp + 0x1c], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [edx + ecx + 1]
or ecx, 0xffffffff
mov edi, edx
mov dword [esp + 0x28], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ebp, 0x10
lea esi, [edx + ecx + 1]
jb 0x40ca2b
mov eax, dword [0x422048]
mov dword [esp + 0x18], eax
jmp 0x40ca36
mov eax, dword [ebp*4 + 0x422044]
mov dword [esp + 0x18], eax
test bl, 4
je 0x40caab
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x40ca7d
cmp byte [edi], 0
je 0x40ca7d
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40cbe4
mov eax, dword [esp + 0x10]
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40cbe4
mov ecx, dword [0x42763c]
test ecx, ecx
je 0x40ca9a
mov edx, dword [esp + 0x14]
push edx
push eax
call fcn.0040c890
add esp, 8
jmp 0x40cbe4
mov ecx, dword [esp + 0x14]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x40cbe4
test bl, 1
je 0x40cb45
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
push 0x20019
push 0
push ecx
push eax
mov dword [esp + 0x44], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40cb26
test bl, 2
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], 0x14
je 0x40cafa
mov eax, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
lea edx, [esp + 0x20]
lea eax, [esp + 0x30]
push edx
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test bl, 2
je 0x40cb39
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x40cbe4
jmp 0x40cb45
mov al, byte [esp + 0x30]
test al, al
jne 0x40cbe4
mov edx, dword [esp + 0x28]
push 0xffdc
push edx
push 0
call fcn.0040c0c0
mov edi, eax
lea eax, [edi + edi + 1]
push eax
call fcn.00419070
mov edx, dword [esp + 0x38]
lea ecx, [edi + 1]
mov ebp, eax
push ecx
push edx
push ebp
call fcn.0040c0c0
add esp, 0x1c
mov dword [esp + 0x28], 1
test bl, 2
je 0x40cb98
push ebp
call fcn.0041972c
mov edi, 4
add esp, 4
mov dword [ebp], eax
mov dword [esp + 0x28], edi
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40cbdb
mov eax, dword [esp + 0x28]
cmp eax, 1
jne 0x40cbbb
inc edi
mov ecx, dword [esp + 0x10]
push edi
push ebp
push eax
mov eax, dword [esp + 0x28]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call fcn.004191d3
add esp, 4
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x2c], eax
jne 0x40c9da
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x38
ret