Function at 0x4067d0
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, 0x284
mov dword [ebp - 0x24c], 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 0x406c70
lea eax, [ebp - 0x228]
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
lea eax, [edi + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x24c]
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 0x406c40
lea eax, [ebp - 0x234]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x23c]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x240]
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 0x406c90
mov ebx, dword [ebp - 0x240]
cmp dword [ebp - 0x23c], ebx
cmovae ebx, dword [ebp - 0x23c]
inc ebx
lea eax, [ebx + ebx]
mov dword [ebp - 0x23c], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x258], eax
call eax
mov dword [ebp - 0x244], eax
test eax, eax
je 0x406f65
mov edx, dword [ebp - 0x234]
mov eax, dword [ebp - 0x258]
mov dword [esp], edx
mov dword [ebp - 0x250], edx
call eax
mov dword [ebp - 0x248], eax
test eax, eax
je 0x406e82
xor ecx, ecx
mov eax, ebx
mov edx, dword [ebp - 0x250]
mov ebx, esi
mov esi, ecx
jmp 0x4069bc
mov eax, dword [ebp - 0x230]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x248]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x22c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x244]
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 0x406ea0
mov eax, dword [ebp - 0x23c]
mov edx, dword [ebp - 0x234]
inc esi
mov dword [ebp - 0x238], eax
lea eax, [ebp - 0x230]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x248]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x22c]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x238]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x244]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x230], edx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
cmp eax, 0x103
je 0x406d10
test eax, eax
jne 0x406e80
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x406968
cmp dword [ebp - 0x228], 2
jne 0x406968
mov eax, dword [ebp - 0x244]
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 - 0x250], eax
sub esp, 0x18
test eax, eax
jne 0x406968
mov eax, dword [ebx + 0xc]
mov dword [esp], 0
mov dword [ebp - 0x260], eax
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov ecx, dword [0x40c2f4]
sub esp, 4
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x25c], 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 - 0x254]
mov ecx, dword [ebp - 0x25c]
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 - 0x254]
mov ecx, dword [ebp - 0x25c]
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 - 0x254]
mov ecx, dword [ebp - 0x25c]
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 - 0x244]
mov eax, 0x4080a0
mov dword [ebp - 0x254], esi
sub esp, 0x10
mov dword [ebp - 0x25c], ebx
mov ebx, dword [ebp - 0x260]
cmp word [ecx], 0
cmovne eax, ecx
mov esi, eax
jmp 0x406b9a
cmp ax, word [0x40802c]
je 0x406f07
cmp ax, word [0x408024]
je 0x406f1f
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 - 0x224]
sub esp, 4
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x214]
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 - 0x214]
sub esp, 0x14
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
mov word [ebp - 0x214], ax
cmp ax, word [0x408034]
jne 0x406b80
mov esi, dword [ebp - 0x254]
mov ebx, dword [ebp - 0x25c]
mov eax, dword [ebp - 0x250]
mov dword [ebp + 0xc], eax
jmp 0x406968
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
cmp ebx, 2
je 0x406c75
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 0x406c54
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 - 0x248], 0
xor edx, edx
cmp eax, 0x103
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x244], 0
setne dl
mov dword [ebp - 0x250], eax
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x24c], edx
mov ebx, dword [ebp - 0x250]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x248]
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 - 0x24c]
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 - 0x254], 0
mov dword [ebp - 0x250], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x406cb9
mov dword [ebp - 0x260], edi
mov edi, dword [ebp - 0x244]
lea esi, [esi]
mov eax, dword [ebp - 0x23c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [ebp - 0x238], eax
lea eax, [ebp - 0x238]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x254]
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 0x406f3a
mov eax, dword [esi + 8]
mov ebx, dword [esi + 0xc]
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x210], edi
mov dword [ebp - 0x224], eax
mov eax, dword [ebp - 0x260]
mov eax, dword [eax + 8]
mov dword [ebp - 0x214], eax
cmp word [ebx], 0
je 0x406f00
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x406dd0
sub eax, ebx
sar eax, 1
mov edx, dword [ebp - 0x238]
lea edx, [eax + edx + 2]
lea eax, [edx + edx]
mov dword [ebp - 0x25c], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x258]
call eax
mov dword [ebp - 0x218], eax
test eax, eax
je 0x406f84
mov edx, dword [ebp - 0x25c]
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 - 0x214]
mov ecx, dword [ebp - 0x24c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x224]
call sym._run_copy
mov ebx, eax
mov eax, dword [ebp - 0x218]
mov dword [esp], eax
mov eax, dword [ebp - 0x250]
call eax
test ebx, ebx
jne 0x406f4f
inc dword [ebp - 0x254]
jmp 0x406d40
mov esi, ebx
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
mov dword [ebp - 0x250], eax
jmp 0x406cb9
mov esi, ebx
cmp eax, 2
je 0x406ed9
mov dword [esp], 0x6b
mov dword [ebp - 0x24c], eax
call sym._output_message
mov eax, dword [ebp - 0x24c]
xor edx, edx
cmp eax, 0x103
mov eax, dword [sym.imp.ucrtbase.dll_free]
setne dl
mov dword [ebp - 0x250], eax
jmp 0x406cb9
mov dword [esp], 0x6e
call sym._output_message
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
mov dword [ebp - 0x250], eax
jmp 0x406cb9
xor eax, eax
jmp 0x406ddd
mov dword [ebp + 0xc], 0
mov esi, dword [ebp - 0x254]
mov ebx, dword [ebp - 0x25c]
jmp 0x4069af
mov dword [ebp - 0x250], 1
mov esi, dword [ebp - 0x254]
mov ebx, dword [ebp - 0x25c]
jmp 0x406c2a
xor edx, edx
cmp eax, 0x103
mov edi, dword [ebp - 0x260]
setne dl
jmp 0x406cb9
mov edi, dword [ebp - 0x260]
xor edx, edx
cmp ebx, 0x103
setne dl
jmp 0x406cb9
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x250], eax
jmp 0x406cb9
mov edi, dword [ebp - 0x260]
mov ebx, 8
jmp 0x406f55