Function at 0x10021a2b
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.1005e2a0
push 0xffffffffffffffff
push 0x100cd6b5
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x10130aa4]
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 esi, esi
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
push str._Remove_Keys_for_current_active_user_other_than_one_were_loggin_in
mov byte [ebp - 4], 4
mov ebx, esi
mov dword [ebp - 0x3c], 0x800
call fcn.100333b3
pop ecx
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp + 0x4000]
push eax
push esi
jmp 0x10021c78
lea eax, [ebp + 0x4000]
push eax
lea ecx, [ebp - 0x10]
call fcn.10001719
push str.SoftwareClasses
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.1000dcc0
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x10]
call fcn.1000186b
mov ecx, dword [ebp - 0x2c]
mov byte [ebp - 4], 5
test ecx, ecx
je 0x10021b0d
call fcn.10001b13
mov dword [ebp - 0x2c], esi
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x10021b18
mov eax, dword [edi]
jmp 0x10021b1a
mov eax, esi
push 0x20019
push eax
push SysReAllocStringLen
lea ecx, [ebp - 0x58]
call fcn.10017b89
test eax, eax
jne 0x10021be7
push 0x2001f
push 0x100eb240
push dword [ebp - 0x58]
lea ecx, [ebp - 0x28]
call fcn.10017b89
test eax, eax
jne 0x10021be7
push str.___Remove_from_user:
lea ecx, [ebp - 0x34]
call fcn.1000dcc0
lea eax, [ebp + 0x4000]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x30]
call fcn.10001719
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x34]
call fcn.1000186b
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x10021b91
call fcn.10001b13
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x34]
test esi, esi
je 0x10021b9c
mov eax, dword [esi]
jmp 0x10021b9e
xor eax, eax
push eax
call fcn.100333b3
mov eax, dword [ebp - 0x28]
and dword [ebp - 0x28], 0
push ecx
push ecx
mov ecx, dword [ebp - 0x20]
mov edx, esp
and dword [ebp - 0x20], 0
mov dword [edx], eax
mov eax, dword [ebp - 0x24]
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
call fcn.1002193c
add esp, 0xc
lea ecx, [ebp - 0x58]
call fcn.10017647
and dword [ebp - 0x24], 0
test esi, esi
je 0x10021c4c
mov ecx, esi
call fcn.10001b13
xor esi, esi
mov dword [ebp - 0x34], esi
jmp 0x10021c4e
push str.___Failed_to_open_CLSID_keys_in_user:
lea ecx, [ebp - 0x14]
call fcn.1000dcc0
lea eax, [ebp + 0x4000]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x38]
call fcn.10001719
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x14]
call fcn.1000186b
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x10021c26
call fcn.10001b13
mov dword [ebp - 0x38], esi
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x10021c31
mov eax, dword [esi]
jmp 0x10021c33
xor eax, eax
push eax
call fcn.100333b3
pop ecx
test esi, esi
je 0x10021c4c
mov ecx, esi
call fcn.10001b13
xor esi, esi
mov dword [ebp - 0x14], esi
jmp 0x10021c4e
xor esi, esi
inc ebx
mov dword [ebp - 0x3c], 0x800
mov byte [ebp - 4], 4
test edi, edi
je 0x10021c68
mov ecx, edi
call fcn.10001b13
mov dword [ebp - 0x10], esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp + 0x4000]
push eax
push ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push SysReAllocStringLen
call edi
test eax, eax
je 0x10021aca
push str._Remove_Static_Version_Redirect_Keys_for_other_users
call fcn.100333b3
mov ebx, 0x1000
mov dword [ebp - 0x14], esi
push ebx
lea eax, [ebp + 0x2000]
push esi
push eax
call fcn.100621d0
push ebx
lea eax, [ebp + 0x5000]
push esi
push eax
call fcn.100621d0
push ebx
lea eax, [ebp]
push esi
push eax
call fcn.100621d0
push ebx
lea eax, [ebp + 0x3000]
push esi
push eax
call fcn.100621d0
push ebx
lea eax, [ebp + 0x1000]
push esi
push eax
call fcn.100621d0
add esp, 0x40
lea eax, [ebp + 0x6000]
push ebx
push esi
push eax
call fcn.100621d0
add esp, 0xc
mov dword [ebp - 0x8c], esi
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x78], 0xa
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 0xb
push eax
push 0x20019
push esi
push 0x100eb358
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push ecx
mov ecx, esp
mov esi, eax
push str.___Open_ProfilePath_key
call fcn.10001719
push esi
call fcn.1001cc68
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ecx
pop ecx
test esi, esi
jne 0x10021f79
lea eax, [ebp - 0x18]
mov esi, 0x800
push eax
lea eax, [ebp]
mov dword [ebp - 0x18], esi
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor ecx, ecx
mov dword [ebp - 0x18], esi
push ecx
push ecx
push ecx
push ecx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0x3000]
push eax
push ecx
jmp 0x10021f4a
test esi, esi
jne 0x10021f5f
lea eax, [ebp + 0x3000]
push eax
push str.SoftwareMicrosoftWindows_NTCurrentVersionProfileList
lea eax, [ebp + 0x2000]
push 0x100eb2bc
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x5c]
push eax
push 0x20019
push esi
lea eax, [ebp + 0x2000]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x10021eb3
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x800
push eax
lea eax, [ebp + 0x1000]
push eax
lea eax, [ebp - 0x90]
push eax
push esi
push str.ProfileImagePath
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x10021e97
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.1001f4bd
pop ecx
pop ecx
test eax, eax
je 0x10021eac
lea eax, [ebp + 0x6000]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x10021e5f
push str.Local_SettingsApplication_DataMicrosoftWindowsUsrClass.dat
lea eax, [ebp + 0x6000]
push esi
push eax
call fcn.1008aa23
add esp, 0xc
lea eax, [ebp + 0x6000]
push eax
lea ecx, [ebp - 0x10]
call fcn.10001719
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x8c]
call fcn.1001d448
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x10021eac
call fcn.10001b13
and dword [ebp - 0x10], 0
jmp 0x10021eac
push ecx
mov ecx, esp
push str.___Query_Value_ProfileImagePath
call fcn.10001719
push esi
call fcn.1001cc68
pop ecx
pop ecx
push dword [ebp - 0x5c]
call ebx
jmp 0x10021ec8
push ecx
mov ecx, esp
push str.___Open_Profile_Key
call fcn.10001719
push esi
call fcn.1001cc68
pop ecx
pop ecx
mov esi, dword [ebp - 0x14]
lea eax, [ebp + 0x2000]
push 0x1000
push 0
inc esi
push eax
mov dword [ebp - 0x14], esi
call fcn.100621d0
push 0x1000
lea eax, [ebp + 0x5000]
push 0
push eax
call fcn.100621d0
push 0x1000
lea eax, [ebp + 0x3000]
push 0
push eax
call fcn.100621d0
push 0x1000
lea eax, [ebp + 0x1000]
push 0
push eax
call fcn.100621d0
push 0x1000
lea eax, [ebp + 0x6000]
push 0
push eax
call fcn.100621d0
add esp, 0x3c
mov dword [ebp - 0x18], 0x800
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0x3000]
push eax
push esi
push dword [ebp - 0x40]
call edi
mov esi, eax
cmp esi, 0x103
jne 0x10021d88
jmp 0x10021f74
push ecx
mov ecx, esp
push str.Enumerate_Profile_Keys
call fcn.10001719
push esi
call fcn.1001cc68
pop ecx
pop ecx
push dword [ebp - 0x40]
call ebx
mov edi, dword [ebp - 0x84]
xor esi, esi
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], eax
test edi, edi
je 0x1002210b
push 1
push 0x100eb424
call fcn.100240e5
pop ecx
pop ecx
test eax, eax
je 0x100220f7
push 1
push 0x100eb588
call fcn.100240e5
pop ecx
pop ecx
test eax, eax
je 0x100220f7
push 0x1000
lea eax, [ebp + 0x6000]
push 0
push eax
call fcn.100621d0
add esp, 0xc
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x8c]
push eax
call fcn.1001ef95
mov eax, dword [eax]
test eax, eax
je 0x10021ff0
mov eax, dword [eax]
jmp 0x10021ff2
xor eax, eax
mov ecx, 0x800
push ecx
push eax
push ecx
lea eax, [ebp + 0x6000]
push eax
call fcn.1008ab60
push esi
lea eax, [ebp + 0x5000]
push str.User_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x1c
lea eax, [ebp + 0x6000]
push eax
lea eax, [ebp + 0x5000]
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
test eax, eax
jne 0x100220da
push 0x20019
lea eax, [ebp + 0x5000]
push eax
push SysReAllocStringLen
lea ecx, [ebp - 0x68]
call fcn.10017b89
test eax, eax
jne 0x100220c4
mov esi, dword [ebp - 0x68]
lea ecx, [ebp - 0x4c]
push 0x2001f
push 0x100eb4bc
push esi
call fcn.10017b89
test eax, eax
jne 0x100220b2
push str.remove_key_from
call fcn.100333b3
lea eax, [ebp + 0x6000]
push eax
call fcn.100333b3
mov eax, dword [ebp - 0x4c]
and dword [ebp - 0x4c], 0
push ecx
mov ecx, dword [ebp - 0x44]
mov edx, esp
and dword [ebp - 0x44], 0
mov dword [edx], eax
mov eax, dword [ebp - 0x48]
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
call fcn.1002193c
add esp, 0xc
and dword [ebp - 0x48], 0
test esi, esi
je 0x100220bd
push esi
call ebx
and dword [ebp - 0x68], 0
and dword [ebp - 0x64], 0
mov esi, dword [ebp - 0x10]
lea eax, [ebp + 0x5000]
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
inc esi
mov dword [ebp - 0x10], esi
push 0
push str.SeBackupPrivilege
call fcn.100240e5
push 0
push str.SeRestorePrivilege
call fcn.100240e5
add esp, 0x10
jmp 0x10022102
push str.___failed_to_set_Privileges
call fcn.100333b3
pop ecx
sub edi, 1
jne 0x10021f95
mov esi, 0x20019
lea ecx, [ebp - 0x74]
push esi
push 0x100eb668
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.10017b89
test eax, eax
jne 0x100221a0
mov edi, dword [ebp - 0x74]
lea ecx, [ebp - 0x58]
push esi
push str.Classes
push edi
call fcn.10017b89
test eax, eax
jne 0x100221a0
mov esi, dword [ebp - 0x58]
lea ecx, [ebp - 0x28]
push 0x2001f
push 0x100eb68c
push esi
call fcn.10017b89
test eax, eax
jne 0x100221a0
mov eax, dword [ebp - 0x28]
sub esp, 0xc
mov ecx, dword [ebp - 0x20]
mov edx, esp
and dword [ebp - 0x28], 0
and dword [ebp - 0x20], 0
mov dword [edx], eax
mov eax, dword [ebp - 0x24]
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
call fcn.1002193c
add esp, 0xc
test edi, edi
je 0x1002218b
push edi
call ebx
xor edi, edi
mov dword [ebp - 0x74], edi
jmp 0x1002218d
xor edi, edi
mov dword [ebp - 0x70], edi
test esi, esi
je 0x1002219a
push esi
call ebx
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x24], edi
lea ecx, [ebp - 0x8c]
call fcn.100218ec
lea ecx, [ebp - 0x4c]
call fcn.10017647
lea ecx, [ebp - 0x68]
call fcn.10017647
lea ecx, [ebp - 0x28]
call fcn.10017647
lea ecx, [ebp - 0x58]
call fcn.10017647
lea ecx, [ebp - 0x74]
call fcn.10017647
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.1005e187
add ebp, 0x7004
leave
ret