Function at 0x460830
Capabilities:
Check if file exists
Get file attributes
Query environment variable
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5989cb
mov eax, dword fs:[0]
push eax
sub esp, 0xa80
mov eax, dword [0x62819c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor eax, eax
mov edi, dword [ebp + 0xc]
push 0x20a
push eax
mov dword [ebp - 0xa84], eax
lea eax, [ebp - 0x21c]
push eax
call fcn.0054b380
push 0x20a
lea eax, [ebp - 0x630]
push 0
push eax
call fcn.0054b380
add esp, 0x18
mov dword [ebp - 0xa74], 0x104
xor eax, eax
mov dword [ebp - 0xa4c], 0
lea ecx, [ebp - 0xa5c]
mov dword [ebp - 0xa48], 7
mov word [ebp - 0xa5c], ax
push 0x39
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList_
call fcn.0042daa0
cmp dword [ebp - 0xa48], 8
lea ecx, [ebp - 0xa78]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xa5c]
cmovae eax, dword [ebp - 0xa5c]
push ecx
push 8
push 0
push eax
push 0x80000002
mov dword [ebp - 4], 0
call esi
test eax, eax
je 0x460934
cmp dword [ebp - 0xa48], 8
lea ecx, [ebp - 0xa78]
push ecx
push 8
lea eax, [ebp - 0xa5c]
cmovae eax, dword [ebp - 0xa5c]
push 0
push eax
push 0x80000002
call esi
test eax, eax
jne 0x460c7f
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xa74]
push eax
lea eax, [ebp - 0x21c]
push eax
push 0
push dword [ebp - 0xa78]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x460c73
inc dword [ebp - 0xa84]
lea eax, [ebp - 0xa5c]
cmp dword [ebp - 0xa48], 8
cmovae eax, dword [ebp - 0xa5c]
push eax
lea eax, [ebp - 0x630]
push 0x105
push eax
call fcn.00559d1c
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x630]
push 0x105
push eax
call fcn.00559ca7
push 0x20a
lea eax, [ebp - 0xa44]
push 0
push eax
call fcn.0054b380
add esp, 0x24
lea eax, [ebp - 0xa80]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x630]
push eax
push 0x80000002
call esi
test eax, eax
je 0x4609fe
lea eax, [ebp - 0xa80]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x630]
push eax
push 0x80000002
call esi
test eax, eax
jne 0x460c7f
lea eax, [ebp - 0xa74]
mov dword [ebp - 0xa74], 0x104
push eax
lea eax, [ebp - 0xa44]
push eax
push 0
push 0
push str.ProfileImagePath
push dword [ebp - 0xa80]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x460c2c
lea eax, [ebp - 0xa7c]
xor esi, esi
push eax
push 0x28
mov dword [ebp - 0xa7c], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x460aba
lea eax, [ebp - 0xa8c]
push eax
push str.SeRestorePrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x460aba
mov eax, dword [ebp - 0xa8c]
push esi
push esi
mov dword [ebp - 0xa68], eax
mov eax, dword [ebp - 0xa88]
push 0x10
mov dword [ebp - 0xa64], eax
lea eax, [ebp - 0xa6c]
push eax
push esi
push dword [ebp - 0xa7c]
mov dword [ebp - 0xa6c], 1
mov dword [ebp - 0xa60], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
mov eax, 1
cmovne esi, eax
mov eax, dword [ebp - 0xa7c]
test eax, eax
je 0x460acb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x460c26
push 0x208
lea eax, [ebp - 0x424]
push 0
push eax
call fcn.0054b380
push 0x208
lea eax, [ebp - 0x838]
push 0
push eax
call fcn.0054b380
add esp, 0x18
lea eax, [ebp - 0x424]
push 0x104
push eax
lea eax, [ebp - 0xa44]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x5b5770
lea eax, [ebp - 0x424]
push 0x104
push eax
call fcn.00559ca7
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x838]
push 0x104
push eax
call fcn.00559d1c
add esp, 0x18
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x460c26
lea eax, [ebp - 0x21c]
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x21c]
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x460c2c
mov dword [ebp - 0xa70], eax
lea eax, [ebp - 0xa70]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x838]
push eax
push 0x80000003
call esi
test eax, eax
jne 0x460c06
mov eax, dword [edi + 4]
sub eax, 0
je 0x460bf6
sub eax, 1
jne 0x460c06
mov eax, dword [edi]
test eax, eax
js 0x460c06
cmp eax, 1
jle 0x460be7
cmp eax, 2
jne 0x460c06
push edi
push ebx
push dword [ebp - 0xa70]
call fcn.00461340
jmp 0x460c03
push edi
push ebx
push dword [ebp - 0xa70]
call fcn.00460ce0
jmp 0x460c03
push edi
push ebx
push dword [ebp - 0xa70]
call fcn.004604e0
add esp, 0xc
push dword [ebp - 0xa70]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x21c]
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
jmp 0x460c2c
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push dword [ebp - 0xa80]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xa74]
mov dword [ebp - 0xa74], 0x104
push eax
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0xa84]
push eax
push dword [ebp - 0xa78]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x460960
push dword [ebp - 0xa78]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0xa48]
cmp edx, 8
jb 0x460cbb
mov ecx, dword [ebp - 0xa5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x460cb1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x460cd7
push edx
push ecx
call fcn.00546044
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00545ec7
mov esp, ebp
pop ebp
ret
call fcn.00555394
int3