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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a791b
mov eax, dword fs:[0]
push eax
mov eax, 0x144c
call fcn.00492790
mov eax, dword [0x4dc6e0]
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]
push 2
mov dword [ebp - 0x1430], ebx
call fcn.0048fb2f
xor ecx, ecx
mov dword [ebp - 0x1424], eax
add esp, 4
mov word [eax], cx
lea eax, [ebp - 0x1440]
mov dword [ebp - 4], ecx
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x404098
lea eax, [ebp - 0x1454]
mov dword [ebp - 0x1454], 0x1000
push eax
push 0x1000
lea eax, [ebp - 0x1420]
push eax
push 1
push dword [ebp - 0x1440]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x1440]
test eax, eax
jne 0x4040ad
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x4044d0
push 0x400
push 3
push ebx
jmp 0x4044c3
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea eax, [ebp - 0x144c]
push eax
lea eax, [ebp - 0x143c]
mov dword [ebp - 0x1448], 0
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x1448]
push eax
push 0
push 0x4b4954
push 0
call esi
push dword [ebp - 0x1448]
call fcn.0048fb2f
add esp, 4
mov dword [ebp - 0x1428], eax
lea ecx, [ebp - 0x144c]
push ecx
lea ecx, [ebp - 0x143c]
push ecx
lea ecx, [ebp - 0x218]
push ecx
lea ecx, [ebp - 0x1448]
push ecx
push eax
push 0x4b0550
push 0
call esi
push 0x620
call fcn.0048fb2f
mov edx, dword [ebp - 0x1424]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x1434], ebx
lea edi, [ebx + 8]
mov esi, edi
movzx ecx, word [edx]
lea edx, [edx + 2]
mov word [esi], cx
lea esi, [esi + 2]
test cx, cx
jne 0x404144
mov ecx, 0x4b4970
sub edi, ecx
lea esp, [esp]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edi + ecx - 2], ax
test ax, ax
jne 0x404160
mov eax, dword [0x4dfa7c]
lea esi, [ebx + 0x210]
sub eax, dword [0x4dfa78]
push 0x4afa78
push 0x4b4954
sar eax, 2
push 0x4b4984
push esi
mov dword [ebx + 4], eax
call fcn.0049215f
mov edi, dword [ebp - 0x1430]
add esp, 0x10
test edi, edi
je 0x4041cb
push esi
push dword [ebx + 4]
push 0x400
push 0xffffffffffffffff
push 3
push edi
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call dword [sym.imp.USER32.dll_InsertMenuW]
push dword [ebp - 0x1420]
push dword [ebp - 0x1428]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4041ec
mov byte [ebx], 1
mov dword [0x4de44c], ebx
jmp 0x4041ef
mov byte [ebx], 0
push 0x4b4990
push 0x4de030
lea eax, [ebx + 0x418]
push 0x4b4984
push eax
call fcn.0049215f
add esp, 0x10
lea eax, [ebp - 0x1434]
mov ecx, 0x4dfa78
push eax
call fcn.0043c400
lea eax, [ebp - 0x142c]
push eax
push dword [0x4de020]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
push 0x4b49a0
push dword [section..data]
call fcn.00406320
add esp, 0x14
test eax, eax
jne 0x4044a6
lea eax, [ebp - 0x1424]
xor ebx, ebx
push eax
push ebx
push dword [ebp - 0x142c]
mov dword [ebp - 0x1428], ebx
call fcn.00410500
add esp, 0xc
test eax, eax
jne 0x40449a
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [ebp - 0x1424]
lea eax, [ebp - 0x1444]
push eax
push dword [0x4de020]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
push eax
push 0
push esi
push dword [ebp - 0x142c]
call fcn.00406320
add esp, 0x14
test eax, eax
jne 0x40446f
lea eax, [ebp - 0x1438]
mov dword [ebp - 0x1438], 4
push eax
lea eax, [ebp - 0x1450]
push eax
push 0
push 0
push 0x4b4a14
push dword [ebp - 0x1444]
call edi
test eax, eax
jne 0x404463
test byte [ebp - 0x1450], 8
jne 0x404463
push dword [ebp - 0x1424]
call fcn.00404a60
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40445d
lea eax, [ebp - 0x144c]
mov dword [ebp - 0x1458], 0x104
push eax
lea eax, [ebp - 0x143c]
mov dword [ebp - 0x143c], 0x104
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x1458]
push eax
lea eax, [ebp - 0x420]
push eax
push ebx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
je 0x404456
push 0x620
call fcn.0048fb2f
add esp, 4
mov dword [ebp - 0x1438], 0x208
mov esi, eax
lea eax, [ebp - 0x1438]
mov dword [ebp - 0x1434], esi
push eax
lea ecx, [esi + 0x418]
push ecx
push 0
push 0
push 0x4b4a20
push dword [ebp - 0x1444]
call edi
test eax, eax
jne 0x40444d
mov ecx, dword [ebp - 0x1424]
lea edx, [esi + 8]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x4043a5
mov eax, dword [0x4dfa7c]
lea edi, [esi + 0x210]
sub eax, dword [0x4dfa78]
sar eax, 2
mov dword [esi + 4], eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
push 0x4b4984
push edi
call fcn.0049215f
mov eax, dword [ebp - 0x1430]
add esp, 0x10
test eax, eax
je 0x404415
push edi
push dword [esi + 4]
push 0x400
push 0xffffffffffffffff
push 3
push eax
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call dword [sym.imp.USER32.dll_InsertMenuW]
push dword [ebp - 0x1420]
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x404431
mov byte [esi], 1
mov dword [0x4de44c], esi
jmp 0x404434
mov byte [esi], 0
lea eax, [ebp - 0x1434]
mov ecx, 0x4dfa78
push eax
call fcn.0043c400
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
jmp 0x404456
push esi
call fcn.0048faf7
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ebx, dword [ebp - 0x1428]
push dword [ebp - 0x1444]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x1424]
inc ebx
push eax
push ebx
push dword [ebp - 0x142c]
mov dword [ebp - 0x1428], ebx
call fcn.00410500
add esp, 0xc
test eax, eax
je 0x404280
mov edi, dword [ebp - 0x1430]
push dword [ebp - 0x142c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x4aff1c
call fcn.0043e9d0
add esp, 4
test eax, eax
jne 0x4044d7
test edi, edi
je 0x4044d0
push 0x400
push 3
push edi
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
mov byte [0x4de452], 1
push dword [ebp - 0x1424]
call fcn.0048faf7
add esp, 4
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.0048fc6c
mov esp, ebp
pop ebp
ret