Function at 0x40a3b0
Capabilities:
Compare security identifiers
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57d568
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x5ce104]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push 0x20019
xor esi, esi
push esi
push edx
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a699
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40a699
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x10]
push ecx
push 0x20008
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40a64d
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40a64d
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [ebp - 0x18]
push ecx
push esi
push esi
push 1
push eax
mov dword [ebp - 0x18], esi
call edi
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40a5ef
push eax
call fcn.00543698
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40a5c9
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x18]
push ebx
push 1
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x40a562
mov edi, dword [ebx]
test edi, edi
je 0x40a562
lea eax, [ebp - 0x28]
push eax
push esi
lea eax, [ebp - 0x14]
push eax
push esi
push esi
push 4
push 4
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
jne 0x40a520
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40a520
cmp word [ecx + 4], si
je 0x40a520
nop dword [eax + eax]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x40a4f2
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40a4f2
cmp byte [eax], 1
jne 0x40a4f2
add eax, 8
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x40a500
mov ecx, dword [ebp - 0x14]
inc esi
movzx eax, word [ecx + 4]
cmp esi, eax
jb 0x40a4c0
jmp 0x40a520
push esi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
push 0
push dword [ebp - 0x14]
push 0
push 0
push 4
push 4
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40a52e
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov esi, 1
call fcn.00531606
add esp, 4
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x1c]
call fcn.00404f80
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1c]
push str._______XD999_GetTokenInformation2_Error_d
push eax
call fcn.00420620
add esp, 0xc
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x1c]
call fcn.00404e00
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00531606
add esp, 4
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1c]
call fcn.00404f80
mov dword [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1c]
push str._______XD999_GetTokenInformation_Error_d
push eax
call fcn.00420620
add esp, 0xc
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x1c]
call fcn.00404e00
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x1c]
call fcn.00404f80
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1c]
push str._______XD999_OpenToKEEE_Error_d
push eax
call fcn.00420620
add esp, 0xc
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x1c]
call fcn.00404e00
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str._______XD999_OpenReg_Error
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret