Function at 0x21047d11
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
cmp dword [0x2108afc4], 0
jne 0x21047d48
cmp dword [ebp + 8], 0
je 0x21047d2f
mov eax, dword [ebp + 8]
mov dword [eax], 1
cmp dword [ebp + 0xc], 0
je 0x21047d3e
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0x3000
mov eax, 1
jmp 0x21047f31
cmp dword [ebp + 8], 0
je 0x21047d57
mov edx, dword [ebp + 8]
mov dword [edx], 0
cmp dword [ebp + 0xc], 0
je 0x21047d66
mov eax, dword [ebp + 0xc]
mov dword [eax], 0
call fcn.21047812
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x21047d7c
or eax, 0xffffffff
jmp 0x21047f31
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0xffffffff
push 8
call fcn.2104eb2c
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x21047dad
jmp 0x21047f2f
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push 2
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x21047dd1
jmp 0x21047f2d
mov eax, dword [ebp - 4]
push eax
call fcn.210636c3
add esp, 4
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jne 0x21047df1
jmp 0x21047f2b
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 2
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x21047e12
jmp 0x21047f29
cmp dword [0x2108afc4], 5
jl 0x21047e2f
cmp dword [ebp + 0xc], 0
je 0x21047e2f
mov eax, dword [ebp - 0x1c]
push eax
call fcn.21047a19
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov dword [ebp - 0xc], 0
cmp dword [ebp + 8], 0
je 0x21047e45
mov edx, dword [ebp + 8]
mov dword [edx], 0
mov dword [ebp - 0x18], 0
jmp 0x21047e57
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
cmp edx, dword [ecx]
jae 0x21047ede
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*8 + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x21047e7c
jmp 0x21047e4e
mov dword [ebp - 0xc], 1
cmp dword [ebp + 8], 0
je 0x21047e92
mov ecx, dword [ebp + 8]
mov dword [ecx], 1
cmp dword [0x2108afc4], 5
jl 0x21047ede
mov dword [ebp - 4], 4
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 4]
push eax
lea ecx, [ebp - 0x20]
push ecx
push 0x14
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x21047ec0
jmp 0x21047f27
cmp dword [ebp - 0x20], 0
jne 0x21047ede
cmp dword [ebp + 8], 0
jne 0x21047ed5
mov dword [ebp - 0xc], 0
jmp 0x21047ede
mov eax, dword [ebp + 8]
mov dword [eax], 0
cmp dword [ebp - 0x1c], 0
je 0x21047eee
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0
je 0x21047efe
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.210636ec
add esp, 4
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.210636ec
add esp, 4
mov eax, dword [ebp - 0xc]
jmp 0x21047f31
jmp 0x21047ede
jmp 0x21047ede
jmp 0x21047ede
jmp 0x21047ede
jmp 0x21047ede
mov esp, ebp
pop ebp
ret 8