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

Disassembly:
push ebp
mov eax, 0x18418
mov ebp, esp
push ebx
push esi
push edi
call fcn.0040c490
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18424], edi
xor ebx, ebx
test edi, edi
je 0x4067bb
lea eax, [ebp - 0x1841c]
push edi
push eax
call fcn.004098e0
pop ecx
pop ecx
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x18], 0x3ff
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x18420], 0
mov dword [ebp - 0x14], 0x7fff
cmp byte [eax], 0
je 0x4067fa
lea eax, [ebp - 0x1c]
push eax
push 0xf003f
push 0
push dword [ebp + 0x18]
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
jmp 0x4067fd
mov dword [ebp - 0x1c], esi
cmp dword [ebp + 0xc], 6
jne 0x406815
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 0x1c]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov ebx, eax
cmp dword [ebp + 0xc], 1
je 0x406834
cmp dword [ebp + 0xc], 0xb
je 0x406834
mov eax, dword [ebp + 0xc]
add eax, 0xffffffce
cmp eax, 1
ja 0x406904
lea eax, [ebp - 0x18]
lea ebx, [ebp - 0x1841c]
push eax
lea eax, [ebp - 0x10]
push ebx
push eax
push 0
push dword [ebp + 0x1c]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test ebx, ebx
jne 0x4068bb
lea eax, [ebp - 0x1001c]
lea edx, [ebp - 0x1841c]
push edx
push eax
call fcn.004098e0
cmp dword [ebp + 0xc], 0x32
pop ecx
pop ecx
jne 0x406897
cmp dword [ebp - 0x10], 1
je 0x406897
cmp dword [ebp - 0x10], 2
je 0x406897
lea eax, [ebp - 0x1841c]
lea ecx, [ebp - 0x1001c]
push dword [ebp - 0x18]
push ecx
push eax
call fcn.00406dda
add esp, 0xc
cmp dword [ebp + 0xc], 0x32
jne 0x4068bb
lea eax, [ebp - 0x1001c]
push eax
lea eax, [ebp - 0x1841c]
push dword [ebp - 0x10]
push str._lu__s_r_n
push eax
call fcn.0040b2b0
add esp, 0x10
cmp dword [ebp + 0xc], 0xb
jne 0x4068da
lea eax, [ebp - 0x1841c]
push 1
push dword [ebp - 0x18]
push eax
push 0x427a94
call section..text
add esp, 0x10
cmp dword [ebp + 0xc], 0x33
jne 0x406904
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x1841c]
push dword [ebp - 0x18]
push eax
push edi
call fcn.00409b20
mov eax, dword [ebp - 0x18]
add esp, 0xc
jmp 0x406c0f
cmp dword [ebp + 0xc], 2
je 0x406910
cmp dword [ebp + 0xc], 0x16
jne 0x40696a
cmp dword [ebp + 0x20], 1
jne 0x406926
lea eax, [ebp - 0x1841c]
push eax
call fcn.004098c0
inc eax
pop ecx
jmp 0x40692b
mov eax, 4
cmp dword [ebp + 0xc], 0x16
jne 0x40694f
push 0
push eax
lea eax, [ebp - 0x1841c]
push eax
push 0x427a94
call section..text
add esp, 0x10
mov dword [ebp - 0x10], 3
push eax
lea eax, [ebp - 0x1841c]
push eax
push dword [ebp - 0x10]
push 0
push dword [ebp + 0x1c]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
cmp dword [ebp + 0xc], 3
jne 0x40697e
push dword [ebp + 0x1c]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ebx, eax
cmp dword [ebp + 0xc], 4
jne 0x406992
push dword [ebp + 0x1c]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov ebx, eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff9
cmp eax, 1
ja 0x406a67
mov byte [edi], 0
mov byte [ebp - 0x1841c], 0
lea eax, [ebp - 0x1841c]
push 0x3ff
push eax
push dword [ebp - 0x18420]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
cmp eax, 0x103
jne 0x4069d8
xor ebx, ebx
jmp 0x406a67
test eax, eax
je 0x4069e1
jmp 0x406c00
mov eax, dword [ebp + 8]
cmp byte [eax], 0x62
je 0x406a04
lea eax, [ebp - 0x1841c]
push dword [ebp + 0x1c]
push eax
push edi
push str._s_s_s
push edi
call fcn.0040b2b0
add esp, 0x14
jmp 0x406a5c
lea eax, [ebp - 0x1841c]
push eax
call fcn.004098c0
mov bl, al
mov eax, dword [ebp - 0x18424]
mov byte [eax], bl
lea eax, [ebp - 0x1841c]
movzx edx, bl
inc dword [ebp - 0x18424]
pop ecx
push edx
push eax
push dword [ebp - 0x18424]
call fcn.00409b20
movzx eax, bl
add esp, 0xc
push 2
add dword [ebp - 0x18424], eax
push 0
push dword [ebp - 0x18424]
call fcn.00409b60
add esp, 0xc
add dword [ebp - 0x18424], 2
inc dword [ebp - 0x18420]
jmp 0x4069a8
cmp dword [ebp + 0xc], 9
jne 0x406bd2
mov byte [edi], 0
mov dword [ebp - 0x14], 0x7fff
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0x3ff
lea ecx, [ebp - 0x1801c]
lea eax, [ebp - 0x14]
mov byte [ebp - 0x1841c], 0
push eax
lea eax, [ebp - 0x10]
lea edx, [ebp - 0x18]
push ecx
push eax
lea eax, [ebp - 0x1841c]
push 0
push edx
push eax
push dword [ebp - 0x18420]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x406ac9
xor ebx, ebx
jmp 0x406bd2
test eax, eax
je 0x406ad2
jmp 0x406c00
mov eax, dword [ebp + 8]
cmp byte [eax], 0x62
je 0x406b16
cmp dword [ebp - 0x10], 1
je 0x406b01
cmp dword [ebp - 0x10], 2
je 0x406b01
lea eax, [ebp - 0x1801c]
lea ebx, [ebp - 0x1001c]
push dword [ebp - 0x14]
push ebx
push eax
call fcn.00406dda
add esp, 0xc
jmp 0x406b16
lea eax, [ebp - 0x1001c]
lea ecx, [ebp - 0x1801c]
push ecx
push eax
call fcn.004098e0
pop ecx
pop ecx
mov eax, dword [ebp + 8]
cmp byte [eax], 0x62
je 0x406b43
lea eax, [ebp - 0x1841c]
lea edx, [ebp - 0x1001c]
push edx
push eax
push dword [ebp - 0x10]
push edi
push str._s_lu__s__s_n
push edi
call fcn.0040b2b0
add esp, 0x18
jmp 0x406bc7
mov eax, dword [ebp - 0x18424]
mov bl, byte [ebp - 0x18]
mov byte [eax], bl
lea eax, [ebp - 0x1841c]
movzx ecx, bl
inc dword [ebp - 0x18424]
push ecx
push eax
push dword [ebp - 0x18424]
call fcn.00409b20
movzx eax, bl
mov dl, byte [ebp - 0x10]
add esp, 0xc
add dword [ebp - 0x18424], eax
mov eax, dword [ebp - 0x18424]
mov byte [eax], dl
inc dword [ebp - 0x18424]
cmp dword [ebp - 0x14], 0x100
jge 0x406b95
mov bl, byte [ebp - 0x14]
jmp 0x406b97
mov bl, 0xff
mov eax, dword [ebp - 0x18424]
mov byte [eax], bl
lea eax, [ebp - 0x1801c]
movzx ecx, bl
inc dword [ebp - 0x18424]
push ecx
push eax
push dword [ebp - 0x18424]
call fcn.00409b20
movzx eax, bl
add esp, 0xc
add dword [ebp - 0x18424], eax
inc dword [ebp - 0x18420]
jmp 0x406a74
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0xc], 1
je 0x406bed
cmp dword [ebp + 0xc], 0x32
je 0x406bed
cmp dword [ebp + 0xc], 0xb
jne 0x406bfc
lea eax, [ebp - 0x1841c]
push eax
push edi
call fcn.004098e0
pop ecx
pop ecx
test ebx, ebx
je 0x406c07
mov eax, 0xffffffff
jmp 0x406c0f
mov eax, dword [ebp - 0x18424]
sub eax, edi
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret