Function at 0x5bae00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
movzx eax, word [ebx + 0xc]
movzx ecx, word [ebx + 0xe]
push esi
mov esi, dword [ebp + 0x10]
push edi
movzx edi, word [ebx + 0x10]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x1c], edi
cmp esi, 2
jg 0x5bae4b
dec esi
js 0x5bb0de
mov edi, dword [ebp + 0xc]
movzx eax, word [edi + esi*2]
push eax
push ebx
call sym.postgres.exe_PageIndexTupleDelete
add esp, 8
dec esi
jns 0x5bae33
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x18
jb 0x5bae6a
cmp eax, ecx
jg 0x5bae6a
cmp ecx, edi
jg 0x5bae6a
cmp edi, 0x2000
jg 0x5bae6a
lea ecx, [edi + 7]
and ecx, 0xfffffff8
cmp edi, ecx
je 0x5baeb6
push 0
push 0x73c89c
push 0x2f1
push str.src_backend_storagepage_bufpage.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5baeb6
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
push edi
push edx
push eax
push str.corrupted_page_pointers:_lower___u__upper___u__special___u
call sym.postgres.exe_errmsg
add esp, 0x10
push eax
push 0x1000a28
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
movzx eax, word [ebx + 0xc]
cmp eax, 0x18
ja 0x5baec6
xor esi, esi
mov dword [ebp - 0x14], esi
jmp 0x5baed1
lea eax, [eax - 0x18]
shr eax, 2
mov dword [ebp - 0x14], eax
mov esi, eax
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
mov ecx, esi
shl ecx, 4
push ecx
push edx
call sym.postgres.exe_MemoryContextAlloc
xor edx, edx
mov ecx, 1
xor edi, edi
add esp, 8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edi
mov dword [ebp + 8], edx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ecx
cmp esi, ecx
jl 0x5bafe2
mov dword [ebp - 0x10], ecx
lea esi, [eax + 0xc]
lea esp, [esp]
mov eax, dword [ebp - 0x10]
mov eax, dword [ebx + eax*4 + 0x14]
mov edi, eax
and eax, 0x7fff
shr edi, 0x11
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0x24]
jb 0x5baf3b
lea ecx, [eax + edi]
cmp ecx, dword [ebp - 0x1c]
ja 0x5baf3b
lea ecx, [eax + 7]
and ecx, 0xfffffff8
cmp eax, ecx
je 0x5baf89
push 0
push 0x73c89c
push 0x30a
push str.src_backend_storagepage_bufpage.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5baf83
mov edx, dword [ebp - 4]
push edi
push edx
push str.corrupted_item_pointer:_offset___u__size___u
call sym.postgres.exe_errmsg
add esp, 0xc
push eax
push 0x1000a28
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
cmp edx, dword [ebp + 0x10]
jge 0x5bafa4
mov eax, dword [ebp + 0xc]
mov cx, word [ebp - 0xc]
cmp cx, word [eax + edx*2]
jne 0x5bafa1
inc edx
mov dword [ebp - 8], edx
jmp 0x5bafc9
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [esi - 8], eax
mov eax, dword [ebp - 0x10]
mov dword [esi - 0xc], ecx
mov eax, dword [ebx + eax*4 + 0x14]
mov dword [esi], eax
lea eax, [edi + 7]
and eax, 0xfffffff8
add dword [ebp - 0x18], eax
mov dword [esi - 4], eax
add esi, 0x10
inc ecx
mov dword [ebp + 8], ecx
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
movzx eax, ax
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x14]
jle 0x5baf10
mov edi, dword [ebp - 0x18]
cmp edx, dword [ebp + 0x10]
je 0x5bb00a
push 0x73c89c
push 0x31f
push str.src_backend_storagepage_bufpage.c
call sym.postgres.exe_elog_start
push str.incorrect_index_offsets_supplied
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0x14
mov esi, dword [ebp - 0x1c]
sub esi, dword [ebp - 0x28]
cmp edi, esi
jbe 0x5bb059
push 0
push 0x73c89c
push 0x325
push str.src_backend_storagepage_bufpage.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x5bb059
push esi
push edi
push str.corrupted_item_lengths:_total__u__available_space__u
call sym.postgres.exe_errmsg
add esp, 0xc
push eax
push 0x1000a28
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
push 0x5ba890
push 0x10
push ecx
push edx
call sym.postgres.exe_pg_qsort
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x1c]
add esp, 0x10
test eax, eax
jle 0x5bb0c3
mov esi, dword [ebp - 0x20]
add esi, 8
mov dword [ebp + 0x10], eax
mov eax, dword [esi - 8]
mov edx, dword [esi - 4]
lea ecx, [ebx + eax*4 + 0x18]
mov eax, dword [esi]
push eax
sub edi, eax
add edx, ebx
push edx
lea eax, [edi + ebx]
push eax
mov dword [ebp - 0x28], ecx
call dword [sym.imp.MSVCR100.dll_memmove]
mov ecx, dword [esi + 4]
mov edx, dword [ebp - 0x28]
xor ecx, edi
and ecx, 0x7fff
xor ecx, dword [esi + 4]
add esp, 0xc
add esi, 0x10
dec dword [ebp + 0x10]
mov dword [edx], ecx
jne 0x5bb083
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
lea eax, [eax*4 + 0x18]
push ecx
mov word [ebx + 0xc], ax
mov word [ebx + 0xe], di
call sym.postgres.exe_pfree
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret