Function at 0x40a960
Capabilities:
Compare security identifiers
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc44
push 0x41cd38
call section..text
add esp, 4
test eax, eax
jne 0x40a99d
cmp dword [ebp + 8], 0
je 0x40a998
push 0x400
push 3
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
jmp 0x40ae0b
lea ecx, [ebp - 0xc44]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40a9da
cmp dword [ebp + 8], 0
je 0x40a9d5
push 0x400
push 3
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
jmp 0x40ae0b
mov dword [ebp - 0xc40], 0x800
lea eax, [ebp - 0xc40]
push eax
mov ecx, dword [ebp - 0xc40]
push ecx
lea edx, [ebp - 0xc30]
push edx
push 1
mov eax, dword [ebp - 0xc44]
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x40aa3c
mov ecx, dword [ebp - 0xc44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], 0
je 0x40aa37
push 0x400
push 3
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
jmp 0x40ae0b
lea eax, [ebp - 0xc30]
mov dword [ebp - 0x324], eax
mov ecx, dword [ebp - 0xc44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0xc38]
push edx
push 0x20019
push 0
push 0x41cd4c
mov eax, dword [reloc.OLEAUT32.dll_SysReAllocString]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40adae
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x218], 0x104
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x210]
push edx
mov eax, dword [ebp - 0x430]
push eax
mov ecx, dword [ebp - 0xc38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x40ada1
lea edx, [ebp - 0x10c]
push edx
push 0x20019
push 0
lea eax, [ebp - 0x210]
push eax
mov ecx, dword [ebp - 0xc38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40ad83
mov dword [ebp - 0x218], 4
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0xc34]
push eax
push 0
push 0
push 0x41cd88
mov ecx, dword [ebp - 0x10c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ad76
mov edx, dword [ebp - 0xc34]
and edx, 8
test edx, edx
jne 0x40ad76
lea eax, [ebp - 0x210]
push eax
call fcn.0040a6a4
add esp, 4
mov dword [ebp - 0x328], eax
cmp dword [ebp - 0x328], 0
je 0x40ad76
mov dword [ebp - 0x320], 0x104
mov dword [ebp - 0x214], 0x104
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x214]
push edx
lea eax, [ebp - 0x31c]
push eax
lea ecx, [ebp - 0x320]
push ecx
lea edx, [ebp - 0x42c]
push edx
mov eax, dword [ebp - 0x328]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
test eax, eax
je 0x40ad69
push 0x314
call fcn.0040db27
add esp, 4
mov dword [ebp - 0xc3c], eax
mov dword [ebp - 0x218], 0x104
lea ecx, [ebp - 0x218]
push ecx
mov edx, dword [ebp - 0xc3c]
add edx, 0x210
push edx
push 0
push 0
push 0x41cd90
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ad5a
lea ecx, [ebp - 0x210]
push ecx
mov edx, dword [ebp - 0xc3c]
add edx, 8
push edx
call fcn.0040dc70
add esp, 8
mov eax, dword [0x420aa4]
add eax, 0xa028
mov ecx, dword [ebp - 0xc3c]
mov dword [ecx + 4], eax
lea edx, [ebp - 0x42c]
push edx
lea eax, [ebp - 0x31c]
push eax
push 0x41cda4
mov ecx, dword [ebp - 0xc3c]
add ecx, 0x10c
push ecx
call fcn.0040dddb
add esp, 0x10
cmp dword [ebp + 8], 0
je 0x40ac84
mov edx, dword [ebp - 0xc3c]
add edx, 0x10c
push edx
mov eax, dword [ebp - 0xc3c]
mov ecx, dword [eax + 4]
push ecx
push 0x400
push 0xffffffffffffffff
push 3
mov edx, dword [ebp + 8]
push edx
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 [ebp - 0x324]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp - 0x328]
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x40aced
mov eax, dword [ebp - 0xc3c]
mov byte [eax], 1
mov ecx, dword [ebp - 0xc3c]
mov dword [0x420aac], ecx
cmp dword [ebp + 8], 0
je 0x40aceb
mov edx, dword [ebp - 0xc3c]
add edx, 0x10c
push edx
push 0x41cdac
lea eax, [ebp - 0x104]
push eax
call fcn.0040dddb
add esp, 0xc
lea ecx, [ebp - 0x104]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_SetWindowTextA]
jmp 0x40acf6
mov eax, dword [ebp - 0xc3c]
mov byte [eax], 0
cmp dword [0x420aa8], 0
je 0x40ad22
mov ecx, dword [0x420aa4]
lea edx, [ecx*4 + 4]
push edx
mov eax, dword [0x420aa8]
push eax
call fcn.0040e61f
add esp, 8
mov dword [0x420aa8], eax
jmp 0x40ad34
push 0x314
call fcn.0040db27
add esp, 4
mov dword [0x420aa8], eax
mov ecx, dword [0x420aa4]
mov edx, dword [0x420aa8]
mov eax, dword [ebp - 0xc3c]
mov dword [edx + ecx*4], eax
mov ecx, dword [0x420aa4]
add ecx, 1
mov dword [0x420aa4], ecx
jmp 0x40ad69
mov edx, dword [ebp - 0xc3c]
push edx
call fcn.0040da3e
add esp, 4
mov eax, dword [ebp - 0x328]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 0x10c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x430]
add edx, 1
mov dword [ebp - 0x430], edx
mov dword [ebp - 0x218], 0x104
jmp 0x40aa90
mov eax, dword [ebp - 0xc38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 8], 0
je 0x40ae0b
push 0
push 0x9c58
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
cmp dword [0x420aa4], 0
jne 0x40adef
push 0x400
push 3
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
jmp 0x40ae0b
push 8
mov eax, dword [0x420aac]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov esp, ebp
pop ebp
ret