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

Disassembly:
mov ecx, dword [0x42badc]
sub esp, 0x38
mov edx, dword [ecx*4 + 0x42b890]
push ebx
test edx, edx
push esi
je 0x40da5a
mov esi, dword [ecx*4 + 0x42b7d0]
xor eax, eax
test esi, esi
jbe 0x40d774
mov bl, byte [eax + edx]
mov cl, al
add cl, 0x41
xor bl, cl
mov byte [eax + edx], bl
mov ecx, dword [0x42badc]
inc eax
cmp eax, dword [ecx*4 + 0x42b7d0]
jb 0x40d757
xor eax, eax
mov ax, word [edx]
add edx, 2
test eax, eax
jbe 0x40da5a
push ebp
push edi
mov dword [esp + 0x28], eax
jmp 0x40d790
mov edx, dword [esp + 0x2c]
mov esi, dword [edx]
mov bl, byte [edx + 4]
add edx, 4
or ecx, 0xffffffff
inc edx
xor eax, eax
mov edi, edx
mov dword [esp + 0x18], 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 + 0x20], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [edx + ecx + 1]
or ecx, 0xffffffff
mov edi, edx
mov ebp, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, 0x14
lea edx, [edx + ecx + 1]
mov dword [esp + 0x2c], edx
jb 0x40d7e3
mov eax, dword [0x426048]
mov dword [esp + 0x1c], eax
jmp 0x40d7ee
mov eax, dword [esi*4 + 0x426044]
mov dword [esp + 0x1c], eax
test bl, 4
je 0x40d863
mov esi, dword [esp + 0x20]
test esi, esi
je 0x40d835
cmp byte [esi], 0
je 0x40d835
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40da49
mov eax, dword [esp + 0x10]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40da49
mov ecx, dword [0x42ba7c]
test ecx, ecx
je 0x40d852
mov edx, dword [esp + 0x18]
push edx
push eax
call fcn.0040d640
add esp, 8
jmp 0x40da49
mov ecx, dword [esp + 0x18]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x40da49
test bl, 1
je 0x40d8f7
mov ecx, dword [esp + 0x18]
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 0x40d8de
test bl, 2
mov dword [esp + 0x14], 1
mov dword [esp + 0x24], 0x14
je 0x40d8b2
mov eax, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
lea edx, [esp + 0x24]
lea eax, [esp + 0x30]
push edx
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x18]
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 0x40d8eb
mov eax, dword [esp + 0x30]
test eax, eax
jmp 0x40d8f1
mov al, byte [esp + 0x30]
test al, al
jne 0x40da49
push 0xffdc
push ebp
push 0
call fcn.0040d310
mov esi, eax
add esp, 0xc
lea eax, [esi + esi + 1]
cmp eax, 4
ja 0x40d917
mov eax, 4
push eax
call fcn.0041a900
lea edx, [esi + 1]
mov dword [esp + 0x18], eax
push edx
push ebp
push eax
call fcn.0040d310
add esp, 0x10
mov edi, 1
test bl, 2
je 0x40d954
mov ebx, dword [esp + 0x14]
push ebx
call fcn.0041affd
mov esi, 4
add esp, 4
mov dword [ebx], eax
mov edi, esi
jmp 0x40da01
mov eax, dword [esp + 0x14]
push 5
push str.:hex:
push eax
call fcn.0041af50
add esp, 0xc
test eax, eax
jne 0x40d9fd
mov ebp, dword [esp + 0x14]
mov esi, ebp
mov al, byte [ebp + 5]
lea edi, [ebp + 5]
test al, al
je 0x40d9f6
movsx ecx, al
push ecx
xor bl, bl
call fcn.0041ae7e
add esp, 4
inc edi
cmp al, 0x30
jl 0x40d99b
cmp al, 0x39
jg 0x40d99b
sub al, 0x30
jmp 0x40d9a5
cmp al, 0x41
jl 0x40d9a7
cmp al, 0x46
jg 0x40d9a7
sub al, 0x37
mov bl, al
mov al, byte [edi]
test al, al
je 0x40d9e0
cmp al, 0x2c
je 0x40d9e0
movsx edx, al
push edx
call fcn.0041ae7e
add esp, 4
inc edi
cmp al, 0x30
jl 0x40d9d0
cmp al, 0x39
jg 0x40d9d0
sub bl, 3
shl bl, 4
add bl, al
jmp 0x40d9e0
cmp al, 0x41
jl 0x40d9e0
cmp al, 0x46
jg 0x40d9e0
shl bl, 4
add bl, al
sub bl, 0x37
mov byte [esi], bl
inc esi
mov al, byte [edi]
cmp al, 0x20
je 0x40d9ed
cmp al, 0x2c
jne 0x40d9f0
inc edi
jmp 0x40d9e3
mov al, byte [edi]
test al, al
jne 0x40d980
mov edi, 3
sub esi, ebp
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x10]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40da40
cmp edi, 1
jne 0x40da20
inc esi
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
push esi
push ebx
push edi
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 ebx
call fcn.0041aa63
add esp, 4
mov eax, dword [esp + 0x28]
dec eax
mov dword [esp + 0x28], eax
jne 0x40d78c
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x38
ret