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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1004fed2
push eax
mov dword fs:[0], esp
sub esp, 0x150
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
cmp dword [esi + 0x14], 0x10
jb 0x100222a1
mov ecx, dword [esi]
jmp 0x100222a3
mov ecx, esi
push 0
mov edx, 0x10053860
call fcn.10003760
add esp, 4
test eax, eax
jne 0x100222be
cmp dword [esi + 0x10], eax
setne al
test eax, eax
sete al
test al, al
je 0x100224cb
mov edi, dword [ebp + 0xc]
lea ecx, [esp + 0x18]
push 0xffffffffffffffff
push 0
push edi
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], 0
mov byte [esp + 0x24], 0
call fcn.100018e0
mov esi, dword [ebp + 8]
lea eax, [esp + 0x18]
mov dword [esp + 0x164], 0
cmp dword [esp + 0x2c], 0x10
cmovae eax, dword [esp + 0x18]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
test eax, eax
je 0x1002249e
cmp dword [esp + 0x2c], 0x10
lea ecx, [esp + 0x10]
push ecx
push 0x20019
lea eax, [esp + 0x20]
cmovae eax, dword [esp + 0x20]
push 0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x10022357
cmp eax, 2
je 0x1002249e
xor bl, bl
jmp 0x100224a0
cmp dword [esp + 0x2c], 0x10
lea ecx, [esp + 0x18]
mov eax, dword [esp + 0x28]
cmovae ecx, dword [esp + 0x18]
cmp byte [ecx + eax - 1], 0x5c
je 0x1002237e
push 0x10059c78
lea ecx, [esp + 0x1c]
call fcn.10007620
lea eax, [esp + 0x48]
mov dword [esp + 0x14], 0x104
push eax
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x64]
push eax
push 0
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x1002247c
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x20]
mov dword [esp + 0x4c], 0xf
push eax
lea ecx, [esp + 0x3c]
mov dword [esp + 0x4c], 0
mov byte [esp + 0x3c], 0
call fcn.100018e0
mov byte [esp + 0x164], 1
cmp byte [esp + 0x50], 0
jne 0x100223e9
xor ecx, ecx
jmp 0x100223f9
lea ecx, [esp + 0x50]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100223f0
sub ecx, edx
push ecx
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x38]
call fcn.10001f40
cmp dword [esp + 0x44], 0x10
lea eax, [esp + 0x30]
push 0
cmovae eax, dword [esp + 0x34]
push eax
push esi
call sym.KwLib.dll_bool___cdecl_KwLib::REG::DeleteKey_struct_HKEY_____char_const___char_const__
add esp, 0xc
test al, al
je 0x10022473
lea eax, [esp + 0x48]
mov dword [esp + 0x14], 0x104
push eax
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x64]
push eax
push 0
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov byte [esp + 0x164], 0
mov esi, eax
cmp dword [esp + 0x44], 0x10
jb 0x10022469
push dword [esp + 0x30]
call ebx
add esp, 4
test esi, esi
mov esi, dword [ebp + 8]
jmp 0x100223a9
lea ecx, [esp + 0x30]
call fcn.10001850
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [edi + 0x14], 0x10
jb 0x1002248e
mov edi, dword [edi]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x1002249e
xor bl, bl
jmp 0x100224a0
mov bl, 1
cmp dword [esp + 0x2c], 0x10
jb 0x100224b4
push dword [esp + 0x18]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x15c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 0x10
jb 0x100224d6
mov eax, dword [eax]
lea ecx, [esp + 0xc]
push ecx
push 0xf003f
push 0
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10022550
cmp dword [esi + 0x14], 0x10
jb 0x100224f8
mov esi, dword [esi]
push esi
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x10022534
push dword [esp + 0xc]
call esi
test eax, eax
je 0x10022539
push dword [esp + 0xc]
call esi
xor al, al
mov ecx, dword [esp + 0x15c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x10022517
mov al, 1
mov ecx, dword [esp + 0x15c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 2
je 0x10022539
mov ecx, dword [esp + 0x15c]
xor al, al
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret