Function at 0x401000
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x28]
sub esp, 0x7c
mov dword [esp + 8], eax
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym._parse_registry_key
test eax, eax
je 0x401228
cmp dword [ebp + 8], 3
jle 0x4013a0
mov dword [ebp - 0x44], 0
mov edi, 3
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp + 0xc], ebx
mov ecx, dword [ebp + 0xc]
lea eax, [edi*4]
mov dword [ebp - 0x40], eax
mov ebx, dword [ecx + eax]
movzx eax, word [ebx]
and eax, 0xfffd
cmp eax, 0x2d
jne case.0x4012a9.101
lea esi, [ebx + 2]
mov edx, section..rdata
mov dword [esp + 4], edx
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x4011f0
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4010f0
mov ebx, dword [ebp + 0xc]
mov dword [esp], 0x69
call sym._output_message
mov eax, dword [ebx + 4]
mov ebx, 1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsupr]
mov dword [esp], 0x6a
mov dword [esp + 4], eax
call sym._output_message
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x3c], 1
inc edi
cmp dword [ebp + 8], edi
jg 0x401070
mov edx, dword [ebp - 0x4c]
movzx eax, byte [ebp - 0x3c]
mov ebx, dword [ebp + 0xc]
test edx, edx
setne dl
and al, 1
test dl, al
jne 0x4010b7
cmp dword [ebp - 0x44], 0x300
je 0x4010b7
mov dword [esp + 0x18], 0
lea eax, [ebp - 0x20]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
or eax, 0x2001f
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._RegCreateKeyExW_36
sub esp, 0x24
test eax, eax
jne 0x401582
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x40199a
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x401908
mov ebx, dword [sym.imp.ucrtbase.dll__wcsicmp]
xor edi, edi
lea esi, [esi]
lea edi, [edi]
mov dword [esp + 4], esi
mov eax, dword [edi*8 + 0x409764]
mov dword [esp], eax
call ebx
test eax, eax
je 0x401488
inc edi
cmp edi, 8
jne 0x4011a0
mov eax, dword [ebp - 0x24]
mov ebx, 1
mov dword [esp], eax
call sym._RegCloseKey_4
mov eax, dword [ebp - 0x50]
sub esp, 4
mov dword [esp + 4], eax
mov dword [esp], 0xcc
call sym._output_message
jmp 0x4010e4
mov dword [esp], esi
mov eax, 0x409006
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x401240
mov eax, dword [ebp - 0x44]
test ah, 2
jne case.0x4012a9.101
or eax, 0x200
mov dword [ebp - 0x44], eax
jmp 0x4010f7
lea esp, [ebp - 0xc]
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
mov eax, 0x409014
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x401278
mov eax, dword [ebp - 0x44]
test ah, 1
jne case.0x4012a9.101
or eax, 0x100
mov dword [ebp - 0x44], eax
jmp 0x4010f7
movzx eax, word [ebx + 2]
test eax, eax
je case.0x4012a9.101
cmp word [ebx + 4], 0
jne case.0x4012a9.101
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towlower]
sub ax, 0x64
cmp ax, 0x12
movzx edx, ax
ja case.0x4012a9.101
jmp dword [edx*4 + 0x409024]
mov eax, dword [ebp - 0x50]
test eax, eax
jne case.0x4012a9.101
mov eax, dword [ebp + 0xc]
inc edi
mov edx, dword [ebp - 0x40]
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x4010f7
jmp case.0x4012a9.101
mov ebx, dword [ebp - 0x54]
inc edi
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x40]
test ebx, ebx
mov edx, dword [eax + edx + 4]
jne case.0x4012a9.101
test edx, edx
je case.0x4012a9.101
movzx eax, word [edx]
mov dword [ebp - 0x54], eax
test eax, eax
je case.0x4012a9.101
mov eax, edx
nop
add eax, 2
cmp word [eax], 0
jne 0x401310
sub eax, edx
cmp eax, 2
je 0x4010f7
jmp case.0x4012a9.101
mov eax, dword [ebp - 0x4c]
test eax, eax
jne case.0x4012a9.101
mov eax, dword [ebp + 0xc]
inc edi
mov edx, dword [ebp - 0x40]
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4010f7
jmp case.0x4012a9.101
mov ecx, dword [ebp - 0x58]
test ecx, ecx
jne case.0x4012a9.101
mov dword [ebp - 0x58], 1
jmp 0x4010f7
mov esi, dword [ebp - 0x48]
test esi, esi
jne case.0x4012a9.101
mov eax, dword [ebp + 0xc]
inc edi
mov edx, dword [ebp - 0x40]
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x4010f7
jmp case.0x4012a9.101
lea eax, [ebp - 0x20]
xor ecx, ecx
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x24]
mov edx, 0x2001f
mov dword [esp + 0x1c], eax
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x28]
xor esi, esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], esi
mov dword [esp], eax
call sym._RegCreateKeyExW_36
sub esp, 0x24
test eax, eax
jne 0x401582
cmp dword [ebp - 0x20], 2
jne 0x4018c7
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
xor eax, eax
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 [ebp - 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._RegQueryValueExW_24
sub esp, 0x18
test eax, eax
jne 0x401181
mov dword [esp], 0xcd
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], eax
call sym._ask_confirm
test eax, eax
mov ebx, eax
jne 0x401181
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._RegCloseKey_4
push edi
mov dword [esp], 0x6d
call sym._output_message
jmp 0x4010e4
mov esi, eax
mov eax, dword [edi*8 + 0x409760]
mov dword [ebp - 0x3c], eax
inc eax
je 0x4011be
mov eax, dword [ebp - 0x3c]
sub eax, 4
cmp eax, 1
ja 0x401598
mov esi, dword [ebp - 0x48]
test esi, esi
je 0x40191b
mov esi, dword [ebp - 0x48]
movzx eax, word [esi + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towlower]
mov edx, 0xa
mov dword [esp], esi
cmp ax, 0x78
mov eax, 0x10
cmovne eax, edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_wcstoul]
mov ebx, eax
mov eax, dword [ebp - 0x1c]
cmp word [eax], 0
jne 0x4018f7
mov eax, dword [ebp - 0x48]
cmp word [eax], 0x2d
je 0x4018f7
cmp ebx, 0xffffffff
je 0x4018e8
mov dword [esp], 4
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x40], 4
mov dword [eax], ebx
mov edi, eax
mov dword [esp + 0x10], edi
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._RegSetValueExW_24
sub esp, 0x18
mov ebx, eax
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
test ebx, ebx
jne 0x401582
mov dword [esp], 0x6c
call sym._output_message
jmp 0x4010e4
mov dword [esp], 0x6b
mov ebx, 1
call sym._output_message
jmp 0x4010e4
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x3c]
test ecx, ecx
jne 0x4015c8
cmp eax, 7
je 0x401982
ja 0x40177c
cmp eax, 3
jne 0x401890
mov dword [ebp - 0x40], 0
xor edi, edi
jmp 0x401527
cmp eax, 7
je 0x4017c4
ja 0x4016fd
cmp eax, 3
jne 0x4016fb
mov eax, dword [ebp - 0x48]
movzx ebx, word [eax]
test ebx, ebx
je 0x4015ba
mov eax, dword [ebp - 0x48]
add eax, 2
cmp word [eax], 0
jne 0x4015ed
mov edx, dword [ebp - 0x48]
mov ecx, eax
sub ecx, edx
sar ecx, 1
cmp eax, edx
je 0x4015ba
mov dword [ebp - 0x44], ecx
mov eax, ecx
mov edi, 2
cdq
idiv edi
add edx, ecx
mov eax, edx
cdq
idiv edi
mov dword [esp], eax
mov dword [ebp - 0x40], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x44]
test cl, 1
mov edi, eax
je 0x40165e
lea eax, [ebx - 0x30]
cmp ax, 9
jbe 0x40196e
lea eax, [ebx - 0x61]
cmp ax, 5
jbe 0x401966
lea eax, [ebx - 0x41]
cmp ax, 5
ja 0x401797
sub bl, 0x37
mov byte [edi], bl
mov esi, 1
cmp esi, 1
sbb eax, eax
add eax, 2
cmp eax, ecx
jge 0x401527
lea eax, [ecx - 2]
imul ebx, esi, 0xfffffffe
sub eax, esi
shr eax, 1
lea eax, [esi + eax + 1]
add ebx, dword [ebp - 0x48]
mov dword [ebp - 0x44], eax
jmp 0x4016ea
lea edx, [eax - 0x61]
cmp dx, 5
jbe 0x401790
lea edx, [eax - 0x41]
cmp dx, 5
ja 0x4018c0
sub al, 0x37
movzx edx, word [ebx + esi*4 + 2]
lea ecx, [edx - 0x30]
cmp cx, 9
jbe 0x401774
lea ecx, [edx - 0x61]
cmp cx, 5
jbe 0x401788
lea ecx, [edx - 0x41]
cmp cx, 5
ja 0x401797
sub dl, 0x37
cmp al, 0xff
je 0x401797
shl al, 4
inc esi
or al, dl
cmp esi, dword [ebp - 0x44]
mov byte [edi + esi - 1], al
je 0x401527
movzx eax, word [ebx + esi*4]
lea edx, [eax - 0x30]
cmp dx, 9
ja 0x401684
sub al, 0x30
jmp 0x4016a0
jbe 0x401725
mov dword [esp], 0xcb
mov eax, dword [ebp - 0x48]
xor edi, edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call sym._output_message
mov dword [ebp - 0x40], 0
jmp 0x401527
je 0x4016fd
mov eax, dword [ebp - 0x48]
cmp word [eax], 0
je 0x401976
add eax, 2
cmp word [eax], 0
jne 0x401734
mov edx, dword [ebp - 0x48]
sub eax, edx
add eax, 2
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x48]
mov edi, eax
xor eax, eax
nop
lea esi, [esi]
movzx edx, word [ecx + eax]
mov word [edi + eax], dx
add eax, 2
test edx, edx
jne 0x401760
jmp 0x401527
sub dl, 0x30
jmp 0x4016cf
mov dword [ebp - 0x48], 0x409070
jmp 0x4016fd
sub dl, 0x57
jmp 0x4016cf
sub al, 0x57
jmp 0x4016a0
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], 0xc9
call sym._output_message
mov eax, dword [ebp - 0x24]
mov ebx, 1
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
jmp 0x4010e4
mov eax, dword [ebp - 0x48]
movzx ebx, word [eax]
test ebx, ebx
je 0x401982
mov edx, dword [ebp - 0x48]
add edx, 2
cmp word [edx], 0
jne 0x4017d5
mov eax, dword [ebp - 0x48]
sub edx, eax
mov dword [ebp - 0x3c], edx
lea eax, [edx + 4]
mov ecx, edx
mov dword [esp], eax
sar ecx, 1
mov dword [ebp - 0x40], ecx
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x3c]
test edx, edx
mov edi, eax
jle 0x401991
mov ecx, dword [ebp - 0x40]
xor eax, eax
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x54]
jmp 0x401845
mov word [edi + eax*2], bx
test eax, eax
je 0x40182f
cmp word [edi + eax*2 - 2], 0
jne 0x40182f
cmp word [edi + eax*2], 0
je 0x401876
cmp eax, 1
je 0x401876
lea edx, [eax + 1]
inc esi
cmp dword [ebp - 0x3c], esi
jle 0x40193d
mov eax, dword [ebp - 0x48]
movzx ebx, word [eax + esi*2]
mov eax, edx
test ecx, ecx
jne 0x40184e
cmp ebx, 0x5c
je 0x40185a
cmp ebx, ecx
jne 0x401813
mov word [edi + eax*2], 0
jmp 0x401817
lea edx, [esi + 1]
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x48]
cmp word [edx + esi*2 + 2], 0x30
jne 0x401813
mov word [edi + eax*2], 0
mov esi, dword [ebp - 0x40]
jmp 0x401817
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], 0xca
call sym._output_message
jmp 0x4017ac
ja 0x40177c
lea esi, [esi]
lea edi, [edi]
je 0x40177c
mov dword [ebp - 0x40], 2
mov dword [ebp - 0x48], 0x409070
jmp 0x401748
mov al, 0xff
jmp 0x4016a0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x40], 2
mov dword [ebp - 0x48], 0x409070
mov dword [ebp - 0x3c], 1
jmp 0x401748
call dword [sym.imp.ucrtbase.dll__errno]
cmp dword [eax], 0x22
jne 0x40150f
mov dword [esp], 0xc8
call sym._output_message
jmp 0x4017ac
cmp dword [ebp - 0x48], 0
mov dword [ebp - 0x3c], 1
jne 0x401727
jmp 0x4018ce
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._RegCloseKey_4
push ebx
mov ebx, 1
mov dword [esp], 0xce
call sym._output_message
jmp 0x4010e4
mov word [edi + edx*2], 0
cmp word [edi + eax*2], 0
je 0x401953
lea edx, [eax + 2]
mov word [edi + edx*2], 0
mov dword [ebp - 0x3c], 7
inc edx
lea eax, [edx + edx]
mov dword [ebp - 0x40], eax
jmp 0x401527
sub bl, 0x57
jmp 0x401657
sub bl, 0x30
jmp 0x401657
mov dword [ebp - 0x40], 2
jmp 0x401748
mov dword [esp], 4
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
mov word [edi], 0
xor edx, edx
jmp 0x401953
cmp dword [ebp - 0x20], 2
jne 0x401181
jmp 0x401412