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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4c
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 8]
mov eax, 0xc
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ecx + eax - 0xc], 0
lea eax, [eax + 2]
jne 0x408c30
mov edi, 0xfffffffe
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp + 8]
add esp, 4
mov esi, eax
nop
cmp word [ecx + edi + 2], 0
lea edi, [edi + 2]
jne 0x408c50
sar edi, 1
add edi, 7
push ecx
push str._r_n__s__r_n
push edi
push esi
call sym._swprintf_3
add esp, 0x10
mov ecx, dword [ebp - 0x18]
mov edx, esi
push dword [ebp + 0xc]
call sym._REGPROC_write_line
add esp, 4
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov esi, dword [sym.imp.ucrtbase.dll_malloc]
push 0x200
call esi
add esp, 4
mov dword [ebp - 0x14], eax
push 0x800
call esi
add esp, 4
mov ecx, eax
mov edi, 0x100
mov ebx, 0x800
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x38], ebx
lea edx, [ebp - 0x38]
push edx
push ecx
lea ecx, [ebp - 0x58]
push ecx
push 0
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x14], eax
push eax
push dword [ebp - 0x40]
push dword [ebp - 0x30]
call dword [sym.imp.advapi32.dll_RegEnumValueW]
cmp eax, 0xea
jne 0x408d20
mov esi, dword [ebp - 0x38]
cmp esi, ebx
ja 0x408d90
lea esi, [edi + edi]
shl edi, 2
push edi
push dword [ebp - 0x14]
call dword [sym.imp.ucrtbase.dll_realloc]
add esp, 8
mov edi, esi
mov ecx, dword [ebp - 0x10]
jmp 0x408cc0
mov dword [ebp - 0x50], ebx
test eax, eax
jne 0x4091f2
mov esi, dword [ebp - 0x38]
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x14]
test edx, edx
mov dword [ebp - 0x24], esi
je 0x408db0
cmp word [edx], 0
je 0x408db0
mov ebx, dword [ebp - 0x48]
xor esi, esi
mov eax, 0
test ebx, ebx
je case.0x408d76.0
xor ecx, ecx
xor eax, eax
jmp 0x408d6d
inc eax
mov edx, dword [ebp - 0x14]
inc ecx
cmp ebx, ecx
je case.0x408d76.0
movzx edx, word [edx + ecx*2]
cmp edx, 0x22
ja case.default.0x408d76
jmp dword [edx*4 + 0x40dc4c]
cmp edx, 0x5c
je case.0x408d76.10
jmp case.0x408d76.1
push esi
push dword [ebp - 0x10]
call dword [sym.imp.ucrtbase.dll_realloc]
add esp, 8
mov ecx, eax
mov ebx, esi
jmp 0x408cba
mov ecx, dword [ebp - 0x18]
mov edx, 0x40df88
push dword [ebp + 0xc]
call sym._REGPROC_write_line
add esp, 4
mov dword [ebp - 0x3c], 2
cmp dword [ebp - 0x20], 4
je 0x408ef7
cmp dword [ebp - 0x20], 3
mov ebx, dword [ebp - 0x18]
je 0x408f6f
cmp dword [ebp - 0x20], 1
jne 0x408f2e
mov ebx, esi
test esi, esi
je 0x408df6
mov ebx, esi
shr ebx, 1
dec ebx
xor esi, esi
mov eax, 0
test ebx, ebx
mov edx, dword [ebp - 0x10]
je case.0x408e26.0
xor ecx, ecx
xor eax, eax
jmp 0x408e1d
inc eax
mov edx, dword [ebp - 0x10]
inc ecx
cmp ebx, ecx
je case.0x408e26.0
movzx edx, word [edx + ecx*2]
cmp edx, 0x22
ja case.default.0x408e26
jmp dword [edx*4 + 0x40dd64]
cmp edx, 0x5c
je case.0x408e26.10
jmp case.0x408e26.1
add eax, ebx
lea eax, [eax*2 + 2]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
test ebx, ebx
je case.0x408e81.0
xor edx, edx
xor esi, esi
jmp 0x408e75
mov cx, 0x6e
mov word [eax + esi*2], 0x5c
inc esi
mov word [eax + esi*2], cx
inc edx
inc esi
cmp ebx, edx
je case.0x408e81.0
mov ecx, dword [ebp - 0x14]
movzx ecx, word [ecx + edx*2]
cmp ecx, 0x22
ja case.default.0x408e81
jmp dword [ecx*4 + 0x40dcd8]
mov cx, 0x72
jmp case.0x408e81.34
cmp ecx, 0x5c
je case.0x408e81.34
jmp case.0x408e81.1
mov word [eax + esi*2], 0
lea ecx, [esi*2 + 8]
push ecx
mov ebx, eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
add esi, 4
push ebx
push 0x40e048
push esi
mov esi, eax
push eax
call sym._swprintf_3
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x18]
mov edx, esi
push dword [ebp + 0xc]
call sym._REGPROC_write_line
add esp, 4
push esi
mov esi, dword [sym.imp.ucrtbase.dll_free]
call esi
add esp, 4
push ebx
call esi
add esp, 4
mov esi, dword [ebp - 0x24]
cmp dword [ebp - 0x20], 4
jne 0x408dd4
cmp esi, 4
mov ebx, dword [ebp - 0x18]
jne 0x408f2e
push 0x1e
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x10]
push dword [eax]
push str.dword:_08x
push 0xf
push esi
call sym._swprintf_3
mov eax, esi
mov ecx, dword [ebp - 0x18]
add esp, 0x10
mov esi, dword [ebp + 0xc]
jmp 0x4091bc
push 0x1e
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov esi, eax
push dword [ebp - 0x20]
push str.hex__x_:
push 0xf
push eax
call sym._swprintf_3
add esp, 0x10
mov dword [ebp - 0x2c], eax
mov ecx, ebx
mov edx, esi
push dword [ebp + 0xc]
call sym._REGPROC_write_line
add esp, 4
push esi
mov esi, dword [ebp - 0x24]
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
jmp 0x408f88
mov ecx, ebx
mov edx, 0x40df8e
push dword [ebp + 0xc]
call sym._REGPROC_write_line
add esp, 4
mov dword [ebp - 0x2c], 4
test esi, esi
mov eax, dword [ebp - 0x10]
je 0x4090a3
mov ebx, esi
mov dword [ebp - 0x28], eax
cmp dword [ebp + 0xc], 0
jne 0x4090c3
cmp dword [ebp - 0x20], 7
je 0x408fb7
mov ebx, esi
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], 2
jne 0x4090c3
test eax, eax
je 0x4090ba
mov esi, dword [ebp - 0x24]
shr esi, 1
push 0
push 0
push 0
push 0
push esi
push eax
push 0
push 0
mov ebx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
call ebx
mov ebx, eax
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
push 0
push 0
push ebx
mov dword [ebp - 0x28], eax
push eax
push esi
push dword [ebp - 0x10]
push 0
push 0
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
jmp 0x4090c3
add eax, ebx
lea eax, [eax*2 + 2]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
test ebx, ebx
je case.0x409041.0
xor edx, edx
xor esi, esi
jmp 0x409035
mov cx, 0x6e
mov word [eax + esi*2], 0x5c
inc esi
mov word [eax + esi*2], cx
inc edx
inc esi
cmp ebx, edx
je case.0x409041.0
mov ecx, dword [ebp - 0x10]
movzx ecx, word [ecx + edx*2]
cmp ecx, 0x22
ja case.default.0x409041
jmp dword [ecx*4 + 0x40ddf0]
mov cx, 0x72
jmp case.0x409041.34
cmp ecx, 0x5c
je case.0x409041.34
jmp case.0x409041.1
mov word [eax + esi*2], 0
lea ecx, [esi*2 + 6]
push ecx
mov ebx, eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
add esi, 3
push ebx
push str.__s_
push esi
mov dword [ebp - 0x1c], eax
push eax
call sym._swprintf_3
add esp, 0x10
push ebx
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x4091a5
jmp 0x4091b6
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x18]
test esi, esi
je 0x4091a5
jmp 0x4091b6
xor ebx, ebx
mov dword [ebp - 0x28], 0
lea eax, [ebx + ebx]
lea eax, [eax + eax*2]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov esi, ebx
sub esi, 1
jae 0x4090e5
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp + 0xc]
jmp 0x4091bc
mov ecx, dword [ebp - 0x28]
movzx ecx, byte [ecx]
push ecx
push str._02x
push 3
mov dword [ebp - 0x1c], eax
push eax
call sym._swprintf_3
add esp, 0x10
test esi, esi
je 0x4091b3
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x4c], edi
mov ebx, dword [ebp - 0x2c]
add ebx, dword [ebp - 0x3c]
xor edx, edx
mov esi, 1
mov edi, dword [ebp - 0x1c]
jmp 0x409178
mov edi, dword [ebp - 0x18]
mov ecx, edi
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp + 0xc]
push ebx
call sym._REGPROC_write_line
add esp, 4
mov ecx, edi
mov edx, str._r_n
push ebx
call sym._REGPROC_write_line
mov edi, dword [ebp - 0x1c]
add esp, 4
xor edx, edx
mov dword [ebp - 0x2c], 2
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax + esi]
lea ecx, [edi + edx*2]
push eax
push str._02x
push 3
push ecx
mov ebx, edx
call sym._swprintf_3
mov edx, ebx
add esp, 0x10
inc esi
cmp dword [ebp - 0x54], esi
mov ebx, dword [ebp - 0x2c]
je 0x409198
lea ecx, [edx + eax]
mov word [edi + ecx*2], 0x2c
mov word [edi + ecx*2 + 2], 0
add ebx, 3
cmp ebx, 0x4d
jae 0x409120
mov dword [ebp - 0x2c], ebx
add edx, eax
inc edx
jmp 0x409150
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x4c]
test esi, esi
jne 0x4091b6
cmp dword [ebp - 0x20], 1
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
jne 0x4091d6
jmp 0x4091bc
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
mov ebx, eax
mov edx, eax
push esi
call sym._REGPROC_write_line
add esp, 4
push ebx
call dword [sym.imp.ucrtbase.dll_free]
mov ecx, dword [ebp - 0x18]
add esp, 4
mov edx, 0x40df98
push esi
call sym._REGPROC_write_line
add esp, 4
inc dword [ebp - 0x40]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x50]
jmp 0x408cba
mov esi, dword [ebp - 0x30]
push dword [ebp - 0x10]
mov edi, dword [sym.imp.ucrtbase.dll_free]
call edi
add esp, 4
push dword [ebp - 0x14]
call edi
add esp, 4
mov ebx, 0xfffffffe
push 0x202
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [eax + ebx + 2], 0
lea ebx, [ebx + 2]
jne 0x409230
mov dword [ebp - 0x34], 0x101
lea eax, [ebp - 0x34]
push 0
push 0
push 0
push 0
push eax
push dword [ebp - 0x14]
push 0
push esi
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
test eax, eax
je 0x40926f
push dword [ebp - 0x14]
call dword [sym.imp.ucrtbase.dll_free]
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
sar ebx, 1
add ebx, 2
mov dword [ebp - 0x10], 1
jmp 0x4092b5
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov dword [ebp - 0x34], 0x101
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
push edi
push dword [ebp - 0x30]
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
inc edi
mov dword [ebp - 0x10], edi
test eax, eax
jne 0x40925e
mov edi, dword [ebp - 0x34]
add edi, ebx
lea eax, [edi + edi]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov esi, eax
push dword [ebp - 0x14]
push dword [ebp + 8]
push str._s_s
push edi
push eax
call sym._swprintf_3
add esp, 0x14
lea eax, [ebp - 0x44]
push eax
push 0x20019
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x30]
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409280
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x18]
push dword [ebp + 0xc]
push esi
call sym._export_registry_data
add esp, 8
push dword [ebp - 0x44]
call dword [sym.imp.advapi32.dll_RegCloseKey]
jmp 0x409280