Function at 0x40fca0
Capabilities:
Compare security identifiers
Get thread local storage value
Get user security identifier
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x45bf6b
mov eax, dword fs:[0]
push eax
sub esp, 0xc48
mov eax, dword [0x473354]
xor eax, esp
mov dword [esp + 0xc44], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x473354]
xor eax, esp
push eax
lea eax, [esp + 0xc5c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xc6c]
push 1
call fcn.0042f396
mov dword [esp + 0x18], eax
mov byte [eax], 0
xor edi, edi
push str.SeRestorePrivilege
mov dword [esp + 0xc6c], edi
call fcn.00403df0
add esp, 8
test eax, eax
jne 0x40fd2d
cmp ebp, edi
je 0x40fd23
push 0x400
push 3
push ebp
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
mov eax, dword [esp + 0x14]
push eax
jmp 0x410213
lea ecx, [esp + 0x24]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40fd68
cmp ebp, edi
je 0x40fd5e
push 0x400
push 3
push ebp
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
mov edx, dword [esp + 0x14]
push edx
jmp 0x410213
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x44]
push eax
push 0x800
lea ecx, [esp + 0x460]
push ecx
push 1
push edx
mov dword [esp + 0x58], 0x800
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x40fdc0
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, edi
je 0x41020e
push 0x400
push 3
push ebp
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
jmp 0x41020e
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x28]
push eax
push edi
push str.NT_AUTHORITY
push edi
mov dword [esp + 0x38], edi
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0042f396
add esp, 4
mov ebx, eax
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x28]
push edx
push ebx
push str.System
push edi
call esi
push 0x314
call fcn.0042f396
mov edx, dword [esp + 0x18]
mov esi, eax
lea eax, [esi + 8]
add esp, 4
mov dword [esp + 0x28], esi
mov edi, eax
lea ebx, [ebx]
mov cl, byte [edx]
mov byte [edi], cl
inc edx
inc edi
test cl, cl
jne 0x40fe40
mov ecx, dword [str..Default]
mov dword [eax], ecx
mov edx, dword [0x46165c]
mov dword [eax + 4], edx
mov cl, byte [0x461660]
mov byte [eax + 8], cl
mov edx, dword [0x475078]
sub edx, dword [0x475074]
push str.SYSTEM
push str.NT_AUTHORITY
sar edx, 2
add edx, 0xa028
lea edi, [esi + 0x10c]
push str._s_s
push edi
mov dword [esi + 4], edx
call fcn.00432395
add esp, 0x10
test ebp, ebp
je 0x40fec1
mov eax, dword [esi + 4]
push edi
push eax
push 0x400
push 0xffffffffffffffff
push 3
push ebp
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call dword [sym.imp.USER32.dll_InsertMenuA]
mov ecx, dword [esp + 0x458]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x40fedf
mov byte [esi], 1
mov dword [0x474ea0], esi
jmp 0x40fee2
mov byte [esi], 0
push str.Config
push 0x474a28
push str._s_s
add esi, 0x210
push esi
call fcn.00432395
add esp, 0x10
lea edx, [esp + 0x28]
push edx
mov ecx, 0x475068
call fcn.0040dbf0
mov ecx, dword [0x4746a8]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [reloc.OLEAUT32.dll_SysReAllocString]
or eax, 0x20019
push eax
push 0
push str.SoftwareMicrosoftWindows_NTCurrentVersionProfileList
push edx
call fcn.00409f10
add esp, 0x14
test eax, eax
jne 0x41015d
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x14]
push eax
push 0
push ecx
call fcn.00416b90
add esp, 0xc
test eax, eax
jne 0x410152
mov eax, dword [0x4746a8]
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x1c]
or eax, 0x20019
push eax
push 0
push esi
push ecx
call fcn.00409f10
add esp, 0x14
test eax, eax
jne 0x41012e
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x44]
push eax
push 0
push 0
push str.Flags
push ecx
mov dword [esp + 0x38], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x410123
test byte [esp + 0x40], 8
jne 0x410123
mov edx, dword [esp + 0x14]
push edx
call fcn.00405400
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x410123
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x15c]
push ecx
push ebx
mov edi, 0x104
push 0
mov dword [esp + 0x58], edi
mov dword [esp + 0x48], edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
test eax, eax
je 0x41011c
push 0x314
call fcn.0042f396
mov ecx, dword [esp + 0x34]
add esp, 4
mov esi, eax
lea edx, [esp + 0x20]
push edx
lea eax, [esi + 0x210]
push eax
push 0
push 0
push str.ProfileImagePath
push ecx
mov dword [esp + 0x40], esi
mov dword [esp + 0x38], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x410113
mov ecx, dword [esp + 0x14]
lea edx, [esi + 8]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x410068
mov edx, dword [0x475078]
sub edx, dword [0x475074]
lea eax, [esp + 0x14c]
push eax
lea ecx, [esp + 0x4c]
push ecx
sar edx, 2
add edx, 0xa028
lea edi, [esi + 0x10c]
push str._s_s
push edi
mov dword [esi + 4], edx
call fcn.00432395
add esp, 0x10
test ebp, ebp
je 0x4100d2
mov edx, dword [esi + 4]
push edi
push edx
push 0x400
push 0xffffffffffffffff
push 3
push ebp
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call dword [sym.imp.USER32.dll_InsertMenuA]
mov eax, dword [esp + 0x458]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4100ff
lea ecx, [esp + 0x28]
push ecx
mov byte [esi], 1
mov ecx, 0x475068
mov dword [0x474ea0], esi
call fcn.0040dbf0
jmp 0x41011c
lea ecx, [esp + 0x28]
push ecx
mov ecx, 0x475068
mov byte [esi], 0
call fcn.0040dbf0
jmp 0x41011c
push esi
call fcn.0042f4d9
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x14]
inc eax
push ecx
push eax
push edx
mov dword [esp + 0x44], eax
call fcn.00416b90
add esp, 0xc
test eax, eax
je 0x40ff65
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebp, ebp
je 0x41020e
mov edi, dword [sym.imp.USER32.dll_GetMenu]
push 0
push 0x9c58
push ebp
call edi
mov esi, dword [sym.imp.USER32.dll_DeleteMenu]
push eax
call esi
mov ecx, dword [0x475078]
sub ecx, dword [0x475074]
test ecx, 0xfffffffc
jne 0x4101a1
push 0x400
push 3
push ebp
call edi
push eax
call esi
jmp 0x41020e
mov eax, dword [0x474ea0]
test eax, eax
jne 0x4101bc
push eax
mov ecx, 0x475068
call fcn.00405d70
mov eax, dword [eax]
mov dword [0x474ea0], eax
add eax, 0x10c
push eax
lea edx, [esp + 0x254]
push str.Autoruns___s____Sysinternals:_www.sysinternals.com
push edx
call fcn.00432395
add esp, 0xc
lea eax, [esp + 0x250]
push eax
push ebp
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea ecx, [esp + 0x250]
push ecx
mov ecx, 0x474ef0
call fcn.00401200
mov edx, dword [0x474ea0]
mov eax, dword [edx + 4]
push 8
push eax
push ebp
call edi
push eax
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0042f4d9
add esp, 4
mov ecx, dword [esp + 0xc5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc44]
xor ecx, esp
call fcn.00430430
add esp, 0xc54
ret