Function at 0x51c7d0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58f8c1
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x5ed80c]
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
lea eax, [ebp - 0xf8]
push eax
xor edi, edi
push 8
mov dword [ebp - 0x110], ecx
mov byte [ecx], 0
mov dword [ebp - 0xf8], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x51c854
push 1
push str.mailru::is_admin::is_admin
push str.is_admin.cpp
push 0x12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x7c]
call fcn.004053a0
push 0x5ccbe8
lea ecx, [ebp - 0x7c]
push ecx
call fcn.0055b802
mov esi, dword [ebp - 0xf8]
mov edx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x118], edx
mov byte [ebp - 0x114], 1
mov dword [ebp - 4], edi
mov dword [ebp - 0xf4], edi
mov dword [ebp - 0xf0], edi
mov dword [ebp - 0xec], edi
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0xf4]
mov byte [ebp - 4], 1
call fcn.0051cc40
add eax, 4
push eax
push edi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push 2
push esi
call edi
test eax, eax
sete bl
dec dword [ebp - 0x100]
jne 0x51c8d6
mov eax, dword [ebp - 0x108]
cmp dword [ebp - 0x104], eax
jae 0x51c8d6
mov ecx, dword [ebp - 0x10c]
push eax
call fcn.004262e0
test bl, bl
je 0x51c97d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x51c8fc
push 1
push str.mailru::is_admin::is_admin
push str.is_admin.cpp
push 0x1d
jmp 0x51c83d
lea edx, [ebp - 0x10c]
push edx
lea ecx, [ebp - 0xf4]
call fcn.0051cc40
mov edx, dword [ebp - 0xf4]
mov ecx, dword [ebp - 0xf0]
add eax, 4
push eax
sub ecx, edx
push ecx
push edx
push 2
push esi
call edi
test eax, eax
sete bl
dec dword [ebp - 0x100]
jne 0x51c94e
mov eax, dword [ebp - 0x108]
cmp dword [ebp - 0x104], eax
jae 0x51c94e
mov ecx, dword [ebp - 0x10c]
push eax
call fcn.004262e0
test bl, bl
je 0x51c97d
push 1
push str.mailru::is_admin::is_admin
push str.is_admin.cpp
push 0x20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x7c]
call fcn.004053a0
push 0x5ccbe8
lea eax, [ebp - 0x7c]
push eax
jmp 0x51c84f
lea ecx, [ebp - 0x11c]
call fcn.00402930
xor esi, esi
lea ecx, [ebp - 0xe4]
push ecx
push esi
push esi
push esi
push esi
push esi
push esi
push 0x220
push 0x20
push 2
lea edx, [ebp - 0x18]
push edx
mov dword [ebp - 0xe4], esi
mov dword [ebp - 0x18], esi
mov word [ebp - 0x14], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x51c9ee
push 1
push str.mailru::is_admin::is_admin
push str.is_admin.cpp
push 0x29
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xe0]
call fcn.004053a0
push 0x5ccbe8
lea eax, [ebp - 0xe0]
push eax
jmp 0x51c84f
lea ecx, [ebp - 0xe4]
lea edx, [ebp - 0xfc]
mov dword [ebp - 0xfc], ecx
mov dword [ebp - 0x120], edx
mov eax, dword [ebp - 0xf0]
mov ecx, dword [ebp - 0xf4]
sub eax, ecx
mov byte [ebp - 4], 2
je 0x51ca59
mov ebx, dword [sym.imp.ADVAPI32.dll_EqualSid]
mov edi, dword [ebp - 0x110]
cmp esi, dword [ecx]
jae 0x51ca63
cmp byte [edi], 0
jne 0x51ca63
test eax, eax
je 0x51ca59
mov eax, dword [ecx + esi*8 + 4]
mov ecx, dword [ebp - 0xe4]
push eax
push ecx
call ebx
test eax, eax
je 0x51ca48
mov byte [edi], 1
mov eax, dword [ebp - 0xf0]
mov ecx, dword [ebp - 0xf4]
inc esi
sub eax, ecx
jne 0x51ca20
push str.invalid_vector_T__subscript
call fcn.00522da2
mov edx, dword [ebp - 0xfc]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0xf4]
xor esi, esi
cmp eax, esi
je 0x51ca87
push eax
call fcn.0055ae44
add esp, 4
cmp byte [ebp - 0x114], 0
mov dword [ebp - 0xf4], esi
mov dword [ebp - 0xf0], esi
mov dword [ebp - 0xec], esi
je 0x51caad
lea ecx, [ebp - 0x11c]
call fcn.00402930
mov eax, edi
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.0055bc32
mov esp, ebp
pop ebp
ret