Function at 0x662330
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax + 4]
push ebx
xor ebx, ebx
mov dword [ebp - 0x68], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x70], edx
push esi
mov dword [ebp - 0x50], ebx
push edi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x8c], ecx
cmp ecx, ebx
je 0x6623dc
mov esi, dword [ecx + 8]
cmp esi, ebx
je 0x6623dc
mov edi, dword [esi]
mov ecx, dword [ebp - 0x68]
mov edx, dword [edi + 8]
push 0
lea eax, [ebp - 0x51]
push eax
push ecx
push edi
mov dword [ebp - 0x98], edi
call edx
add esp, 0x10
cmp byte [ebp - 0x51], 0
mov dword [ebp - 0x80], eax
je 0x6623a2
xor eax, eax
jmp 0x6623bd
mov eax, dword [edi + 4]
push 0
push eax
call sym.postgres.exe_exprType
mov ecx, dword [ebp - 0x80]
add esp, 4
push eax
push ecx
call sym.postgres.exe_map_sql_value_to_xml_value
add esp, 0xc
push eax
push ebx
mov dword [ebp - 0x7c], eax
call sym.postgres.exe_lappend
mov esi, dword [esi + 4]
inc dword [ebp - 0x64]
add esp, 8
mov ebx, eax
test esi, esi
jne 0x66237a
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x74], ebx
mov eax, dword [eax + 0x10]
xor ecx, ecx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x84], eax
cmp eax, ecx
je 0x662525
mov edi, dword [eax + 8]
mov dword [ebp - 0x4c], edi
cmp edi, ecx
je 0x66245a
mov esi, dword [edi]
mov eax, dword [ebp - 0x68]
mov ecx, dword [esi + 8]
push 0
lea edx, [ebp - 0x52]
push edx
push eax
push esi
mov dword [ebp - 0x94], esi
call ecx
add esp, 0x10
cmp byte [ebp - 0x52], 0
mov ebx, eax
mov dword [ebp - 0x88], ebx
jne 0x662450
mov edx, dword [esi + 4]
push 1
push edx
call sym.postgres.exe_exprType
add esp, 4
push eax
push ebx
call sym.postgres.exe_map_sql_value_to_xml_value
push eax
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x5c]
push eax
call sym.postgres.exe_lappend
add esp, 0x14
mov dword [ebp - 0x5c], eax
mov edi, dword [edi + 4]
test edi, edi
jne 0x6623fc
mov dword [ebp - 0x4c], edi
push 2
call sym.postgres.exe_pg_xml_init
mov ecx, dword [sym.postgres.exe_PG_exception_stack]
mov edx, dword [sym.postgres.exe_error_context_stack]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x6c], edx
call sub.MSVCR100.dll__setjmp3
add esp, 0xc
test eax, eax
jne 0x662650
lea ecx, [ebp - 0x44]
mov dword [sym.postgres.exe_PG_exception_stack], ecx
call sub.libxml2.dll_xmlBufferCreate
mov dword [ebp - 0x50], eax
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x58]
test edx, edx
je 0x6624ad
cmp byte [eax + 8], 0
je 0x6624c2
push str.could_not_allocate_xmlBuffer
push 0x20c5
push 0x14
push eax
call sym.postgres.exe_xml_ereport
add esp, 0x10
mov eax, dword [ebp - 0x50]
push 0
push eax
call sub.libxml2.dll_xmlNewTextWriterMemory
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x58]
add esp, 8
test ecx, ecx
je 0x6624e3
cmp byte [eax + 8], 0
je 0x6624f8
push str.could_not_allocate_xmlTextWriter
push 0x20c5
push 0x14
push eax
call sym.postgres.exe_xml_ereport
add esp, 0x10
mov edx, dword [ebp - 0x70]
mov eax, dword [edx + 8]
mov ecx, dword [ebp - 0x48]
push eax
push ecx
call sub.libxml2.dll_xmlTextWriterStartElement
mov eax, dword [ebp - 0x74]
add esp, 8
call fcn.0065de10
mov edx, dword [ebp - 0x70]
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x4c], eax
test ecx, ecx
je 0x66252d
mov esi, dword [ecx + 8]
jmp 0x66252f
mov dword [ebp - 0x4c], ecx
jmp 0x66245a
xor esi, esi
test eax, eax
je 0x662560
test esi, esi
je 0x662560
mov ecx, dword [eax]
mov edx, dword [esi]
mov edx, dword [edx + 4]
test ecx, ecx
je 0x662553
mov eax, dword [ebp - 0x48]
push ecx
push edx
push eax
call sub.libxml2.dll_xmlTextWriterWriteAttribute
mov eax, dword [ebp - 0x4c]
add esp, 0xc
mov eax, dword [eax + 4]
mov esi, dword [esi + 4]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x662533
mov eax, dword [ebp - 0x5c]
call fcn.0065de10
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x66258c
nop
mov eax, dword [eax]
mov ecx, dword [ebp - 0x48]
push eax
push ecx
call sub.libxml2.dll_xmlTextWriterWriteRaw
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx + 4]
add esp, 8
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x662570
mov eax, dword [ebp - 0x48]
push eax
call sub.libxml2.dll_xmlTextWriterEndElement
mov ecx, dword [ebp - 0x48]
push ecx
call sub.libxml2.dll_xmlFreeTextWriter
mov dword [ebp - 0x48], 0
mov esi, dword [ebp - 0x50]
push esi
call sub.libxml2.dll_xmlBufferLength
add esp, 0xc
push eax
push esi
call sub.libxml2.dll_xmlBufferContent
add esp, 4
push eax
call sym.postgres.exe_cstring_to_text_with_len
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x60]
mov edi, eax
mov eax, dword [ebp - 0x6c]
push ecx
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
call sub.libxml2.dll___xmlStructuredErrorContext
mov esi, dword [ebp - 0x58]
cmp dword [eax], esi
je 0x66260f
push 0x74e9b8
push 0x41a
push str.src_backendutils_adtxml.c
call sym.postgres.exe_elog_start
push str.libxml_error_handling_state_is_out_of_sync_with_xml.c
push 0x13
call sym.postgres.exe_elog_finish
add esp, 0x14
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
push edx
push eax
call sub.libxml2.dll_xmlSetStructuredErrorFunc
mov ecx, dword [esi + 0x24]
push ecx
call sub.libxml2.dll_xmlSetExternalEntityLoader
mov dword [esi], 0
mov edx, dword [esi + 0xc]
push edx
call sym.postgres.exe_pfree
push esi
call sym.postgres.exe_pfree
mov ecx, dword [ebp - 4]
add esp, 0x14
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x6c]
mov dword [sym.postgres.exe_PG_exception_stack], eax
mov dword [sym.postgres.exe_error_context_stack], ecx
test edx, edx
je 0x662674
mov eax, dword [ebp - 0x48]
push eax
call sub.libxml2.dll_xmlFreeTextWriter
add esp, 4
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x662687
mov edx, dword [ebp - 0x50]
push edx
call sub.libxml2.dll_xmlBufferFree
add esp, 4
call sub.libxml2.dll___xmlStructuredErrorContext
mov esi, dword [ebp - 0x58]
cmp dword [eax], esi
je 0x6626b6
push 0x74e9b8
push 0x41a
push str.src_backendutils_adtxml.c
call sym.postgres.exe_elog_start
push str.libxml_error_handling_state_is_out_of_sync_with_xml.c
push 0x13
call sym.postgres.exe_elog_finish
add esp, 0x14
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push eax
push ecx
call sub.libxml2.dll_xmlSetStructuredErrorFunc
mov edx, dword [esi + 0x24]
push edx
call sub.libxml2.dll_xmlSetExternalEntityLoader
mov dword [esi], 0
mov eax, dword [esi + 0xc]
push eax
call sym.postgres.exe_pfree
push esi
call sym.postgres.exe_pfree
add esp, 0x14
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3