Function at 0x401a00
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
push ebx
add eax, 8
sub esp, 0x2ac
mov dword [esp + 0x10], eax
mov eax, ecx
mov dword [ebp - 0x264], ecx
or eax, 0x20019
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call sym._RegOpenKeyExW_20
sub esp, 0x14
test eax, eax
je 0x401aa0
cmp eax, 2
je 0x401a83
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
mov eax, dword [esi + 8]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
cmp ebx, 2
jne 0x401a4b
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
lea eax, [ebp - 0x234]
xor ebx, ebx
mov dword [esp + 0x20], eax
lea eax, [edi + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x264]
mov dword [esp + 0x18], ebx
or eax, 0x2001f
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp + 4], eax
mov eax, dword [edi]
mov dword [esp], eax
call sym._RegCreateKeyExW_36
sub esp, 0x24
test eax, eax
mov ebx, eax
jne 0x401a70
xor eax, eax
xor edx, edx
mov dword [esp + 0x28], eax
lea eax, [ebp - 0x240]
xor ecx, ecx
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x248]
xor ebx, ebx
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x24c]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x2c], ebx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._RegQueryInfoKeyW_48
sub esp, 0x30
test eax, eax
je 0x401bc0
mov ebx, dword [sym.imp.ucrtbase.dll_free]
xor edx, edx
cmp eax, 0x103
setne dl
xor eax, eax
mov dword [ebp - 0x25c], eax
xor ecx, ecx
mov dword [ebp - 0x268], ecx
mov dword [ebp - 0x260], edx
mov eax, dword [ebp - 0x268]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x25c]
mov dword [esp], eax
call ebx
mov eax, dword [esi + 8]
mov dword [esp], eax
call sym._RegCloseKey_4
mov eax, dword [edi + 8]
sub esp, 4
mov dword [esp], eax
call sym._RegCloseKey_4
mov edx, dword [ebp - 0x260]
mov eax, edx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x24c]
cmp dword [ebp - 0x248], ebx
cmovae ebx, dword [ebp - 0x248]
inc ebx
mov dword [ebp - 0x248], ebx
lea eax, [ebx + ebx]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x26c], eax
call eax
mov dword [ebp - 0x268], eax
test eax, eax
je 0x40214b
mov edx, dword [ebp - 0x240]
mov eax, dword [ebp - 0x26c]
mov dword [esp], edx
mov dword [ebp - 0x260], edx
call eax
mov dword [ebp - 0x25c], eax
test eax, eax
je 0x402086
xor ecx, ecx
mov edx, dword [ebp - 0x260]
mov eax, ebx
mov dword [ebp - 0x260], edi
mov ebx, dword [ebp - 0x268]
mov edi, ecx
jmp 0x401c88
mov dword [esp + 4], ebx
mov edx, dword [ebp - 0x23c]
mov dword [esp], eax
mov ecx, dword [ebp - 0x25c]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x238]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
xor edx, edx
mov dword [esp + 8], edx
call sym._RegSetValueExW_24
sub esp, 0x18
test eax, eax
jne 0x4020a0
mov eax, dword [ebp - 0x248]
inc edi
mov edx, dword [ebp - 0x240]
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x23c]
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x25c]
mov dword [esp + 0x10], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
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 [esi + 8]
mov dword [ebp - 0x23c], edx
mov dword [esp], eax
call sym._RegEnumValueW_32
sub esp, 0x20
cmp eax, 0x103
je 0x401f10
test eax, eax
jne 0x402080
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x260]
test edx, edx
mov eax, dword [eax + 8]
jne 0x401c40
cmp dword [ebp - 0x234], 2
jne 0x401c40
mov dword [esp + 4], ebx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x14], edx
xor edx, edx
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sym._RegQueryValueExW_24
mov dword [ebp - 0x270], eax
sub esp, 0x18
test eax, eax
je 0x401d50
mov eax, dword [ebp - 0x260]
mov eax, dword [eax + 8]
jmp 0x401c40
mov dword [esp], 0
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x274], eax
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov edx, eax
mov dword [esp], edx
mov eax, 4
mov dword [esp + 0xc], eax
mov eax, 0x40c050
mov dword [esp + 8], eax
mov eax, 0x64
mov dword [esp + 4], eax
mov dword [ebp - 0x278], edx
call sym._LoadStringW_16
mov edx, 0x65
mov eax, 4
sub esp, 0x10
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x278]
mov dword [esp + 0xc], eax
mov eax, 0x40c048
mov dword [esp + 8], eax
mov dword [esp], edx
call sym._LoadStringW_16
mov edx, dword [ebp - 0x278]
mov eax, 0x40c040
mov ecx, 4
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, 0x66
mov dword [esp + 0xc], ecx
mov dword [esp], edx
mov dword [esp + 4], eax
call sym._LoadStringW_16
mov edx, dword [ebp - 0x278]
mov eax, 0x20
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, section..bss
mov dword [esp + 8], eax
mov eax, 0x70
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._LoadStringW_16
mov eax, section..bss
mov dword [ebp - 0x278], edi
mov dword [ebp - 0x27c], ebx
sub esp, 0x10
cmp word [ebx], 0
cmovne eax, ebx
mov ebx, dword [ebp - 0x274]
mov edi, eax
jmp 0x401e5e
movzx eax, word [0x40c048]
cmp eax, edx
je 0x402117
movzx eax, word [0x40c040]
cmp eax, edx
je 0x40212f
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 - 0x230]
xor edx, edx
sub esp, 4
mov dword [esp + 0xc], ecx
mov ecx, 0x104
mov dword [esp + 8], ecx
lea ecx, [ebp - 0x220]
mov dword [esp + 0x10], edx
mov dword [esp + 4], ecx
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]
cmp word [0x40c050], ax
mov word [ebp - 0x220], ax
movzx edx, ax
jne 0x401e40
mov edi, dword [ebp - 0x278]
mov ebx, dword [ebp - 0x27c]
mov eax, dword [ebp - 0x260]
mov ecx, dword [ebp - 0x270]
mov eax, dword [eax + 8]
mov dword [ebp + 0xc], ecx
jmp 0x401c40
mov eax, dword [ebp + 8]
xor ebx, ebx
xor edx, edx
mov edi, dword [ebp - 0x260]
mov dword [ebp - 0x260], ebx
mov ebx, dword [sym.imp.ucrtbase.dll_free]
test eax, eax
je 0x401b76
mov dword [ebp - 0x278], ebx
mov ebx, dword [ebp - 0x268]
lea esi, [esi]
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x248]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [ebp - 0x244], eax
xor eax, eax
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x244]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x260]
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov dword [esp], eax
call sym._RegEnumKeyExW_32
sub esp, 0x20
test eax, eax
jne 0x4020f8
mov dword [ebp - 0x22c], ebx
mov eax, dword [esi + 8]
mov dword [ebp - 0x21c], ebx
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x230], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x220], eax
cmp word [edx], 0
je 0x402110
mov eax, edx
nop
add eax, 2
cmp word [eax], 0
jne 0x401fc0
sub eax, edx
sar eax, 1
mov dword [ebp - 0x274], edx
mov ecx, dword [ebp - 0x244]
lea ecx, [eax + ecx + 2]
mov dword [ebp - 0x270], ecx
lea eax, [ecx + ecx]
mov dword [esp], eax
mov eax, dword [ebp - 0x26c]
call eax
mov dword [ebp - 0x224], eax
test eax, eax
je 0x402165
mov dword [esp + 0x10], ebx
mov edx, dword [ebp - 0x274]
mov dword [esp], eax
mov ecx, dword [ebp - 0x270]
mov dword [esp + 0xc], edx
mov edx, 0x409074
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call sym._swprintf.constprop.0
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x220]
mov dword [esp], 1
mov ecx, dword [ebp - 0x264]
mov dword [esp + 4], eax
lea eax, [ebp - 0x230]
call sym._run_copy
mov edx, dword [ebp - 0x224]
mov dword [esp], edx
mov dword [ebp - 0x270], eax
mov eax, dword [ebp - 0x278]
call eax
mov eax, dword [ebp - 0x270]
test eax, eax
jne 0x4020f8
inc dword [ebp - 0x260]
jmp 0x401f40
mov edi, dword [ebp - 0x260]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
jmp 0x401b76
cmp eax, 2
mov edi, dword [ebp - 0x260]
je 0x4020d8
mov dword [esp], 0x6b
mov dword [ebp - 0x260], eax
call sym._output_message
mov eax, dword [ebp - 0x260]
xor edx, edx
mov ebx, dword [sym.imp.ucrtbase.dll_free]
cmp eax, 0x103
setne dl
jmp 0x401b76
mov dword [esp], 0x6e
call sym._output_message
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
jmp 0x401b76
mov ebx, dword [ebp - 0x278]
xor edx, edx
cmp eax, 0x103
setne dl
jmp 0x401b76
xor eax, eax
jmp 0x401fcd
mov dword [ebp + 0xc], 0
mov edi, dword [ebp - 0x278]
mov ebx, dword [ebp - 0x27c]
jmp 0x401c7b
mov ecx, 1
mov edi, dword [ebp - 0x278]
mov dword [ebp - 0x270], ecx
mov ebx, dword [ebp - 0x27c]
jmp 0x401ef0
mov dword [ebp - 0x25c], 0
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov edx, 1
jmp 0x401b76
mov ebx, dword [ebp - 0x278]
mov eax, 8
jmp 0x4020fe