Function at 0x406bb0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x45410c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x454aa0]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x20], esi
push edi
cmp eax, 0xffffffff
jne 0x406be9
push 0
xor edx, edx
lea ecx, [eax + 7]
call fcn.00403700
movzx eax, al
add esp, 4
mov dword [0x454aa0], eax
cmp eax, 1
jne 0x406d33
lea eax, [ebp - 0x1c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x406c10
xor ebx, ebx
jmp 0x406d40
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x24]
push eax
push 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0xc], 0
push eax
push 0x12
push esi
mov word [ebp - 8], 0x500
mov dword [ebp - 0x18], 0
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x406d23
cmp dword [ebp - 0x24], 4
jb 0x406d23
cmp dword [ebp - 0x28], 3
jne 0x406d23
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
xor ebx, ebx
test eax, eax
jne 0x406d25
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x406d25
push dword [ebp - 0x10]
call fcn.00428d6e
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
test edi, edi
je 0x406d25
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push edi
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x406d0c
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x406d0c
xor esi, esi
cmp dword [edi], ebx
jbe 0x406d03
mov ebx, dword [ebp - 0x14]
add edi, 4
lea ebx, [ebx]
push dword [ebp - 0x18]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x406cfb
inc esi
add edi, 8
cmp esi, dword [ebx]
jb 0x406ce0
xor ebx, ebx
jmp 0x406d00
mov ebx, 1
mov edi, dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push edi
call fcn.00428d79
add esp, 4
push dword [ebp - 0x1c]
call dword [0x45403c]
mov esi, dword [ebp - 0x20]
jmp 0x406d40
xor ebx, ebx
push dword [ebp - 0x1c]
call dword [0x45403c]
mov esi, dword [ebp - 0x20]
jmp 0x406d40
call dword [0x4540c4]
neg eax
sbb eax, eax
lea ebx, [eax + 1]
mov byte [esi + 8], bl
mov ebx, dword [ebp - 0x20]
push 0x104
lea esi, [ebx + 0xa]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
call dword [0x4540c8]
mov dword [ebx + 0x214], eax
call fcn.0042dd19
mov edi, dword [eax]
add edi, 4
mov esi, dword [edi]
test esi, esi
je 0x406e09
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406d80
sub ecx, edx
sar ecx, 1
cmp ecx, 1
jbe 0x406dbb
movzx eax, word [esi]
cmp eax, 0x2d
je 0x406da1
cmp eax, 0x2f
jne 0x406dbb
lea eax, [esi + 2]
push 0x44ca18
push eax
call fcn.0042917d
add esp, 8
test eax, eax
sete al
test al, al
jne 0x406e1c
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406dc0
sub ecx, edx
sar ecx, 1
cmp ecx, 2
jbe 0x406dfb
cmp word [esi], 0x2d
jne 0x406dfb
cmp word [esi + 2], 0x2d
jne 0x406dfb
lea eax, [esi + 4]
push str.silent
push eax
call fcn.0042917d
add esp, 8
test eax, eax
sete al
test al, al
jne 0x406e1c
mov esi, dword [edi + 4]
add edi, 4
test esi, esi
jne 0x406d78
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e5ad
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 8], 0
je 0x406e09
cmp dword [ebx + 4], 8
ja 0x406e2f
mov dword [ebx + 4], 0x3f5
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e5ad
mov esp, ebp
pop ebp
ret