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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x28]
mov esi, 1
push ebx
sub esp, 0x7c
mov ebx, dword [ebp + 0xc]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dbg.parse_registry_key
test eax, eax
je 0x4010e6
cmp dword [ebp + 8], 3
jle 0x401370
xor esi, esi
mov dword [ebp - 0x44], 0
mov edi, 3
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x52], si
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp + 0xc], ebx
lea eax, [edi*4]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax + edi*4]
movzx eax, word [ebx]
and eax, 0xfffffffd
cmp ax, 0x2d
jne case.0x401281.1
lea esi, [ebx + 2]
mov dword [esp + 4], 0x409000
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x4011e8
mov ebx, dword [ebp - 0x3c]
test ebx, ebx
je 0x4010f0
mov ebx, dword [ebp + 0xc]
mov dword [esp], 0x69
mov esi, 1
call dbg.output_message
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsupr]
mov dword [esp], 0x6a
mov dword [esp + 4], eax
call dbg.output_message
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x3c], 1
add edi, 1
cmp dword [ebp + 8], edi
jg 0x401074
mov eax, dword [ebp - 0x4c]
mov ebx, dword [ebp + 0xc]
test eax, eax
setne al
test byte [ebp - 0x3c], al
jne 0x4010b9
cmp dword [ebp - 0x44], 0x300
je 0x4010b9
lea eax, [ebp - 0x20]
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x10], 0
or eax, 0x2001f
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
sub esp, 0x24
test eax, eax
jne 0x401565
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x401a06
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x40185c
mov ebx, dword [sym.imp.ucrtbase.dll__wcsicmp]
xor edi, edi
lea esi, [esi]
mov eax, dword [edi*8 + 0x4097c4]
mov dword [esp + 4], esi
mov dword [esp], eax
call ebx
test eax, eax
je 0x401468
add edi, 1
cmp edi, 9
jne 0x401198
mov eax, dword [ebp - 0x24]
mov esi, 1
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov eax, dword [ebp - 0x50]
sub esp, 4
mov dword [esp + 4], eax
mov dword [esp], 0xcc
call dbg.output_message
jmp 0x4010e6
mov dword [esp + 4], 0x409006
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x401220
mov eax, dword [ebp - 0x44]
test ah, 2
jne case.0x401281.1
or ah, 2
mov dword [ebp - 0x44], eax
jmp 0x4010f7
mov dword [esp + 4], 0x409014
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x401250
mov eax, dword [ebp - 0x44]
test ah, 1
jne case.0x401281.1
or ah, 1
mov dword [ebp - 0x44], eax
jmp 0x4010f7
movzx eax, word [ebx + 2]
test ax, ax
je case.0x401281.1
cmp word [ebx + 4], 0
jne case.0x401281.1
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towlower]
sub eax, 0x64
cmp ax, 0x12
ja case.0x401281.1
movzx eax, ax
jmp dword [eax*4 + 0x409024]
mov edx, dword [ebp - 0x50]
test edx, edx
jne case.0x401281.1
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x40]
add edi, 1
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x4010f7
jmp case.0x401281.1
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x40]
add edi, 1
cmp word [ebp - 0x52], 0
mov ecx, dword [eax + edx + 4]
jne case.0x401281.1
test ecx, ecx
je case.0x401281.1
movzx eax, word [ecx]
mov word [ebp - 0x52], ax
test ax, ax
je case.0x401281.1
mov eax, ecx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4012e8
sub eax, ecx
cmp eax, 2
je 0x4010f7
jmp case.0x401281.1
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
jne case.0x401281.1
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x40]
add edi, 1
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4010f7
jmp case.0x401281.1
mov eax, dword [ebp - 0x58]
test eax, eax
jne case.0x401281.1
mov dword [ebp - 0x58], 1
jmp 0x4010f7
mov eax, dword [ebp - 0x48]
test eax, eax
jne case.0x401281.1
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x40]
add edi, 1
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x4010f7
jmp case.0x401281.1
lea eax, [ebp - 0x20]
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x14], 0x2001f
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
sub esp, 0x24
test eax, eax
jne 0x401565
cmp dword [ebp - 0x20], 2
jne 0x4018fa
xor eax, eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x52], ax
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x40117f
mov eax, dword [ebp - 0x4c]
mov dword [esp], 0xcd
mov dword [esp + 4], eax
call dbg.ask_confirm
mov esi, eax
test eax, eax
jne 0x40117f
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
push edi
mov dword [esp], 0x6d
call dbg.output_message
jmp 0x4010e6
mov edi, dword [edi*8 + 0x4097c0]
mov esi, eax
cmp edi, 0xffffffff
je 0x4011b8
lea eax, [edi - 4]
cmp eax, 1
ja 0x40157b
mov esi, dword [ebp - 0x48]
test esi, esi
je 0x401962
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 0x40194a
mov eax, dword [ebp - 0x48]
cmp word [eax], 0x2d
je 0x40194a
cmp ebx, 0xffffffff
je 0x401998
mov dword [esp], 4
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x3c], 4
mov dword [eax], ebx
mov ecx, eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x10], ecx
mov dword [ebp - 0x3c], ecx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov ecx, dword [ebp - 0x3c]
sub esp, 0x18
mov esi, eax
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
test esi, esi
jne 0x401565
mov dword [esp], 0x6c
call dbg.output_message
jmp 0x4010e6
mov dword [esp], 0x6b
mov esi, 1
call dbg.output_message
jmp 0x4010e6
mov ecx, dword [ebp - 0x48]
test ecx, ecx
jne 0x40184c
cmp edi, 0xb
ja case.0x40158b.6
jmp dword [edi*4 + 0x409070]
mov dword [ebp - 0x3c], 2
xor ebx, ebx
mov dword [ebp - 0x48], 0x4090d0
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x48]
mov ecx, eax
xor eax, eax
jmp 0x4015bb
movzx ebx, word [edx + eax]
mov word [ecx + eax], bx
add eax, 2
test bx, bx
jne 0x4015b7
jmp 0x401503
mov dword [ebp - 0x48], 0x4090d0
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], edi
mov dword [esp], 0xcb
mov dword [esp + 8], eax
call dbg.output_message
mov dword [ebp - 0x3c], 0
xor ecx, ecx
jmp 0x401503
mov dword [ebp - 0x48], 0x4090d0
jmp case.0x401855.4
mov dword [ebp - 0x48], 0x4090d0
mov eax, dword [ebp - 0x48]
movzx ebx, word [eax]
test bx, bx
je 0x401985
add eax, 2
cmp word [eax], 0
jne 0x40161a
mov ecx, dword [ebp - 0x48]
mov edi, eax
sub edi, ecx
sar edi, 1
cmp eax, ecx
je 0x401985
mov eax, edi
mov ecx, 2
cdq
idiv ecx
lea eax, [edx + edi]
cdq
idiv ecx
mov dword [ebp - 0x3c], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, eax
test edi, 1
je 0x40168b
lea eax, [ebx - 0x30]
cmp ax, 9
jbe 0x4019da
lea eax, [ebx - 0x61]
cmp ax, 5
jbe 0x4019d2
lea eax, [ebx - 0x41]
cmp ax, 5
ja 0x4018cc
sub ebx, 0x37
mov byte [ecx], bl
mov esi, 1
cmp esi, 1
sbb eax, eax
add eax, 2
cmp eax, edi
jge 0x401958
lea eax, [edi - 2]
sub eax, esi
imul edi, esi, 0xfffffffe
add edi, dword [ebp - 0x48]
shr eax, 1
lea eax, [esi + eax + 1]
mov dword [ebp - 0x40], eax
jmp 0x40171c
lea edx, [eax - 0x61]
cmp dx, 5
jbe 0x401899
lea edx, [eax - 0x41]
sub eax, 0x37
cmp dx, 6
mov edx, 0xffffffff
cmovae eax, edx
movzx edx, word [edi + esi*4 + 2]
lea ebx, [edx - 0x30]
cmp bx, 9
jbe 0x401891
lea ebx, [edx - 0x61]
cmp bx, 5
jbe 0x4018a1
lea ebx, [edx - 0x41]
cmp bx, 5
ja 0x4018cc
sub edx, 0x37
cmp al, 0xff
je 0x4018cc
shl eax, 4
add esi, 1
or eax, edx
mov byte [ecx + esi - 1], al
cmp esi, dword [ebp - 0x40]
je 0x401958
movzx eax, word [edi + esi*4]
lea edx, [eax - 0x30]
cmp dx, 9
ja 0x4016b1
sub eax, 0x30
jmp 0x4016d0
mov dword [ebp - 0x48], 0x4090d0
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__wcstoui64]
mov esi, eax
mov eax, dword [ebp - 0x1c]
mov ebx, edx
cmp word [eax], 0
jne 0x40194a
cmp edx, 0xffffffff
je 0x401932
mov dword [esp], 8
mov edi, 0xb
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x3c], 8
mov dword [eax], esi
mov ecx, eax
mov dword [eax + 4], ebx
jmp 0x401503
mov dword [ebp - 0x48], 0x4090d0
mov edi, dword [ebp - 0x48]
movzx ebx, word [edi]
test bx, bx
je 0x4019e2
add edi, 2
cmp word [edi], 0
jne 0x4017bf
mov edx, edi
sub edx, dword [ebp - 0x48]
lea eax, [edx + 4]
mov edi, edx
mov dword [ebp - 0x3c], edx
mov dword [esp], eax
sar edi, 1
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x3c]
mov ecx, eax
test edx, edx
jle 0x4019f1
mov dword [ebp - 0x3c], edi
xor eax, eax
movzx edi, word [ebp - 0x52]
jmp 0x401834
mov word [ecx + eax*2], bx
test eax, eax
je 0x40181c
cmp word [ecx + eax*2 - 2], 0
jne 0x40181c
cmp word [ecx + eax*2], 0
je 0x40191b
cmp eax, 1
je 0x40191b
add esi, 1
lea edx, [eax + 1]
cmp dword [ebp - 0x3c], esi
jle 0x4019a9
mov eax, dword [ebp - 0x48]
movzx ebx, word [eax + esi*2]
mov eax, edx
test di, di
jne 0x40183f
cmp bx, 0x5c
je 0x4018a9
cmp bx, di
jne 0x4017f8
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x4017fc
cmp edi, 0xb
ja case.0x401855.6
jmp dword [edi*4 + 0x4090a0]
cmp dword [ebp - 0x48], 0
mov edi, 1
je 0x401901
mov eax, dword [ebp - 0x48]
movzx ebx, word [eax]
test bx, bx
je 0x4019fa
add eax, 2
cmp word [eax], 0
jne 0x40187a
sub eax, dword [ebp - 0x48]
add eax, 2
mov dword [ebp - 0x3c], eax
jmp 0x4015a2
sub edx, 0x30
jmp 0x4016ff
sub eax, 0x57
jmp 0x4016d0
sub edx, 0x57
jmp 0x4016ff
lea edx, [esi + 1]
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x48]
cmp word [edx + esi*2 + 2], 0x30
jne 0x4017f8
mov word [ecx + eax*2], 0
mov esi, dword [ebp - 0x40]
jmp 0x4017fc
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], 0xc9
call dbg.output_message
mov eax, dword [ebp - 0x24]
mov esi, 1
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x4010e6
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x3c], 2
xor ebx, ebx
mov edi, 1
mov dword [ebp - 0x48], 0x4090d0
jmp 0x4015a2
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], 0xca
call dbg.output_message
jmp 0x4018e1
cmp esi, 0xffffffff
jne 0x401784
call dword [sym.imp.ucrtbase.dll__errno]
cmp dword [eax], 0x22
jne 0x401784
mov dword [esp], 0xc8
call dbg.output_message
jmp 0x4018e1
mov edi, 3
jmp 0x401503
mov eax, dword [ebp - 0x24]
mov esi, 1
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
push ebx
mov dword [esp], 0xce
call dbg.output_message
jmp 0x4010e6
mov dword [ebp - 0x3c], 0
mov edi, 3
xor ecx, ecx
jmp 0x401503
call dword [sym.imp.ucrtbase.dll__errno]
cmp dword [eax], 0x22
jne 0x4014eb
jmp 0x40194a
mov word [ecx + edx*2], 0
cmp word [ecx + eax*2], 0
je 0x4019bf
lea edx, [eax + 2]
mov word [ecx + edx*2], 0
add edx, 1
mov edi, 7
lea eax, [edx + edx]
mov dword [ebp - 0x3c], eax
jmp 0x401503
sub ebx, 0x57
jmp 0x401684
sub ebx, 0x30
jmp 0x401684
mov dword [esp], 4
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, eax
mov word [ecx], 0
xor edx, edx
jmp 0x4019bf
mov dword [ebp - 0x3c], 2
jmp 0x4015a2
cmp dword [ebp - 0x20], 2
jne 0x40117f
jmp 0x4013e9