joyce8/EMBER2024-capa huggingface dataset:
Function at 0x649580
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
push esi
mov esi, dword [eax + 0x14]
cmp byte [esi + 0xe], 0
push edi
mov dword [ebp - 0x14], esi
mov eax, esi
je 0x6496f4
mov ecx, dword [esi]
push ebx
push ecx
call sym.postgres.exe_pg_detoast_datum
mov esi, eax
mov eax, dword [esi + 4]
lea eax, [eax*4 + 8]
lea edx, [eax + esi]
push eax
mov dword [ebp + 8], eax
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
push eax
mov dword [ebp - 0x10], esi
lea ebx, [esi + 8]
mov dword [ebp - 4], edx
call sym.postgres.exe_MemoryContextAlloc
mov ecx, dword [ebp + 8]
mov edi, eax
lea edx, [ecx*4]
mov dword [edi], edx
mov dword [edi + 4], 1
mov ecx, dword [esi + 4]
add esp, 0xc
mov dword [ebp - 8], edi
lea eax, [edi + 8]
mov dword [ebp + 8], ecx
test ecx, ecx
je 0x649654
sub eax, ebx
mov dword [ebp - 0xc], eax
lea ebx, [ebx]
mov eax, dword [ebx]
dec dword [ebp + 8]
mov edx, eax
shr edx, 0xc
add edx, dword [ebp - 4]
shr eax, 1
or ecx, 0xffffffff
and eax, 0x7ff
mov esi, eax
jbe 0x649640
jmp 0x649620
movzx edi, byte [edx]
mov eax, ecx
shr eax, 0x18
xor eax, edi
and eax, 0xff
shl ecx, 8
xor ecx, dword [eax*4 + sym.postgres.exe_pg_crc32_table]
inc edx
dec esi
jne 0x649620
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
not ecx
mov dword [eax + ebx], ecx
add ebx, 4
cmp dword [ebp + 8], 0
jne 0x649600
mov esi, dword [ebp - 0x10]
mov ebx, dword [esi + 4]
lea eax, [edi + 8]
push eax
call fcn.006494a0
add esp, 4
pop ebx
cmp eax, dword [esi + 4]
je 0x649685
lea esi, [eax*4 + 8]
push esi
push edi
call sym.postgres.exe_repalloc
mov edi, eax
lea ecx, [esi*4]
add esp, 8
mov dword [edi], ecx
mov edx, dword [edi]
and edx, 0xfffffffc
cmp edx, 0x7f8
jbe 0x6496c0
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
push 0x84
push eax
call sym.postgres.exe_MemoryContextAlloc
mov esi, eax
lea ecx, [esi + 8]
push edi
push ecx
mov dword [esi], 0x210
mov dword [esi + 4], 2
call fcn.00649500
add esp, 0x10
mov edi, esi
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
push 0x10
push edx
call sym.postgres.exe_MemoryContextAlloc
mov ecx, dword [ebp - 0x14]
mov dword [eax], edi
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
add esp, 8
mov dword [eax + 8], edx
mov cx, word [ecx + 0xc]
pop edi
mov byte [eax + 0xe], 0
mov word [eax + 0xc], cx
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
mov ecx, dword [edx + 4]
test cl, 2
je 0x649759
test cl, 4
jne 0x649759
xor eax, eax
cmp byte [eax + edx + 8], 0xff
jne 0x64975f
inc eax
cmp eax, 0x7c
jb 0x649705
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
push 8
push edx
call sym.postgres.exe_MemoryContextAlloc
mov edi, eax
mov dword [edi], 0x20
mov dword [edi + 4], 6
mov eax, dword [sym.postgres.exe_CurrentMemoryContext]
push 0x10
push eax
call sym.postgres.exe_MemoryContextAlloc
mov dword [eax], edi
mov ecx, dword [esi + 4]
mov dword [eax + 4], ecx
mov edx, dword [esi + 8]
mov dword [eax + 8], edx
mov cx, word [esi + 0xc]
mov byte [eax + 0xe], 0
add esp, 0x10
mov word [eax + 0xc], cx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x649c00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, eax
xor eax, eax
lea edx, [esi + 2]
push edi
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
sub esi, ecx
mov dword [ebp - 0x10], 0x1f
movzx ebx, byte [ecx]
movzx edi, byte [esi + ecx]
xor edi, ebx
movzx edi, byte [edi + 0x74d180]
movzx ebx, byte [edx - 1]
add eax, edi
movzx edi, byte [ecx + 1]
xor edi, ebx
movzx edi, byte [edi + 0x74d180]
add dword [ebp - 0xc], edi
movzx ebx, byte [edx]
movzx edi, byte [ecx + 2]
xor edi, ebx
movzx edi, byte [edi + 0x74d180]
add dword [ebp - 4], edi
movzx edi, byte [ecx + 3]
movzx ebx, byte [edx + 1]
xor edi, ebx
movzx edi, byte [edi + 0x74d180]
add dword [ebp - 8], edi
add ecx, 4
add edx, 4
dec dword [ebp - 0x10]
jne 0x649c22
mov edx, dword [ebp - 8]
add edx, dword [ebp - 4]
pop edi
add edx, dword [ebp - 0xc]
pop esi
add eax, edx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x64aac0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
cmp edi, 0x7ff
jl 0x64ab1a
push 0
push 0x74d3fc
push 0x11a
push str.src_backendutils_adt_tsquery.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x64ab1a
mov eax, dword [ebx]
push eax
push str.word_is_too_long_in_tsquery:___s_
call sym.postgres.exe_errmsg
add esp, 8
push eax
push 0x105
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ecx, dword [ebp + 0xc]
or edx, 0xffffffff
mov dword [ebp + 0x10], ecx
mov ecx, edi
test edi, edi
je 0x64ab52
lea esp, [esp]
mov esi, dword [ebp + 0x10]
movzx esi, byte [esi]
inc dword [ebp + 0x10]
mov eax, edx
shr eax, 0x18
xor eax, esi
and eax, 0xff
shl edx, 8
xor edx, dword [eax*4 + sym.postgres.exe_pg_crc32_table]
dec ecx
jne 0x64ab30
mov eax, dword [ebp + 0x18]
movsx ecx, word [ebp + 0x14]
push eax
push ecx
mov ecx, dword [ebx + 0x18]
sub ecx, dword [ebx + 0x14]
not edx
push edx
mov eax, edi
call fcn.0064a9d0
mov edx, dword [ebx + 0x18]
sub edx, dword [ebx + 0x14]
add esp, 0xc
lea eax, [edx + edi + 1]
cmp eax, dword [ebx + 0x1c]
jl 0x64abb0
lea ecx, [ecx]
mov eax, dword [ebx + 0x1c]
mov ecx, dword [ebx + 0x14]
mov esi, dword [ebx + 0x18]
add eax, eax
push eax
push ecx
sub esi, ecx
mov dword [ebx + 0x1c], eax
call sym.postgres.exe_repalloc
mov dword [ebx + 0x14], eax
add eax, esi
mov dword [ebx + 0x18], eax
mov ecx, eax
sub ecx, dword [ebx + 0x14]
add esp, 8
lea edx, [ecx + edi + 1]
cmp edx, dword [ebx + 0x1c]
jge 0x64ab80
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x18]
push edi
push eax
push ecx
call sub.MSVCR100.dll_memcpy
add dword [ebx + 0x18], edi
mov eax, dword [ebx + 0x18]
add esp, 0xc
mov byte [eax], 0
inc dword [ebx + 0x18]
inc edi
add dword [ebx + 0x20], edi
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x6556f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x14]
push eax
call sym.postgres.exe_pg_detoast_datum
mov ecx, dword [edi + 0x18]
push ecx
mov esi, eax
call sym.postgres.exe_pg_detoast_datum
mov ecx, dword [esi + 4]
add esp, 8
mov dword [ebp - 4], eax
mov dword [ebp + 8], ecx
cmp ecx, dword [eax + 4]
je 0x655762
push 0
push 0x74e218
push 0x507
push str.src_backendutils_adt_varbit.c
push 0x14
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x655762
push str.cannot_XOR_bit_strings_of_different_sizes
call sym.postgres.exe_errmsg
add esp, 4
push eax
push 0x6080082
call sym.postgres.exe_errcode
add esp, 4
push eax
call sym.postgres.exe_errfinish
add esp, 8
mov ebx, dword [esi]
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
shr ebx, 2
push ebx
push edx
call sym.postgres.exe_MemoryContextAlloc
mov ecx, dword [ebp + 8]
mov edi, eax
lea eax, [ebx*4]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov eax, dword [esi]
shr eax, 2
add esp, 8
sub eax, 8
lea edx, [edi + 8]
mov dword [ebp + 8], 0
je 0x6557c0
mov eax, dword [ebp - 4]
mov ecx, edx
sub ecx, edi
add ecx, esi
sub eax, esi
mov bl, byte [eax + ecx]
xor bl, byte [ecx]
inc dword [ebp + 8]
mov byte [edx], bl
mov ebx, dword [esi]
shr ebx, 2
sub ebx, 8
inc edx
inc ecx
cmp dword [ebp + 8], ebx
jb 0x6557a7
mov ecx, dword [edi]
shr ecx, 2
lea ecx, [ecx*8 - 0x40]
sub ecx, dword [edi + 4]
or al, 0xff
shl al, cl
test al, al
je 0x6557da
and byte [edx - 1], al
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x65fd60
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 1
push ebx
push esi
push edi
mov dword [ebp - 0x94], eax
jne 0x65fe66
call sub.libxml2.dll_xmlBufferCreate
mov ecx, dword [sym.postgres.exe_error_context_stack]
mov dword [ebp - 0x88], eax
mov eax, dword [sym.postgres.exe_PG_exception_stack]
lea edx, [ebp - 0x84]
push 0
push edx
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], ecx
call sub.MSVCR100.dll__setjmp3
add esp, 8
test eax, eax
jne 0x65fe32
mov ecx, dword [ebp - 0x94]
mov esi, dword [ebp - 0x88]
push 1
push 0
push ecx
lea eax, [ebp - 0x84]
push 0
push esi
mov dword [sym.postgres.exe_PG_exception_stack], eax
call sub.libxml2.dll_xmlNodeDump
push esi
call sub.libxml2.dll_xmlBufferLength
add esp, 0x18
push eax
push esi
call sub.libxml2.dll_xmlBufferContent
add esp, 4
push eax
call sym.postgres.exe_cstring_to_text_with_len
mov edx, dword [ebp - 0x90]
mov edi, eax
mov eax, dword [ebp - 0x8c]
push esi
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov dword [sym.postgres.exe_error_context_stack], eax
call sub.libxml2.dll_xmlBufferFree
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x90]
mov edx, dword [ebp - 0x8c]
push eax
mov dword [sym.postgres.exe_PG_exception_stack], ecx
mov dword [sym.postgres.exe_error_context_stack], edx
call sub.libxml2.dll_xmlBufferFree
add esp, 4
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
push eax
call sub.libxml2.dll_xmlXPathCastNodeToString
mov ecx, dword [sym.postgres.exe_PG_exception_stack]
mov edx, dword [sym.postgres.exe_error_context_stack]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x8c], edx
call sub.MSVCR100.dll__setjmp3
add esp, 0xc
test eax, eax
jne 0x65fef9
mov ebx, dword [ebp - 0x90]
lea ecx, [ebp - 0x44]
push ebx
mov dword [sym.postgres.exe_PG_exception_stack], ecx
call sym.postgres.exe_escape_xml
mov esi, eax
push esi
call sym.postgres.exe_cstring_to_text
push esi
mov edi, eax
call sym.postgres.exe_pfree
mov edx, dword [ebp - 0x88]
mov eax, dword [ebp - 0x8c]
mov ecx, dword [sym.imp.libxml2.dll_xmlFree]
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov dword [sym.postgres.exe_error_context_stack], eax
mov edx, dword [ecx]
push ebx
call edx
mov ecx, dword [ebp - 4]
add esp, 0x10
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x8c]
mov edx, dword [ebp - 0x90]
mov dword [sym.postgres.exe_PG_exception_stack], eax
mov eax, dword [sym.imp.libxml2.dll_xmlFree]
mov dword [sym.postgres.exe_error_context_stack], ecx
mov ecx, dword [eax]
push edx
call ecx
add esp, 4
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3
Function at 0x661270
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov esi, eax
call sym.postgres.exe_makeStringInfo
mov ebx, eax
mov eax, dword [ebp + 8]
push eax
call sym.postgres.exe_LookupExplicitNamespace
mov edi, eax
push str._xsd:schema_n____xmlns:xsd_http:__www.w3.org_2001_XMLSchema_
push ebx
mov dword [ebp - 0xc], edi
call sym.postgres.exe_appendStringInfoString
mov eax, esi
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x6612a3
sub eax, edx
je 0x6612bd
push esi
push str._n____targetNamespace__s__n____elementFormDefault_qualified_
push ebx
call sym.postgres.exe_appendStringInfo
add esp, 0xc
push 0x74ee74
push ebx
call sym.postgres.exe_appendStringInfoString
call sym.postgres.exe_SPI_connect
lea ecx, [ebp - 0x1c]
push ecx
call sym.postgres.exe_initStringInfo
push edi
lea edx, [ebp - 0x1c]
push str.SELECT_oid_FROM_pg_catalog.pg_class_WHERE_relnamespace___u_AND_relkind_IN__r__v__AND_pg_catalog.has_table_privilege__oid__SELECT__ORDER_BY_relname_
push edx
call sym.postgres.exe_appendStringInfo
mov eax, dword [ebp - 0x1c]
add esp, 0x18
call fcn.0065f090
mov edi, eax
mov dword [ebp - 8], edi
mov dword [ebp - 4], 0
test edi, edi
je 0x66133e
mov esi, dword [edi + 8]
test esi, esi
je 0x66133e
mov eax, dword [esi]
push 1
push eax
call sym.postgres.exe_heap_open
mov edi, eax
mov ecx, dword [edi + 0x28]
push ecx
call sym.postgres.exe_CreateTupleDescCopy
mov edx, dword [ebp - 4]
push eax
push edx
call sym.postgres.exe_lappend
push 0
push edi
mov dword [ebp - 4], eax
call sym.postgres.exe_relation_close
mov esi, dword [esi + 4]
add esp, 0x1c
test esi, esi
jne 0x661307
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00660710
push eax
push ebx
call sym.postgres.exe_appendStringInfoString
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
push eax
push ecx
mov eax, edi
call fcn.0065f300
push eax
push ebx
call sym.postgres.exe_appendStringInfoString
push str.__xsd:schema_
push ebx
call sym.postgres.exe_appendStringInfoString
add esp, 0x20
call sym.postgres.exe_SPI_finish
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x6613c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, eax
call sym.postgres.exe_makeStringInfo
mov edi, eax
push str._xsd:schema_n____xmlns:xsd_http:__www.w3.org_2001_XMLSchema_
push edi
mov dword [ebp - 4], edi
call sym.postgres.exe_appendStringInfoString
mov eax, esi
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x6613e8
sub eax, edx
je 0x661402
push esi
push str._n____targetNamespace__s__n____elementFormDefault_qualified_
push edi
call sym.postgres.exe_appendStringInfo
add esp, 0xc
push 0x74ee74
push edi
call sym.postgres.exe_appendStringInfoString
add esp, 8
call sym.postgres.exe_SPI_connect
mov eax, str.SELECT_oid_FROM_pg_catalog.pg_class_WHERE_relkind_IN__r__v__AND_pg_catalog.has_table_privilege__pg_class.oid__SELECT__AND_relnamespace_IN__SELECT_oid_FROM_pg_catalog.pg_namespace_WHERE_pg_catalog.has_schema_privilege__oid__USAGE__AND_NOT__nspname__pg__OR_nspname__information_schema___
call fcn.0065f090
mov esi, eax
mov eax, str.SELECT_oid_FROM_pg_catalog.pg_namespace_WHERE_pg_catalog.has_schema_privilege__oid__USAGE__AND_NOT__nspname__pg__OR_nspname__information_schema__ORDER_BY_nspname_
call fcn.0065f090
xor ebx, ebx
mov dword [ebp - 8], eax
test esi, esi
je 0x661473
mov esi, dword [esi + 8]
test esi, esi
je 0x661473
jmp 0x661440
mov eax, dword [esi]
push 1
push eax
call sym.postgres.exe_heap_open
mov edi, eax
mov ecx, dword [edi + 0x28]
push ecx
call sym.postgres.exe_CreateTupleDescCopy
push eax
push ebx
call sym.postgres.exe_lappend
push 0
push edi
mov ebx, eax
call sym.postgres.exe_relation_close
mov esi, dword [esi + 4]
add esp, 0x1c
test esi, esi
jne 0x661440
mov edi, dword [ebp - 4]
mov eax, ebx
call fcn.00660710
push eax
push edi
call sym.postgres.exe_appendStringInfoString
mov eax, dword [ebp - 8]
call fcn.0065f4c0
push eax
push edi
call sym.postgres.exe_appendStringInfoString
push str.__xsd:schema_
push edi
call sym.postgres.exe_appendStringInfoString
add esp, 0x18
call sym.postgres.exe_SPI_finish
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x662730
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [sym.postgres.exe_CurrentMemoryContext]
mov edx, dword [sym.postgres.exe_PG_exception_stack]
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x58], eax
mov eax, dword [sym.postgres.exe_error_context_stack]
mov dword [ebp - 0x54], ecx
lea ecx, [ebp - 0x44]
push ebx
push ecx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], eax
call sub.MSVCR100.dll__setjmp3
mov edi, dword [ebp - 0x50]
add esp, 8
test eax, eax
jne 0x6627a1
lea edx, [ebp - 0x44]
mov dword [sym.postgres.exe_PG_exception_stack], edx
call sym.postgres.exe_GetDatabaseEncoding
push eax
mov eax, dword [ebp - 0x58]
push 1
push ebx
push eax
call fcn.006608c0
add esp, 0x10
mov dword [ebp - 0x48], eax
mov bl, 1
jmp 0x6627d2
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x54]
mov esi, dword [sym.postgres.exe_CurrentMemoryContext]
mov dword [sym.postgres.exe_PG_exception_stack], edi
mov dword [sym.postgres.exe_error_context_stack], ecx
mov dword [sym.postgres.exe_CurrentMemoryContext], edx
call sym.postgres.exe_CopyErrorData
cmp dword [eax + 0x18], 0x1d000082
jne 0x662806
call sym.postgres.exe_FlushErrorState
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
mov dword [sym.postgres.exe_PG_exception_stack], edi
mov dword [sym.postgres.exe_error_context_stack], eax
test ecx, ecx
je 0x6627f3
mov edx, dword [ebp - 0x48]
push edx
call sub.libxml2.dll_xmlFreeDoc
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov dword [sym.postgres.exe_CurrentMemoryContext], esi
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3
Function at 0x663250
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push 1
push eax
call sym.postgres.exe_get_namespace_name
add esp, 4
push eax
call sym.postgres.exe_map_sql_identifier_to_xml_name
mov esi, eax
mov dword [ebp - 4], esi
call sym.postgres.exe_makeStringInfo
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x18]
mov ebx, eax
push ecx
mov eax, esi
push edx
mov esi, ebx
call fcn.0065f150
mov eax, dword [ebp + 0xc]
add esp, 0x14
test eax, eax
je 0x6632a8
push eax
push str._s_n_n
push ebx
call sym.postgres.exe_appendStringInfo
add esp, 0xc
call sym.postgres.exe_SPI_connect
lea eax, [ebp - 0x14]
push eax
call sym.postgres.exe_initStringInfo
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x14]
push str.SELECT_oid_FROM_pg_catalog.pg_class_WHERE_relnamespace___u_AND_relkind_IN__r__v__AND_pg_catalog.has_table_privilege__oid__SELECT__ORDER_BY_relname_
push edx
call sym.postgres.exe_appendStringInfo
mov eax, dword [ebp - 0x14]
add esp, 0x10
call fcn.0065f090
mov esi, eax
call sym.postgres.exe_SPI_push
test esi, esi
je 0x66334c
mov esi, dword [esi + 8]
test esi, esi
je 0x66334c
mov edi, dword [esi]
lea eax, [ebp - 0x14]
push eax
call sym.postgres.exe_initStringInfo
push edi
push 0
push sym.postgres.exe_regclassout
call sym.postgres.exe_DirectFunctionCall1Coll
push eax
lea ecx, [ebp - 0x14]
push str.SELECT__FROM__s
push ecx
call sym.postgres.exe_appendStringInfo
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
add esp, 0x1c
push 0
push edx
push eax
push 0
push edi
call sym.postgres.exe_get_rel_name
mov ecx, dword [ebp - 0x14]
add esp, 4
push eax
mov eax, dword [ebp + 0x18]
push ecx
call fcn.00662a90
mov edx, dword [eax]
push edx
push ebx
call sym.postgres.exe_appendStringInfoString
push 0xa
push ebx
call sym.postgres.exe_appendStringInfoChar
mov esi, dword [esi + 4]
add esp, 0x28
test esi, esi
jne 0x6632e5
call sym.postgres.exe_SPI_pop
call sym.postgres.exe_SPI_finish
mov eax, dword [ebp - 4]
push eax
push str.___s__n
push ebx
call sym.postgres.exe_appendStringInfo
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x663450
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0
mov edi, eax
mov eax, dword [sym.postgres.exe_MyDatabaseId]
push 1
push eax
call sym.postgres.exe_get_database_name
add esp, 4
push eax
call sym.postgres.exe_map_sql_identifier_to_xml_name
mov esi, eax
mov dword [ebp - 4], esi
call sym.postgres.exe_makeStringInfo
mov ecx, dword [ebp + 8]
mov ebx, eax
push 1
mov eax, esi
push ecx
mov esi, ebx
call fcn.0065f150
mov eax, dword [ebp + 8]
add esp, 0x14
test eax, eax
je 0x6634a5
push eax
push str._s_n_n
push ebx
call sym.postgres.exe_appendStringInfo
add esp, 0xc
call sym.postgres.exe_SPI_connect
mov eax, str.SELECT_oid_FROM_pg_catalog.pg_namespace_WHERE_pg_catalog.has_schema_privilege__oid__USAGE__AND_NOT__nspname__pg__OR_nspname__information_schema__ORDER_BY_nspname_
call fcn.0065f090
mov esi, eax
call sym.postgres.exe_SPI_push
test esi, esi
je 0x6634f6
mov esi, dword [esi + 8]
test esi, esi
je 0x6634f6
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi]
push 0
push edi
push edx
push ecx
push 0
push eax
call fcn.00663250
mov edx, dword [eax]
push edx
push ebx
call sym.postgres.exe_appendStringInfoString
push 0xa
push ebx
call sym.postgres.exe_appendStringInfoChar
mov esi, dword [esi + 4]
add esp, 0x28
test esi, esi
jne 0x6634c6
call sym.postgres.exe_SPI_pop
call sym.postgres.exe_SPI_finish
mov eax, dword [ebp - 4]
push eax
push str.___s__n
push ebx
call sym.postgres.exe_appendStringInfo
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x66c730
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push esi
push 4
lea eax, [ebp + 0xc]
push 1
push eax
call edi
add esp, 0x10
cmp eax, 4
je 0x66c770
push str.write_item
push 0x1186
push str.src_backendutilscache_relcache.c
call sym.postgres.exe_elog_start
push str.could_not_write_init_file
push 0x15
call sym.postgres.exe_elog_finish
add esp, 0x14
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push esi
push ecx
push 1
push edx
call edi
add esp, 0x10
pop edi
cmp eax, dword [ebp + 0xc]
je 0x66c7a9
push str.write_item
push 0x1188
push str.src_backendutilscache_relcache.c
call sym.postgres.exe_elog_start
push str.could_not_write_init_file
push 0x15
call sym.postgres.exe_elog_finish
add esp, 0x14
pop ebp
ret
Function at 0x66f490
Capabilities:
Encode data using xor
Hash data with crc32
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [ebp + 8], 0
push ebx
push esi
push edi
push str.pg_filenode.map
je 0x66f4d1
push str.global__s
lea eax, [ebp - 0x404]
push 0x400
push eax
call sym.postgres.exe_pg_snprintf
add esp, 0x10
mov edi, 0x85ea48
jmp 0x66f4f6
mov ecx, dword [sym.postgres.exe_DatabasePath]
push ecx
push 0x6b04b0
lea edx, [ebp - 0x404]
push 0x400
push edx
call sym.postgres.exe_pg_snprintf
add esp, 0x14
mov edi, 0x85ec48
push 0x180
lea eax, [ebp - 0x404]
push 0x8000
push eax
call sym.postgres.exe_BasicOpenFile
mov esi, eax
add esp, 0xc
test esi, esi
jns 0x66f557
push 0
push str.load_relmap_file
push 0x254
push str.src_backendutilscache_relmapper.c
push 0x15
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x66f557
lea ecx, [ebp - 0x404]
push ecx
push str.could_not_open_relation_mapping_file___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
push 0x200
push edi
push esi
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0xc
cmp eax, 0x200
je 0x66f5b0
push 0
push str.load_relmap_file
push 0x261
push str.src_backendutilscache_relmapper.c
push 0x15
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x66f5b0
lea edx, [ebp - 0x404]
push edx
push str.could_not_read_relation_mapping_file___s_:__m
call sym.postgres.exe_errmsg
add esp, 8
push eax
call sym.postgres.exe_errcode_for_file_access
push eax
call sym.postgres.exe_errfinish
add esp, 8
push esi
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
cmp dword [edi], 0x592717
jne 0x66f5ce
mov eax, dword [edi + 4]
test eax, eax
js 0x66f5ce
cmp eax, 0x3e
jle 0x66f607
push 0
push str.load_relmap_file
push 0x26b
push str.src_backendutilscache_relmapper.c
push 0x15
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x66f607
lea eax, [ebp - 0x404]
push eax
push str.relation_mapping_file___s__contains_invalid_data
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
or ecx, 0xffffffff
mov esi, edi
mov edx, 0x1f8
movzx ebx, byte [esi]
mov eax, ecx
shr eax, 0x18
xor eax, ebx
and eax, 0xff
shl ecx, 8
xor ecx, dword [eax*4 + sym.postgres.exe_pg_crc32_table]
inc esi
dec edx
jne 0x66f611
not ecx
cmp ecx, dword [edi + 0x1f8]
pop edi
pop esi
pop ebx
je 0x66f673
push edx
push str.load_relmap_file
push 0x275
push str.src_backendutilscache_relmapper.c
push 0x15
call sym.postgres.exe_errstart
add esp, 0x14
test al, al
je 0x66f673
lea ecx, [ebp - 0x404]
push ecx
push str.relation_mapping_file___s__contains_incorrect_checksum
call sym.postgres.exe_errmsg
push eax
call sym.postgres.exe_errfinish
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret