Function at 0x6608c0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x82aea4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov cl, byte [ebp + 0x10]
push esi
mov esi, dword [eax]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x7c], eax
mov byte [ebp - 0x49], cl
shr esi, 2
mov dword [ebp - 0x70], edi
sub esi, 4
mov dword [ebp - 0x50], 0
push eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x78], esi
call sym.postgres.exe_text_to_cstring
push 6
push edi
push esi
push eax
mov dword [ebp - 0x74], eax
call sym.postgres.exe_pg_do_encoding_conversion
push 1
mov dword [ebp - 0x58], eax
call sym.postgres.exe_pg_xml_init
mov edx, dword [sym.postgres.exe_PG_exception_stack]
mov dword [ebp - 0x54], eax
mov eax, dword [sym.postgres.exe_error_context_stack]
lea ecx, [ebp - 0x44]
push 0
push ecx
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x5c], eax
call sub.MSVCR100.dll__setjmp3
add esp, 0x20
test eax, eax
jne 0x660aa7
lea edx, [ebp - 0x44]
mov dword [sym.postgres.exe_PG_exception_stack], edx
call sub.libxml2.dll_xmlInitParser
call sub.libxml2.dll_xmlNewParserCtxt
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
test eax, eax
mov eax, dword [ebp - 0x54]
je 0x66096a
cmp byte [eax + 8], 0
je 0x66097f
push str.could_not_allocate_parser_context
push 0x20c5
push 0x14
push eax
call sym.postgres.exe_xml_ereport
add esp, 0x10
cmp dword [ebp + 0xc], 0
jne 0x6609d5
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x50]
xor ecx, ecx
cmp byte [ebp - 0x49], cl
setne cl
dec ecx
and ecx, 0x100
or ecx, 0xa
push ecx
push str.UTF_8
push 0
push edx
push eax
call sub.libxml2.dll_xmlCtxtReadDoc
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x54]
add esp, 0x14
test ecx, ecx
je 0x6609c6
cmp byte [eax + 8], 0
je 0x660a6b
push str.invalid_XML_document
push 0x1d000082
jmp 0x660a60
lea edx, [ebp - 0x68]
push edx
mov edx, dword [ebp - 0x58]
push 0
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x6c]
push ecx
push edx
call fcn.0065e2c0
add esp, 0x14
test eax, eax
je 0x660a09
push str.invalid_XML_content:_invalid_XML_declaration
push 0x1e000082
push 0x14
mov edi, eax
call fcn.0065e8f0
add esp, 0xc
mov eax, dword [ebp - 0x64]
push eax
call sub.libxml2.dll_xmlNewDoc
mov dword [ebp - 0x48], eax
push str.UTF_8
call sub.libxml2.dll_xmlStrdup
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x48]
mov dword [ecx + 0x3c], eax
mov eax, dword [ebp - 0x68]
mov dword [edx + 0x28], eax
mov edx, dword [ebp - 0x6c]
add edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x48]
push 0
push edx
push 0
push 0
push 0
push eax
call sub.libxml2.dll_xmlParseBalancedChunkMemory
add esp, 0x20
test eax, eax
mov eax, dword [ebp - 0x54]
jne 0x660a56
cmp byte [eax + 8], 0
je 0x660a6b
push str.invalid_XML_content
push 0x1e000082
push 0x14
push eax
call sym.postgres.exe_xml_ereport
add esp, 0x10
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
push eax
mov dword [sym.postgres.exe_PG_exception_stack], ecx
mov dword [sym.postgres.exe_error_context_stack], edx
call sub.libxml2.dll_xmlFreeParserCtxt
mov ecx, dword [ebp - 0x54]
push 0
push ecx
call sym.postgres.exe_pg_xml_done
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 4]
add esp, 0xc
pop edi
xor ecx, ebp
pop esi
call fcn.006a8ca2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x5c]
mov dword [sym.postgres.exe_PG_exception_stack], edx
mov dword [sym.postgres.exe_error_context_stack], eax
test ecx, ecx
je 0x660acb
mov edx, dword [ebp - 0x48]
push edx
call sub.libxml2.dll_xmlFreeDoc
add esp, 4
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x660ade
mov ecx, dword [ebp - 0x50]
push ecx
call sub.libxml2.dll_xmlFreeParserCtxt
add esp, 4
mov edx, dword [ebp - 0x54]
push 1
push edx
call sym.postgres.exe_pg_xml_done
add esp, 8
call sym.postgres.exe_pg_re_throw
push 1
call dword [sym.imp.MSVCR100.dll_exit]
int3