Function at 0x10022816
Capabilities:
Encrypt data using dpapi
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
push 0x208
call fcn.100012ea
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x10022838
push 8
pop eax
jmp 0x10022b0c
push 0x1000
call fcn.100012ea
mov dword [ebp - 8], eax
test eax, eax
jne 0x10022851
push 8
pop edi
jmp 0x10022af4
mov ebx, dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
mov dword [ebp - 0x1c], 0x1002a05c
mov esi, 0x1002a008
mov dword [ebp - 0x20], 3
push 0x1c
xor edi, edi
lea eax, [ebp - 0x50]
push edi
push eax
call sub.ntdll.dll_memset
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
add esp, 0xc
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x18], edi
push edi
jmp 0x10022a4f
test edi, edi
jne 0x10022a35
push dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call edi
inc eax
push eax
push dword [esi]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x100228d8
cmp dword [ebp - 4], 3
je 0x100228ca
cmp dword [ebp - 4], 1
jne 0x100228d8
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.100227aa
mov dword [ebp - 0x50], eax
push dword [esi + 4]
call edi
inc eax
push eax
push dword [esi + 4]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x10022905
cmp dword [ebp - 4], 3
je 0x100228f7
cmp dword [ebp - 4], 1
jne 0x10022905
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.100227aa
mov dword [ebp - 0x4c], eax
push dword [esi + 8]
call edi
inc eax
push eax
push dword [esi + 8]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x10022932
cmp dword [ebp - 4], 3
je 0x10022924
cmp dword [ebp - 4], 1
jne 0x10022932
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.100227aa
mov dword [ebp - 0x48], eax
push dword [esi + 0x10]
call edi
inc eax
push eax
push dword [esi + 0x10]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x1002295f
cmp dword [ebp - 4], 3
je 0x10022951
cmp dword [ebp - 4], 1
jne 0x1002295f
push dword [ebp - 0xc]
push dword [ebp - 8]
call fcn.100227aa
mov dword [ebp - 0x44], eax
push dword [esi + 0xc]
call edi
inc eax
push eax
push dword [esi + 0xc]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x10022986
cmp dword [ebp - 0xc], 4
jne 0x10022986
cmp dword [ebp - 4], 4
jne 0x10022986
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
push dword [esi + 0x14]
call edi
inc eax
push eax
push dword [esi + 0x14]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x100229fa
cmp dword [ebp - 4], 3
jne 0x100229fa
mov eax, dword [ebp - 8]
cmp byte [eax], 2
jne 0x100229fa
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x2c], ecx
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
mov eax, dword [ebp - 0xc]
dec eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2c]
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.CRYPT32.dll_CryptUnprotectData]
test eax, eax
je 0x100229e5
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
call fcn.100227aa
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x28], 0
je 0x100229f4
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [esi + 0x18]
call edi
inc eax
push eax
push dword [esi + 0x18]
push dword [ebp - 0x10]
call ebx
test eax, eax
jne 0x10022a35
cmp dword [ebp - 0xc], 4
jne 0x10022a35
cmp dword [ebp - 4], 4
jne 0x10022a35
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x10022a28
push 0x10027788
jmp 0x10022a2d
push 0x1002778c
call fcn.100227e5
mov dword [ebp - 0x3c], eax
inc dword [ebp - 0x18]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebp - 4]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x18]
push dword [ebp + 8]
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 0xc], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
cmp edi, 0x103
jne 0x1002289f
cmp dword [ebp - 0x50], 0
je 0x10022a9e
cmp dword [ebp - 0x48], 0
je 0x10022a90
push dword [ebp - 0x24]
lea eax, [ebp - 0x50]
push dword [ebp + 0xc]
call fcn.10021a4d
mov edi, eax
cmp dword [ebp - 0x50], 0
je 0x10022a9e
push dword [ebp - 0x50]
call fcn.100012ff
cmp dword [ebp - 0x4c], 0
je 0x10022aac
push dword [ebp - 0x4c]
call fcn.100012ff
cmp dword [ebp - 0x40], 0
je 0x10022aba
push dword [ebp - 0x40]
call fcn.100012ff
cmp dword [ebp - 0x48], 0
je 0x10022ac8
push dword [ebp - 0x48]
call fcn.100012ff
cmp dword [ebp - 0x44], 0
je 0x10022ad6
push dword [ebp - 0x44]
call fcn.100012ff
cmp dword [ebp - 0x3c], 0
je 0x10022ae4
push dword [ebp - 0x3c]
call fcn.100012ff
add dword [ebp - 0x1c], 4
add esi, 0x1c
dec dword [ebp - 0x20]
jne 0x1002286a
push dword [ebp - 0x10]
call fcn.100012ff
cmp dword [ebp - 8], 0
je 0x10022b0a
push dword [ebp - 8]
call fcn.100012ff
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8