Function at 0x1042776
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp dword [ebp + 0xc], esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov dword [ebp - 0x424], ebx
mov dword [ebp - 0x418], esi
mov dword [ebp - 0x420], esi
mov dword [ebp - 0x42c], esi
mov dword [ebp - 0x41c], 1
je 0x1042821
lea eax, [ebp - 0x418]
push eax
push 0x2001f
push esi
push 0x100d008
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1042821
push 0x1049000
push dword [ebp - 0x418]
call edi
push 0x1048df8
push dword [ebp - 0x418]
call edi
push 0x1048bf0
push dword [ebp - 0x418]
call edi
push 0x1049208
push dword [ebp - 0x418]
call edi
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x420]
push eax
push 0x2001f
push esi
push 0x100cfa8
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1042a13
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x41c]
push eax
push esi
push ebx
push dword [ebp - 0x420]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x428], 0x208
call ebx
test eax, eax
jne 0x10428ad
cmp dword [ebp - 0x41c], 1
je 0x104288b
cmp dword [ebp - 0x41c], 2
jne 0x10428ad
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.msvcrt.dll__wcslwr]
pop ecx
lea eax, [ebp - 0x20c]
push eax
call fcn.01038841
test eax, eax
je 0x1042a07
lea eax, [ebp - 0x418]
push eax
push 0x2001f
push esi
push 0x100cf40
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10429be
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x41c]
push eax
push esi
push dword [ebp - 0x424]
mov dword [ebp - 0x428], 0x208
push dword [ebp - 0x418]
call ebx
test eax, eax
jne 0x10429aa
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x41c], ebx
je 0x1042920
cmp dword [ebp - 0x41c], 2
jne 0x10429aa
lea eax, [ebp - 0x20c]
push eax
push 0x103
lea eax, [ebp - 0x414]
push eax
call fcn.01028a67
test eax, eax
jl 0x10429aa
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.msvcrt.dll__wcslwr]
pop ecx
lea eax, [ebp - 0x414]
push eax
call fcn.01038841
test eax, eax
jne 0x10429aa
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1042963
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x41c]
push esi
push dword [ebp - 0x424]
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x424]
push dword [ebp - 0x418]
call edi
mov dword [ebp - 0x42c], ebx
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x42c], esi
jne 0x1042a07
lea eax, [ebp - 0x418]
push eax
push 0x2001f
push esi
push 0x100cee0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10429f9
push dword [ebp - 0x424]
push dword [ebp - 0x418]
call edi
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x424]
push dword [ebp - 0x420]
call edi
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
xor eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.01031a01
leave
ret 8