Function at 0x65c34
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x65ece
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x65eb1
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x65e81
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x18]
push eax
push 0xffffffffffffffff
push 8
call sub.kernel32.dll_GetCurrentThread
push eax
call sub.advapi32.dll_OpenThreadToken
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x65c9a
cmp dword [ebp - 0x18], 0
jne 0x65cc2
cmp dword [ebp - 0x18], 0
je 0x65ca9
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 8
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x65e30
mov dword [ebp - 8], 0xa
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.000597f4
xor eax, eax
push ebp
push 0x65e29
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 2
mov eax, dword [ebp - 0x18]
push eax
call fcn.00065b18
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x65d5b
cmp dword [ebp - 0x14], 1
jbe 0x65d5b
cmp dword [ebp - 0x14], 0x9c4000
ja 0x65d5b
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00059830
mov eax, dword [ebp - 0x14]
add eax, 0x400
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.000597f4
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 2
mov eax, dword [ebp - 0x18]
push eax
call fcn.00065b18
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x65e10
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x65e09
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
push 0x68220
call sub.advapi32.dll_AllocateAndInitializeSid
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x65dc1
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*8 + 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_EqualSid
mov dword [ebp - 0x1c], eax
inc dword [ebp - 0x20]
cmp dword [ebp - 0x1c], 0
jne 0x65de7
mov eax, dword [ebp - 0x20]
cdq
push edx
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x65de3
cmp eax, dword [esp]
pop edx
pop eax
ja 0x65da7
jmp 0x65de7
pop edx
pop eax
jg 0x65da7
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x65e10
cmp dword [ebp - 0x10], 0
je 0x65e03
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_FreeSid
xor eax, eax
mov dword [ebp - 0x10], eax
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x65e30
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00059830
ret
cmp dword [ebp - 0x1c], 0
je 0x65e6b
mov eax, dword [0x683f4]
cmp dword [eax], 6
jb 0x65e6b
xor eax, eax
mov dword [0x68230], eax
call fcn.00065b98
cmp dword [0x68230], 1
je 0x65e62
cmp dword [0x68230], 2
je 0x65e62
xor eax, eax
jmp 0x65e64
mov al, 1
neg al
sbb eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 1], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x65e8f
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x65eb8
cmp dword [ebp - 0x18], 0
je 0x65eab
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
mov dword [ebp - 0x18], eax
ret