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

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x28c
mov eax, dword [edi]
mov dword [ebp - 0x248], edx
mov dword [ebp - 0x254], ecx
mov dword [ebp - 0x258], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x250], eax
lea eax, [esi + 8]
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
je 0x401b58
cmp eax, 2
je 0x401b44
mov dword [esp], 0x6b
call sym._output_message
lea esp, [ebp - 0xc]
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
cmp ebx, 2
jne 0x401b0e
mov dword [esp], 0x6e
call sym._output_message
jmp 0x401b1a
lea eax, [ebp - 0x22c]
mov dword [esp + 0x20], eax
mov edi, dword [ebp - 0x248]
mov dword [esp + 0x18], 0
lea eax, [edi + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x254]
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 0x401b30
lea eax, [ebp - 0x238]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x240]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x244]
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
je 0x401ca0
mov dword [ebp - 0x24c], 0
xor ebx, ebx
mov edx, dword [sym.imp.ucrtbase.dll_free]
cmp eax, 0x103
setne bl
xor edi, edi
mov dword [esp], edi
mov dword [ebp - 0x250], edx
call edx
mov eax, dword [ebp - 0x24c]
mov dword [esp], eax
mov edx, dword [ebp - 0x250]
call edx
mov eax, dword [esi + 8]
mov esi, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x248]
sub esp, 4
mov eax, dword [eax + 8]
mov dword [esp], eax
call esi
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov ebx, dword [ebp - 0x240]
mov eax, dword [ebp - 0x244]
cmp ebx, eax
cmovb ebx, eax
add ebx, 1
lea eax, [ebx + ebx]
mov dword [ebp - 0x240], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x25c], eax
call eax
mov edi, eax
test eax, eax
je 0x402226
mov edx, dword [ebp - 0x238]
mov dword [esp], edx
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x260], edx
call eax
mov dword [ebp - 0x24c], eax
test eax, eax
je 0x402160
xor ecx, ecx
mov eax, ebx
mov edx, dword [ebp - 0x260]
mov ebx, ecx
jmp 0x401d5d
mov edx, dword [ebp - 0x234]
mov dword [esp + 0x14], edx
mov ecx, dword [ebp - 0x24c]
mov dword [esp + 0x10], ecx
mov edx, dword [ebp - 0x230]
mov dword [esp + 8], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
test eax, eax
jne 0x402170
mov eax, dword [ebp - 0x240]
mov edx, dword [ebp - 0x238]
add ebx, 1
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x234]
mov dword [ebp - 0x234], edx
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x24c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x230]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x23c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
cmp eax, 0x103
je 0x401ff0
test eax, eax
jne 0x402160
mov eax, dword [ebp - 0x248]
mov edx, dword [ebp - 0x250]
mov eax, dword [eax + 8]
test edx, edx
jne 0x401d10
cmp dword [ebp - 0x22c], 2
jne 0x401d10
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
je 0x401e30
mov eax, dword [ebp - 0x248]
mov eax, dword [eax + 8]
jmp 0x401d10
mov dword [ebp - 0x268], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x264], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov ecx, dword [0x40d2dc]
sub esp, 4
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x40c050
mov dword [esp + 4], 0x64
mov dword [ebp - 0x250], eax
mov dword [esp], eax
mov dword [ebp - 0x260], ecx
call ecx
sub esp, 0x10
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x40c048
mov dword [esp + 4], 0x65
mov eax, dword [ebp - 0x250]
mov dword [esp], eax
mov ecx, dword [ebp - 0x260]
call ecx
sub esp, 0x10
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x40c040
mov dword [esp + 4], 0x66
mov eax, dword [ebp - 0x250]
mov dword [esp], eax
mov ecx, dword [ebp - 0x260]
call ecx
sub esp, 0x10
mov dword [esp + 0xc], 0x20
mov dword [esp + 8], 0x40c000
mov dword [esp + 4], 0x70
mov eax, dword [ebp - 0x250]
mov dword [esp], eax
mov ecx, dword [ebp - 0x260]
call ecx
mov eax, section..bss
mov dword [ebp - 0x250], ebx
mov ebx, dword [ebp - 0x264]
sub esp, 0x10
cmp word [edi], 0
mov dword [ebp - 0x260], edi
cmovne eax, edi
mov edi, eax
jmp 0x401f4a
cmp ax, word [0x40c048]
je 0x4021c7
cmp ax, word [0x40c040]
je 0x4021e2
mov dword [esp + 8], edi
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 - 0x228]
sub esp, 4
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x218]
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 - 0x218]
sub esp, 0x14
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
mov word [ebp - 0x218], ax
cmp ax, word [0x40c050]
jne 0x401f30
mov edx, dword [ebp - 0x268]
mov ebx, dword [ebp - 0x250]
mov edi, dword [ebp - 0x260]
mov dword [ebp - 0x250], edx
jmp 0x401e1b
mov ecx, dword [ebp - 0x258]
mov edx, dword [sym.imp.ucrtbase.dll_free]
xor ebx, ebx
test ecx, ecx
je 0x401c4a
mov dword [ebp - 0x264], edx
lea esi, [esi]
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x23c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x4021f8
movd xmm0, dword [esi + 8]
movd xmm1, edi
mov eax, dword [ebp - 0x248]
mov edx, dword [esi + 0xc]
punpckldq xmm0, xmm1
movq qword [ebp - 0x228], xmm0
movd xmm0, dword [eax + 8]
punpckldq xmm0, xmm1
movq qword [ebp - 0x218], xmm0
cmp word [edx], 0
je 0x4021c0
mov eax, edx
add eax, 2
cmp word [eax], 0
jne 0x4020a0
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x23c]
mov dword [ebp - 0x260], edx
lea ecx, [eax + ecx + 2]
lea eax, [ecx + ecx]
mov dword [ebp - 0x258], ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x25c]
call eax
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x40223e
mov dword [esp + 0x10], edi
mov edx, dword [ebp - 0x260]
mov dword [esp + 8], 0x40a0d4
mov dword [esp + 0xc], edx
mov ecx, dword [ebp - 0x258]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._swprintf.constprop.0
mov eax, dword [ebp - 0x250]
mov dword [esp], 1
lea edx, [ebp - 0x218]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x254]
lea eax, [ebp - 0x228]
call sym._run_copy
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x258], eax
mov dword [esp], edx
mov eax, dword [ebp - 0x264]
call eax
mov eax, dword [ebp - 0x258]
test eax, eax
jne 0x40220d
add ebx, 1
jmp 0x402010
mov edx, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
jmp 0x401c4a
cmp eax, 2
je 0x4021a2
mov dword [ebp - 0x250], eax
xor ebx, ebx
mov dword [esp], 0x6b
call sym._output_message
mov eax, dword [ebp - 0x250]
mov edx, dword [sym.imp.ucrtbase.dll_free]
cmp eax, 0x103
setne bl
jmp 0x401c4a
mov dword [esp], 0x6e
mov ebx, 1
call sym._output_message
mov edx, dword [sym.imp.ucrtbase.dll_free]
jmp 0x401c4a
xor eax, eax
jmp 0x4020ad
mov ebx, dword [ebp - 0x250]
mov edi, dword [ebp - 0x260]
mov dword [ebp - 0x250], 0
jmp 0x401d4e
mov ebx, dword [ebp - 0x250]
mov edi, dword [ebp - 0x260]
mov edx, 1
jmp 0x401fe0
xor ebx, ebx
cmp eax, 0x103
mov edx, dword [ebp - 0x264]
setne bl
jmp 0x401c4a
mov edx, dword [ebp - 0x264]
mov ebx, eax
cmp ebx, 0x103
setne bl
movzx ebx, bl
jmp 0x401c4a
xor eax, eax
mov edx, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
mov dword [ebp - 0x24c], eax
jmp 0x401c4a
mov edx, dword [ebp - 0x264]
mov ebx, 8
jmp 0x402215