Function at 0x5761b0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x10c], eax
mov eax, dword [0x822b44]
mov word [ebp - 0x108], 0x500
cmp eax, 0xffffffff
jne 0x576494
lea eax, [ebp - 0x110]
push eax
push 0x20008
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x576234
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.could_not_open_process_token:_error_code__lu_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call sym.postgres.exe_pg_fprintf
add esp, 0xc
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [ebp - 0x110]
push edi
push pe_nt_image_headers32
lea ecx, [ebp - 0x104]
push ecx
lea edx, [ebp - 0x114]
push edx
mov edi, 1
call fcn.00575f20
add esp, 0xc
test eax, eax
jne 0x576291
lea eax, [ebp - 0x104]
push eax
push 0x6ab5fc
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call sym.postgres.exe_pg_fprintf
add esp, 0xc
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x118]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x12
push 1
lea edx, [ebp - 0x10c]
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x5762f2
push str.could_not_get_SID_for_local_system_account_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call sym.postgres.exe_pg_fprintf
mov eax, dword [ebp - 0x110]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x114]
mov ecx, dword [edi]
mov edx, dword [ebp - 0x118]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x57634f
mov eax, dword [ebp - 0x118]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push edi
call dword [sym.imp.MSVCR100.dll_free]
mov ecx, dword [ebp - 0x110]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [0x822b44], 1
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x118]
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov esi, dword [sym.imp.MSVCR100.dll_free]
push edi
call esi
mov ebx, dword [ebp - 0x110]
push pe_nt_image_headers32
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x114]
push ecx
mov edi, 2
call fcn.00575f20
add esp, 0x10
test eax, eax
jne 0x5763c2
lea edx, [ebp - 0x104]
push edx
push 0x6ab5fc
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call sym.postgres.exe_pg_fprintf
add esp, 0xc
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
xor edi, edi
lea eax, [ebp - 0x11c]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push 6
push 1
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x576428
push str.could_not_get_SID_for_service_group_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call sym.postgres.exe_pg_fprintf
mov edx, dword [ebp - 0x114]
push edx
call esi
mov eax, dword [ebp - 0x110]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x114]
mov dword [0x822b44], edi
cmp dword [esi], edi
jbe 0x576468
lea ebx, [esi + 4]
jmp 0x576440
mov ecx, dword [ebx]
mov edx, dword [ebp - 0x11c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x57645e
inc edi
add ebx, 8
cmp edi, dword [esi]
jb 0x576440
jmp 0x576468
mov dword [0x822b44], 1
push esi
call dword [sym.imp.MSVCR100.dll_free]
mov eax, dword [ebp - 0x11c]
add esp, 4
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x822b44]
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret