Function at 0x10021b6c
Capabilities:
Get file attributes
Get session user name
Query environment variable
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x7004]
mov eax, 0x7004
call fcn.100588e0
push 0xffffffffffffffff
push 0x100ba31e
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x1011ca44]
xor eax, ebp
mov dword [ebp + 0x7000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
push str._Remove_Keys_for_current_active_user_other_than_one_were_loggin_in
mov byte [ebp - 4], 4
mov dword [ebp - 0x40], 0x800
mov dword [ebp - 0x18], ebx
call fcn.10075920
pop ecx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp + 0x3000]
push eax
push ebx
jmp 0x10021dc2
lea eax, [ebp + 0x3000]
push eax
lea ecx, [ebp - 0x14]
call fcn.10001727
push str.SoftwareClasses
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.1000d9ae
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x14]
call fcn.1000187c
mov ecx, dword [ebp - 0x2c]
mov byte [ebp - 4], 5
test ecx, ecx
je 0x10021c4f
call fcn.10001b26
mov dword [ebp - 0x2c], ebx
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x10021c5a
mov eax, dword [edi]
jmp 0x10021c5c
mov eax, ebx
push 0x20019
push eax
push esi
lea ecx, [ebp - 0x5c]
call fcn.10075920
test eax, eax
jne 0x10021d2d
push 0x2001f
push 0x100d2c04
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x28]
call fcn.10075920
test eax, eax
jne 0x10021d2d
push str.___Remove_from_user:
lea ecx, [ebp - 0x34]
call fcn.1000d9ae
lea eax, [ebp + 0x3000]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x30]
call fcn.10001727
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x34]
call fcn.1000187c
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x10021ccf
call fcn.10001b26
mov dword [ebp - 0x30], ebx
mov esi, dword [ebp - 0x34]
test esi, esi
je 0x10021cda
mov eax, dword [esi]
jmp 0x10021cdc
mov eax, ebx
push eax
call fcn.10075920
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
and dword [ebp - 0x28], 0
and dword [ebp - 0x20], 0
push ecx
push ecx
mov ecx, dword [ebp - 0x24]
mov ebx, esp
and dword [ebp - 0x24], 0
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
call fcn.10075920
add esp, 0xc
lea ecx, [ebp - 0x5c]
call fcn.10017ea6
lea ecx, [ebp - 0x28]
call fcn.10017ea6
test esi, esi
je 0x10021d90
mov ecx, esi
call fcn.10001b26
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x10021d92
push str.___Failed_to_open_CLSID_keys_in_user:
lea ecx, [ebp - 0x3c]
call fcn.1000d9ae
lea eax, [ebp + 0x3000]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x38]
call fcn.10001727
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x3c]
call fcn.1000187c
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x10021d6c
call fcn.10001b26
mov dword [ebp - 0x38], ebx
mov esi, dword [ebp - 0x3c]
test esi, esi
je 0x10021d77
mov eax, dword [esi]
jmp 0x10021d79
mov eax, ebx
push eax
call fcn.10075920
pop ecx
test esi, esi
je 0x10021d92
mov ecx, esi
call fcn.10001b26
mov dword [ebp - 0x3c], ebx
jmp 0x10021d92
xor ebx, ebx
mov esi, dword [ebp - 0x18]
inc esi
mov dword [ebp - 0x40], 0x800
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 4
test edi, edi
je 0x10021db2
mov ecx, edi
call fcn.10001b26
mov dword [ebp - 0x14], ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp + 0x3000]
push eax
push esi
mov esi, SysReAllocStringLen
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x10021c0c
push str._Remove_Static_Version_Redirect_Keys_for_other_users
call fcn.10075920
mov edi, 0x1000
mov dword [ebp - 0x18], ebx
push edi
lea eax, [ebp + 0x2000]
push ebx
push eax
call fcn.1005c640
push edi
lea eax, [ebp + 0x4000]
push ebx
push eax
call fcn.1005c640
push edi
lea eax, [ebp]
push ebx
push eax
call fcn.1005c640
push edi
lea eax, [ebp + 0x5000]
push ebx
push eax
call fcn.1005c640
push edi
lea eax, [ebp + 0x1000]
push ebx
push eax
call fcn.1005c640
add esp, 0x40
lea eax, [ebp + 0x6000]
push edi
push ebx
push eax
call fcn.1005c640
add esp, 0xc
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], 0xa
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 0xb
push eax
push 0x20019
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push 0x100d2cf8
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
push ecx
mov ecx, esp
mov esi, eax
push str.___Open_ProfilePath_key
call fcn.10001727
push esi
call fcn.1001d1e4
pop ecx
pop ecx
test esi, esi
jne 0x100220e2
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x800
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
push edi
lea eax, [ebp + 0x5000]
push esi
push eax
call fcn.1005c640
add esp, 0xc
mov dword [ebp - 0x10], 0x800
lea eax, [ebp - 0x10]
push esi
push esi
push esi
push esi
push eax
lea eax, [ebp + 0x5000]
push eax
push esi
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100220b8
test esi, esi
jne 0x100220c8
lea eax, [ebp + 0x5000]
push eax
push str.SoftwareMicrosoftWindows_NTCurrentVersionProfileList
lea eax, [ebp + 0x2000]
push 0x100d2cec
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x60]
push eax
push 0x20019
push esi
lea eax, [ebp + 0x2000]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov esi, eax
test esi, esi
jne 0x10022018
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x800
push eax
lea eax, [ebp + 0x1000]
push eax
lea eax, [ebp - 0x94]
push eax
push esi
push str.ProfileImagePath
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x10021ffc
mov esi, 0x800
lea eax, [ebp + 0x6000]
push esi
push eax
lea eax, [ebp + 0x1000]
push eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp]
push eax
lea eax, [ebp + 0x6000]
push eax
call fcn.1001f736
pop ecx
pop ecx
test eax, eax
je 0x10022011
lea eax, [ebp + 0x6000]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
test al, 0x10
je 0x10021fc4
push str.Local_SettingsApplication_DataMicrosoftWindowsUsrClass.dat
lea eax, [ebp + 0x6000]
push esi
push eax
call fcn.10075920
add esp, 0xc
lea eax, [ebp + 0x6000]
push eax
lea ecx, [ebp - 0x14]
call fcn.10001727
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x90]
call fcn.1001d935
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x10022011
call fcn.10001b26
and dword [ebp - 0x14], 0
jmp 0x10022011
push ecx
mov ecx, esp
push str.___Query_Value_ProfileImagePath
call fcn.10001727
push esi
call fcn.1001d1e4
pop ecx
pop ecx
push dword [ebp - 0x60]
call edi
jmp 0x1002202d
push ecx
mov ecx, esp
push str.___Open_Profile_Key
call fcn.10001727
push esi
call fcn.1001d1e4
pop ecx
pop ecx
mov esi, dword [ebp - 0x18]
lea eax, [ebp + 0x2000]
push 0x1000
push 0
inc esi
push eax
mov dword [ebp - 0x18], esi
call fcn.1005c640
push 0x1000
lea eax, [ebp + 0x4000]
push 0
push eax
call fcn.1005c640
push 0x1000
lea eax, [ebp + 0x5000]
push 0
push eax
call fcn.1005c640
push 0x1000
lea eax, [ebp + 0x1000]
push 0
push eax
call fcn.1005c640
push 0x1000
lea eax, [ebp + 0x6000]
push 0
push eax
call fcn.1005c640
add esp, 0x3c
mov dword [ebp - 0x10], 0x800
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 0x5000]
push eax
push esi
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
cmp esi, 0x103
jne 0x10021ef1
jmp 0x100220dd
push ecx
mov ecx, esp
push str.Enumerate_Profile_Keys
call fcn.10001727
push esi
call fcn.1001d1e4
pop ecx
pop ecx
push dword [ebp - 0x44]
call edi
mov edi, dword [ebp - 0x88]
xor ebx, ebx
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x18], eax
test edi, edi
je 0x10022269
push 1
push 0x100d2e5c
call fcn.10075920
pop ecx
pop ecx
test eax, eax
je 0x10022255
push 1
push 0x100d2f40
call fcn.10075920
pop ecx
pop ecx
test eax, eax
je 0x10022255
push 0x1000
lea eax, [ebp + 0x6000]
push 0
push eax
call fcn.1005c640
add esp, 0xc
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x90]
push eax
call fcn.1001f235
mov eax, dword [eax]
test eax, eax
je 0x10022156
mov eax, dword [eax]
jmp 0x10022158
xor eax, eax
mov ecx, 0x800
push ecx
push eax
push ecx
lea eax, [ebp + 0x6000]
push eax
call fcn.10075920
push ebx
lea eax, [ebp + 0x4000]
push str.User_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x1c
lea eax, [ebp + 0x6000]
mov esi, SysReAllocStringLen
push eax
lea eax, [ebp + 0x4000]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
test eax, eax
jne 0x10022238
push 0x20019
lea eax, [ebp + 0x4000]
push eax
push esi
lea ecx, [ebp - 0x6c]
call fcn.10075920
test eax, eax
jne 0x10022229
push 0x2001f
push 0x100d2f78
push dword [ebp - 0x6c]
lea ecx, [ebp - 0x50]
call fcn.10075920
test eax, eax
jne 0x10022221
push str.remove_key_from
call fcn.10075920
lea eax, [ebp + 0x6000]
push eax
call fcn.10075920
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x50]
and dword [ebp - 0x50], 0
and dword [ebp - 0x48], 0
push ecx
mov ecx, dword [ebp - 0x4c]
mov esi, esp
and dword [ebp - 0x4c], 0
mov dword [esi], eax
mov dword [esi + 4], ecx
mov dword [esi + 8], edx
call fcn.10075920
add esp, 0xc
lea ecx, [ebp - 0x50]
call fcn.10017ea6
mov esi, SysReAllocStringLen
lea ecx, [ebp - 0x6c]
call fcn.10017ea6
lea eax, [ebp + 0x4000]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
inc ebx
push 0
push str.SeBackupPrivilege
call fcn.10075920
push 0
push str.SeRestorePrivilege
call fcn.10075920
add esp, 0x10
jmp 0x10022260
push str.___failed_to_set_Privileges
call fcn.10075920
pop ecx
sub edi, 1
jne 0x100220fb
mov ebx, 0x20019
lea ecx, [ebp - 0x78]
push ebx
push 0x100d302c
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.10075920
test eax, eax
jne 0x100222f4
push ebx
push str.Classes
push dword [ebp - 0x78]
lea ecx, [ebp - 0x5c]
call fcn.10075920
test eax, eax
jne 0x100222f4
push 0x2001f
push 0x100d3050
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x28]
call fcn.10075920
test eax, eax
jne 0x100222f4
mov ecx, dword [ebp - 0x24]
sub esp, 0xc
mov edx, dword [ebp - 0x20]
mov esi, esp
mov eax, dword [ebp - 0x28]
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [esi], eax
mov dword [esi + 4], ecx
mov dword [esi + 8], edx
call fcn.10075920
add esp, 0xc
lea ecx, [ebp - 0x78]
call fcn.10017ea6
lea ecx, [ebp - 0x5c]
call fcn.10017ea6
lea ecx, [ebp - 0x28]
call fcn.10017ea6
lea ecx, [ebp - 0x90]
call fcn.10021a39
lea ecx, [ebp - 0x50]
call fcn.10017ea6
lea ecx, [ebp - 0x6c]
call fcn.10017ea6
lea ecx, [ebp - 0x28]
call fcn.10017ea6
lea ecx, [ebp - 0x5c]
call fcn.10017ea6
lea ecx, [ebp - 0x78]
call fcn.10017ea6
xor eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x7000]
xor ecx, ebp
call fcn.100587af
add ebp, 0x7004
leave
ret