Function at 0x10008570
Capabilities:
Delete registry key
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
push ebx
sub esp, 0x64
mov dword [ebp - 0x38], eax
mov eax, dword [eax]
mov ebx, dword [edi]
mov dword [ebp - 0x34], edx
mov edx, ecx
mov edi, ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x30], ebx
call fcn.10008070
test eax, eax
mov esi, eax
js 0x1000877b
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0x100
mov dword [ebp - 0x48], eax
call eax
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x20], eax
mov eax, pe_nt_image_headers32
mov dword [ebp - 0x1c], eax
mov eax, esi
mov esi, ecx
mov dword [ebp - 0x18], edx
jmp 0x100086fe
mov dword [esp + 4], str.ForceRemove
mov eax, dword [edi]
mov esi, 3
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x100088f0
lea eax, [ebp - 0x2c]
mov edx, edi
call fcn.10008070
test eax, eax
js 0x10008740
test byte [0x1000c038], 8
jne 0x10008808
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x100087c0
mov ebx, dword [edi]
cmp esi, 2
je 0x10008ae0
cmp esi, 4
je 0x10008880
cmp esi, 3
je 0x10008be0
lea eax, [ebp - 0x28]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCreateKeyW]
mov ebx, dword [ebp - 0x2c]
sub esp, 0xc
test eax, eax
jne 0x10008fb6
movzx eax, word [ebx]
cmp ax, 0x3d
je 0x10008a20
cmp ax, 0x7b
je 0x10008a90
test byte [0x1000c038], 8
jne 0x100088b7
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x100087a0
mov eax, 9
bt eax, esi
jae 0x100087a0
mov ebx, dword [ebp - 0x20]
test byte [0x1000c038], 8
jne 0x10008b28
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteKeyW]
mov eax, dword [ebp - 0x28]
sub esp, 8
test eax, eax
je 0x100086e2
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
lea eax, [ebp - 0x2c]
mov edx, edi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
call fcn.10008070
test eax, eax
js 0x10008740
mov edx, dword [edi]
cmp word [edx + 2], 0
jne 0x1000870d
cmp word [edx], 0x7d
je 0x10008740
mov dword [esp + 4], str.NoRemove
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x100085e0
lea eax, [ebp - 0x2c]
mov edx, edi
mov esi, 1
call fcn.10008070
test eax, eax
jns 0x10008615
mov ecx, esi
mov esi, eax
cmp ecx, 2
setne byte [ebp - 0x3c]
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
test eax, eax
je 0x10008776
cmp byte [ebp - 0x3c], 0
je 0x10008776
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x2c]
sub esp, 4
mov eax, dword [ebp - 0x38]
mov dword [eax], ebx
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
test byte [0x1000c038], 8
jne 0x100088b2
lea esi, [esi]
cmp esi, 2
setne dl
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x100086e2
test dl, dl
je 0x100086e2
jmp 0x100086d6
lea eax, [esi - 2]
and eax, 0xfffffffd
jne 0x10008950
cmp esi, 4
je 0x10008790
mov ebx, dword [ebp - 0x2c]
cmp word [ebx], 0x3d
je 0x10008c00
mov esi, dword [ebp - 0x20]
test byte [0x1000c038], 4
jne 0x10008eda
mov dword [esp], esi
mov esi, 0x80020009
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x10008776
mov ebx, dword [edi]
test ebx, ebx
je 0x10008b98
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x10008b10
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x1000884a
mov edx, 0xffffffff
mov eax, ebx
call fcn.10007bc0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.name___s_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 3
call fcn.10007e40
jmp 0x10008622
test byte [0x1000c038], 8
jne 0x10008c10
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteTreeW]
mov edx, 1
sub esp, 8
test byte [0x1000c038], 8
je 0x100087a6
mov esi, 4
mov dword [esp + 0x14], esi
mov eax, dword [ebp - 0x30]
mov dword [esp + 0xc], str._x__x_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.10007e40
jmp 0x10008693
mov dword [esp + 4], 0x1000f80e
mov eax, dword [edi]
mov esi, 2
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
je 0x10008603
mov dword [esp + 4], str.Delete
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
je 0x10008c80
xor esi, esi
test byte [0x1000c038], 8
jne 0x10008808
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10008950
mov ebx, dword [edi]
jmp 0x1000864a
mov eax, dword [edi]
lea edx, [ebp - 0x20]
mov ecx, 0xffffffff
call fcn.10007af0
lea eax, [ebp - 0x28]
mov dword [esp + 8], eax
mov eax, dword [edi]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyW]
mov ebx, dword [ebp - 0x2c]
sub esp, 0xc
mov ecx, eax
test eax, eax
je 0x1000866f
test byte [0x1000c038], 4
je 0x1000866f
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x1000901b
shr eax, 0x10
mov dword [ebp - 0x44], ecx
test eax, eax
je 0x10008f9b
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, dword [ebp - 0x44]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x100089e6
mov eax, dword [ebp - 0x3c]
mov edx, 0xffffffff
call fcn.10007bc0
mov ecx, dword [ebp - 0x44]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_not_open_key__s:__08lx_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
movzx eax, word [ebx]
cmp ax, 0x3d
jne 0x1000867c
nop
mov byte [ebp - 0x3c], 1
lea eax, [ebp - 0x2c]
add ebx, 2
mov edx, edi
mov dword [ebp - 0x2c], ebx
call fcn.10008070
test eax, eax
js 0x10009025
cmp dword [edi + 8], 1
jne 0x100090a2
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10008ba8
mov ebx, dword [edi]
movzx eax, word [ebx]
cmp ax, 0x64
je 0x10008e60
cmp ax, 0x73
je 0x10008c90
cmp ax, 0x62
je 0x10008d50
test byte [0x1000c038], 4
jne 0x1000902c
mov esi, 0x80020009
jmp 0x1000874b
movzx eax, word [ebx + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_iswspace]
test eax, eax
je 0x10008686
lea eax, [ebp - 0x2c]
mov edx, edi
call fcn.10008070
test eax, eax
js 0x10008ace
mov eax, dword [ebp - 0x30]
mov ecx, edi
mov dword [esp], eax
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
call fcn.10008570
test eax, eax
jns 0x10008686
mov esi, eax
mov byte [ebp - 0x3c], 1
jmp 0x1000874b
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x20]
mov ecx, 0xffffffff
mov dword [ebp - 0x28], eax
mov eax, ebx
call fcn.10007af0
mov ebx, dword [ebp - 0x2c]
cmp word [ebx], 0x3d
jne 0x100087de
mov byte [ebp - 0x3c], 0
jmp 0x10008a24
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.10007a90
jmp 0x1000884a
test ebx, ebx
je 0x10008ec8
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x10008d38
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x10008b68
mov edx, 0xffffffff
mov eax, ebx
call fcn.10007bc0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Deleting__s_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 3
call fcn.10007e40
jmp 0x100086bc
mov eax, str._null_
jmp 0x1000884a
mov eax, dword [ebp - 0x2c]
cmp word [eax], 0x2d
jne 0x10008bb7
add eax, 2
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
mov edx, edi
call fcn.10008070
test eax, eax
js 0x10009025
cmp esi, 2
je 0x10008686
mov ebx, dword [ebp - 0x2c]
movzx eax, word [ebx]
jmp 0x1000867c
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteTreeW]
mov ebx, dword [edi]
sub esp, 8
jmp 0x1000864a
mov byte [ebp - 0x3c], 0
mov esi, 2
jmp 0x10008a24
test ebx, ebx
je 0x10008f7b
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x10008d20
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x10008c50
mov edx, 0xffffffff
mov eax, ebx
call fcn.10007bc0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Deleting__s_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 3
call fcn.10007e40
mov ebx, dword [edi]
jmp 0x1000888d
mov esi, 4
jmp 0x10008603
lea eax, [ebp - 0x2c]
mov edx, edi
call fcn.10008070
test eax, eax
js 0x10009025
mov edx, dword [edi]
cmp word [edx], 0
je 0x1000916f
mov eax, edx
add eax, 2
cmp word [eax], 0
jne 0x10008cb0
sub eax, edx
add eax, 2
mov ebx, dword [ebp - 0x18]
xor ecx, ecx
test ebx, ebx
jne 0x10008ed2
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
test eax, eax
je 0x10008bc9
mov esi, eax
test byte [0x1000c038], 4
jne 0x10008fee
movzx eax, si
or eax, 0x80070000
test esi, esi
cmovg esi, eax
jmp 0x1000874b
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.10007a90
jmp 0x10008c50
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.10007a90
jmp 0x10008b68
lea eax, [ebp - 0x2c]
mov edx, edi
call fcn.10008070
test eax, eax
js 0x10009025
mov eax, dword [edi]
cmp word [eax], 0
mov dword [ebp - 0x50], eax
je 0x10009121
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x10008d78
mov ecx, dword [ebp - 0x50]
sub eax, ecx
sar eax, 1
add eax, 1
mov edx, eax
shr edx, 0x1f
add eax, edx
sar eax, 1
mov dword [ebp - 0x44], eax
mov ebx, eax
mov dword [esp], eax
mov ecx, dword [ebp - 0x48]
call ecx
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x10009138
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x10008f0c
mov dword [ebp - 0x58], ebx
xor ecx, ecx
mov ebx, dword [ebp - 0x50]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], edi
mov edi, dword [ebp - 0x4c]
jmp 0x10008e24
lea edx, [eax - 0x61]
cmp dx, 5
jbe 0x10008e50
lea edx, [eax - 0x41]
cmp dx, 5
ja 0x10008f85
sub eax, 0x37
movzx edx, word [ebx + ecx*4 + 2]
lea esi, [edx - 0x30]
cmp si, 9
jbe 0x10008e4b
lea esi, [edx - 0x61]
cmp si, 5
jbe 0x10008e58
lea esi, [edx - 0x41]
cmp si, 5
ja 0x10008f85
sub edx, 0x37
shl eax, 4
or eax, edx
mov byte [edi + ecx], al
add ecx, 1
cmp dword [ebp - 0x44], ecx
je 0x10008f03
movzx eax, word [ebx + ecx*4]
test ax, ax
je 0x10008f03
lea edx, [eax - 0x30]
cmp dx, 9
ja 0x10008dd0
movzx edx, word [ebx + ecx*4 + 2]
sub eax, 0x30
lea esi, [edx - 0x30]
cmp si, 9
ja 0x10008df7
sub edx, 0x30
jmp 0x10008e10
sub eax, 0x57
jmp 0x10008de9
sub edx, 0x57
jmp 0x10008e10
lea eax, [ebp - 0x2c]
mov edx, edi
call fcn.10008070
test eax, eax
js 0x10009025
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstoul]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
xor eax, eax
test ebx, ebx
je 0x10008e9c
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x24]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], eax
jmp 0x10008ce7
mov eax, str._null_
jmp 0x10008b68
mov ecx, dword [ebp - 0x20]
jmp 0x10008ccb
mov dword [esp + 0xc], str.value_not_set__n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x100087ee
mov esi, dword [ebp - 0x54]
mov ebx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x50]
mov edx, dword [ebp - 0x18]
xor eax, eax
test edx, edx
je 0x10008f18
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], ebx
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 0xc], 3
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp + 0x10], ecx
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
test eax, eax
je 0x10009091
mov esi, eax
test byte [0x1000c038], 4
jne 0x1000918e
test esi, esi
jle 0x10008f6a
movzx esi, si
or esi, 0x80070000
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x1000874b
mov eax, str._null_
jmp 0x10008c50
mov eax, dword [ebp - 0x4c]
mov esi, 0x80004005
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x1000874b
mov eax, dword [ebp - 0x3c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.10007a90
mov ecx, dword [ebp - 0x44]
jmp 0x100089e6
mov esi, eax
test byte [0x1000c038], 4
jne 0x10009142
test esi, esi
mov eax, dword [ebp - 0x20]
jle 0x10008fd5
movzx esi, si
or esi, 0x80070000
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x10008767
jmp 0x10008776
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_set_value_of_key:__08lx_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x10008d0d
mov eax, str._null_
jmp 0x100089e6
mov esi, eax
jmp 0x1000874b
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x10009179
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x10009064
mov edx, 0xffffffff
mov eax, ebx
call fcn.10007bc0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Wrong_resource_type:__s_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x10008a81
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x10008bc9
test byte [0x1000c038], 4
je 0x10008a81
mov eax, dword [ebp - 0x40]
mov ebx, dword [eax]
test ebx, ebx
je 0x100091d7
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x100091c2
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x100090f4
mov edx, 0xffffffff
mov eax, ebx
call fcn.10007bc0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Wrong_registry_type:__s_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x10008a81
mov dword [esp], 0
mov eax, dword [ebp - 0x48]
call eax
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x100091bb
mov esi, 0x8007000e
jmp 0x1000874b
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_not_create_open__key:__08lx_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x10008fc5
mov eax, 2
jmp 0x10008cbe
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.10007a90
jmp 0x10009064
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_not_set_value_of_key:_0x_08lx_n
mov dword [esp + 8], str.do_process_key
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x10008f5d
xor ebx, ebx
jmp 0x10008f0c
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.10007a90
jmp 0x100090f4
mov eax, str._null_
jmp 0x100090f4