Function at 0x5c86e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov eax, edi
lea ecx, [eax + 1]
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x5c86f0
mov edx, dword [ebp + 8]
sub eax, ecx
mov dword [ebp - 4], eax
xor eax, eax
mov dword [edx], eax
xor esi, esi
cmp byte [ebp + 0xc], al
mov dword [edx + 4], eax
setne al
mov ebx, 4
xor eax, dword [edx + 4]
and eax, 1
xor dword [edx + 4], eax
cmp byte [edi], 0
je 0x5c896a
cmp ebx, 4
jne 0x5c8819
push edi
call sym.postgres.exe_t_isalpha
add esp, 4
test eax, eax
je 0x5c87ae
test esi, esi
je 0x5c8757
mov ecx, dword [ebp - 4]
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
add ecx, 9
push ecx
push edx
call sym.postgres.exe_MemoryContextAllocZero
mov dword [esi + 4], eax
jmp 0x5c876f
mov eax, dword [ebp - 4]
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
add eax, 9
push eax
push ecx
call sym.postgres.exe_MemoryContextAllocZero
mov edx, dword [ebp + 8]
mov dword [edx], eax
add esp, 8
push edi
mov esi, eax
call sym.postgres.exe_pg_mblen
push eax
lea eax, [esi + 8]
push edi
push eax
call sub.MSVCR100.dll_memcpy
mov ecx, dword [esi]
and ecx, 0xfffffffd
or ecx, 1
push edi
mov dword [esi], ecx
call sym.postgres.exe_pg_mblen
lea edx, [eax*4]
xor edx, dword [esi]
add esp, 0x14
and edx, 0x3fffc
xor dword [esi], edx
jmp 0x5c8927
cmp byte [edi], 0x5b
jne 0x5c87ff
test esi, esi
je 0x5c87cf
mov eax, dword [ebp - 4]
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
add eax, 9
push eax
push ecx
call sym.postgres.exe_MemoryContextAllocZero
mov dword [esi + 4], eax
jmp 0x5c87e6
mov edx, dword [ebp - 4]
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
add edx, 9
push edx
push eax
call sym.postgres.exe_MemoryContextAllocZero
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov esi, eax
mov edx, dword [esi]
and edx, 0xfffffffd
add esp, 8
or edx, 1
mov dword [esi], edx
mov ebx, 1
jmp 0x5c8927
push 0x73f34c
push 0x77
push str.src_backend_tsearch_regis.c
call sym.postgres.exe_elog_start
mov eax, dword [ebp + 0x10]
push eax
jmp 0x5c8918
cmp ebx, 1
jne 0x5c8884
cmp byte [edi], 0x5e
jne 0x5c8837
mov ecx, dword [esi]
and ecx, 0xfffffffe
or ecx, 2
mov dword [esi], ecx
mov ebx, 3
jmp 0x5c8927
push edi
call sym.postgres.exe_t_isalpha
add esp, 4
test eax, eax
je 0x5c8875
push edi
call sym.postgres.exe_pg_mblen
push eax
lea edx, [esi + 8]
push edi
push edx
call sub.MSVCR100.dll_memcpy
push edi
call sym.postgres.exe_pg_mblen
add eax, eax
add eax, eax
xor eax, dword [esi]
add esp, 0x14
and eax, 0x3fffc
xor dword [esi], eax
mov ebx, 2
jmp 0x5c8927
push 0x73f34c
push 0x87
jmp 0x5c890a
cmp ebx, 2
je 0x5c88aa
cmp ebx, 3
je 0x5c88aa
push 0x73f34c
push 0x96
push str.src_backend_tsearch_regis.c
call sym.postgres.exe_elog_start
push ebx
push str.internal_error_in_RS_compile:_state__d
jmp 0x5c891d
push edi
call sym.postgres.exe_t_isalpha
add esp, 4
test eax, eax
je 0x5c88f4
push edi
call sym.postgres.exe_pg_mblen
mov edx, dword [esi]
push eax
shr edx, 2
and edx, 0xffff
lea eax, [edx + esi + 8]
push edi
push eax
call sub.MSVCR100.dll_memcpy
push edi
call sym.postgres.exe_pg_mblen
mov ecx, dword [esi]
mov edx, ecx
and edx, 0xfffffffc
lea eax, [edx + eax*4]
xor eax, ecx
and eax, 0x3fffc
add esp, 0x14
xor eax, ecx
mov dword [esi], eax
jmp 0x5c8927
cmp byte [edi], 0x5d
jne 0x5c8900
mov ebx, 4
jmp 0x5c8927
push 0x73f34c
push 0x93
push str.src_backend_tsearch_regis.c
call sym.postgres.exe_elog_start
mov ecx, dword [ebp + 0x10]
push ecx
push str.invalid_regis_pattern:___s_
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0x18
push edi
call sym.postgres.exe_pg_mblen
add edi, eax
add esp, 4
cmp byte [edi], 0
jne 0x5c8725
cmp ebx, 4
je 0x5c8967
push 0x73f34c
push 0x9b
push str.src_backend_tsearch_regis.c
call sym.postgres.exe_elog_start
mov edx, dword [ebp + 0x10]
push edx
push str.invalid_regis_pattern:___s_
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
test ecx, ecx
je 0x5c898f
mov eax, dword [edx + 4]
mov esi, eax
and esi, 0xfffffffe
add esi, 2
xor esi, eax
and esi, 0x1fffe
xor eax, esi
mov dword [edx + 4], eax
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x5c8973
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret