Function at 0x409678
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
cmp dword [edi + 0x44], ebx
je 0x409698
xor esi, esi
inc esi
jmp 0x4099ad
mov eax, dword [edi + 0xc]
lea edx, [ebp - 8]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov esi, eax
test esi, esi
js 0x40999e
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push dword [edi + 0x14]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x4096e5
push ecx
push ebx
jmp 0x40998f
mov eax, dword [edi + 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x4098cf
xor esi, esi
cmp word [eax], si
je 0x4098cf
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push dword [edi + 0x18]
push 1
push esi
push str.RelativeCachePath
push dword [ebp - 4]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x4098ea
xor esi, esi
cmp word [eax], si
je 0x4098ea
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push dword [edi + 0x1c]
push 1
push esi
push str.RelativeSourcePath
push dword [ebp - 4]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
push 4
lea eax, [edi + 0x20]
push eax
push 4
xor eax, eax
push eax
push str.Priority
push dword [ebp - 4]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
push 4
lea eax, [edi + 0x24]
push eax
push 4
xor eax, eax
push eax
push str.Signed
push dword [ebp - 4]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
lea eax, [edi + 0x28]
xor ecx, ecx
cmp dword [eax], ecx
je 0x409905
push 4
push eax
push 4
push ecx
push str.HashType
push dword [ebp - 4]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
push dword [edi + 0x2c]
lea eax, [edi + 0x30]
push eax
push 3
xor eax, eax
push eax
push str.Hash
push dword [ebp - 4]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
push dword [ebp - 4]
mov ecx, edi
call fcn.0040a131
mov esi, eax
test esi, esi
js 0x40998b
mov ecx, dword [edi + 0x80]
test ecx, ecx
je 0x409948
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push esi
push 1
xor eax, eax
push eax
push str.PreferredSource
push dword [ebp - 4]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
mov ecx, dword [edi + 0x84]
test ecx, ecx
je 0x409963
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push esi
push 1
xor eax, eax
push eax
push str.ContainerResource
push dword [ebp - 4]
call ebx
jmp 0x409979
push str.RelativeCachePath
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor ecx, ecx
cmp eax, 2
cmove eax, ecx
jmp 0x409720
push str.RelativeSourcePath
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor ecx, ecx
cmp eax, 2
cmove eax, ecx
jmp 0x40976b
push str.HashType
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor ecx, ecx
cmp eax, 2
cmove eax, ecx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40998b
push str.Hash
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor ecx, ecx
cmp eax, 2
cmove eax, ecx
jmp 0x409820
push str.PreferredSource
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor ecx, ecx
cmp eax, 2
cmove eax, ecx
jmp 0x40987f
push str.ContainerResource
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor ecx, ecx
cmp eax, 2
cmove eax, ecx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x40999e
push ecx
xor eax, eax
push eax
push dword [edi + 0x14]
mov edx, 0xc0000013
mov ecx, esi
call fcn.00402267
cmp dword [ebp - 4], 0
je 0x4099ad
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8