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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, eax
add eax, 8
push ebx
sub esp, 0x29c
mov dword [ebp - 0x264], ecx
mov dword [esp + 0x10], eax
mov eax, ecx
or eax, 0x20019
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
jne 0x406d40
lea eax, [ebp - 0x234]
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
lea eax, [edi + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x264]
mov dword [esp + 0x10], 0
or eax, 0x2001f
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov dword [esp + 8], 0
mov eax, dword [edi + 4]
mov dword [esp + 4], eax
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
sub esp, 0x24
mov ebx, eax
test eax, eax
jne 0x406d10
lea eax, [ebp - 0x240]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x248]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x24c]
mov dword [esp + 0x28], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
sub esp, 0x30
test eax, eax
jne 0x406d60
mov ebx, dword [ebp - 0x24c]
cmp dword [ebp - 0x248], ebx
cmovae ebx, dword [ebp - 0x248]
inc ebx
lea eax, [ebx + ebx]
mov dword [ebp - 0x248], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x270], eax
call eax
mov dword [ebp - 0x25c], eax
test eax, eax
je 0x407035
mov edx, dword [ebp - 0x240]
mov eax, dword [ebp - 0x270]
mov dword [esp], edx
mov dword [ebp - 0x268], edx
call eax
mov dword [ebp - 0x260], eax
test eax, eax
je 0x406f52
xor ecx, ecx
mov eax, ebx
mov edx, dword [ebp - 0x268]
mov ebx, esi
mov esi, ecx
jmp 0x406a8c
mov eax, dword [ebp - 0x23c]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x260]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x238]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x25c]
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
test eax, eax
jne 0x406f70
mov eax, dword [ebp - 0x248]
mov edx, dword [ebp - 0x240]
inc esi
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x23c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x260]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x238]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x244]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x25c]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x23c], edx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
cmp eax, 0x103
je 0x406de0
test eax, eax
jne 0x406f50
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x406a38
cmp dword [ebp - 0x234], 2
jne 0x406a38
mov eax, dword [ebp - 0x25c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov dword [ebp - 0x268], eax
sub esp, 0x18
test eax, eax
jne 0x406a38
mov eax, dword [ebx + 0xc]
mov dword [esp], 0
mov dword [ebp - 0x278], eax
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov ecx, dword [0x40c2f4]
sub esp, 4
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x274], ecx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x408034
mov dword [esp + 4], 0x64
mov dword [esp], eax
call ecx
mov eax, dword [ebp - 0x26c]
mov ecx, dword [ebp - 0x274]
sub esp, 0x10
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x40802c
mov dword [esp + 4], 0x65
mov dword [esp], eax
call ecx
mov eax, dword [ebp - 0x26c]
mov ecx, dword [ebp - 0x274]
sub esp, 0x10
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x408024
mov dword [esp + 4], 0x66
mov dword [esp], eax
call ecx
mov eax, dword [ebp - 0x26c]
mov ecx, dword [ebp - 0x274]
sub esp, 0x10
mov dword [esp + 0xc], 0x20
mov dword [esp + 8], 0x4080a0
mov dword [esp + 4], 0x70
mov dword [esp], eax
call ecx
mov ecx, dword [ebp - 0x25c]
mov eax, 0x4080a0
mov dword [ebp - 0x26c], esi
sub esp, 0x10
mov dword [ebp - 0x274], ebx
mov ebx, dword [ebp - 0x278]
cmp word [ecx], 0
cmovne eax, ecx
mov esi, eax
jmp 0x406c6a
cmp ax, word [0x40802c]
je 0x406fd7
cmp ax, word [0x408024]
je 0x406fef
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], 0xfb
call sym._output_message
mov dword [esp], 0x68
call sym._output_message
mov dword [esp], 0xfffffff6
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea ecx, [ebp - 0x230]
sub esp, 4
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x220]
mov dword [esp + 4], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x104
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadConsoleW]
movzx eax, word [ebp - 0x220]
sub esp, 0x14
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
mov word [ebp - 0x220], ax
cmp ax, word [0x408034]
jne 0x406c50
mov esi, dword [ebp - 0x26c]
mov ebx, dword [ebp - 0x274]
mov eax, dword [ebp - 0x268]
mov dword [ebp + 0xc], eax
jmp 0x406a38
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
cmp ebx, 2
je 0x406d45
mov dword [esp], 0x6b
call sym._output_message
lea esp, [ebp - 0xc]
mov edx, 1
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret
cmp eax, 2
jne 0x406d24
mov dword [esp], 0x6e
call sym._output_message
lea esp, [ebp - 0xc]
mov edx, 1
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x260], 0
xor edx, edx
cmp eax, 0x103
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x25c], 0
setne dl
mov dword [ebp - 0x268], eax
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x264], edx
mov ebx, dword [ebp - 0x268]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x260]
mov dword [esp], eax
call ebx
mov eax, dword [esi + 8]
mov ebx, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [esp], eax
call ebx
mov eax, dword [edi + 8]
sub esp, 4
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x264]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov esi, ebx
xor edx, edx
mov dword [ebp - 0x26c], 0
mov dword [ebp - 0x268], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x406d89
mov dword [ebp - 0x278], edi
mov edi, dword [ebp - 0x25c]
lea esi, [esi]
mov eax, dword [ebp - 0x248]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x244]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x26c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x40700a
mov eax, dword [esi + 8]
mov ebx, dword [esi + 0xc]
mov dword [ebp - 0x22c], edi
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x230], eax
mov eax, dword [ebp - 0x278]
mov eax, dword [eax + 8]
mov dword [ebp - 0x220], eax
cmp word [ebx], 0
je 0x406fd0
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x406ea0
sub eax, ebx
sar eax, 1
mov edx, dword [ebp - 0x244]
lea edx, [eax + edx + 2]
lea eax, [edx + edx]
mov dword [ebp - 0x274], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x270]
call eax
mov dword [ebp - 0x224], eax
test eax, eax
je 0x407054
mov edx, dword [ebp - 0x274]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 4], edx
mov dword [esp + 8], 0x4090d0
mov dword [esp], eax
call sym._swprintf.constprop.0
mov eax, dword [ebp + 0xc]
mov dword [esp], 1
lea edx, [ebp - 0x220]
mov ecx, dword [ebp - 0x264]
mov dword [esp + 4], eax
lea eax, [ebp - 0x230]
call sym._run_copy
mov ebx, eax
mov eax, dword [ebp - 0x224]
mov dword [esp], eax
mov eax, dword [ebp - 0x268]
call eax
test ebx, ebx
jne 0x40701f
inc dword [ebp - 0x26c]
jmp 0x406e10
mov esi, ebx
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
mov dword [ebp - 0x268], eax
jmp 0x406d89
mov esi, ebx
cmp eax, 2
je 0x406fa9
mov dword [esp], 0x6b
mov dword [ebp - 0x264], eax
call sym._output_message
mov eax, dword [ebp - 0x264]
xor edx, edx
cmp eax, 0x103
mov eax, dword [sym.imp.ucrtbase.dll_free]
setne dl
mov dword [ebp - 0x268], eax
jmp 0x406d89
mov dword [esp], 0x6e
call sym._output_message
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
mov dword [ebp - 0x268], eax
jmp 0x406d89
xor eax, eax
jmp 0x406ead
mov dword [ebp + 0xc], 0
mov esi, dword [ebp - 0x26c]
mov ebx, dword [ebp - 0x274]
jmp 0x406a7f
mov dword [ebp - 0x268], 1
mov esi, dword [ebp - 0x26c]
mov ebx, dword [ebp - 0x274]
jmp 0x406cfa
xor edx, edx
cmp eax, 0x103
mov edi, dword [ebp - 0x278]
setne dl
jmp 0x406d89
mov edi, dword [ebp - 0x278]
xor edx, edx
cmp ebx, 0x103
setne dl
jmp 0x406d89
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
mov dword [ebp - 0x260], 0
mov dword [ebp - 0x268], eax
jmp 0x406d89
mov edi, dword [ebp - 0x278]
mov ebx, 8
jmp 0x407025