Function at 0x51e970
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov ecx, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x10]
push eax
call sym.postgres.exe_copyObject
mov ebx, eax
mov eax, dword [ebx + 0x30]
add esp, 4
test eax, eax
je 0x51e99f
mov eax, dword [eax + 4]
jmp 0x51e9a1
xor eax, eax
mov edx, dword [sym.postgres.exe_CurrentMemoryContext]
inc eax
push eax
push edx
call sym.postgres.exe_MemoryContextAllocZero
mov esi, dword [ebp + 0xc]
add esp, 8
cmp dword [esi + 0x78], 0
mov ecx, eax
mov dword [ebp - 0xc], ecx
je 0x51ea87
cmp dword [ebx + 0x4c], 0
jne 0x51ea87
cmp dword [ebx + 0x50], 0
jne 0x51ea87
cmp byte [ebx + 0x1d], 0
jne 0x51ea87
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x51e9fc
push ecx
push ebx
push eax
call fcn.0051e4d0
add esp, 0xc
test al, al
je 0x51ea87
mov eax, dword [esi + 0x78]
mov dword [ebp - 8], 0
test eax, eax
je 0x51ea81
mov eax, dword [eax + 8]
mov dword [ebp - 4], eax
test eax, eax
je 0x51ea81
jmp 0x51ea19
mov eax, dword [ebp - 4]
mov esi, dword [eax]
cmp byte [esi + 0xb], 0
mov edi, dword [esi + 4]
jne 0x51ea5e
mov eax, dword [ebp + 0x14]
cmp byte [eax + 0x14], 0
je 0x51ea3a
push edi
call sym.postgres.exe_contain_leaky_functions
add esp, 4
test al, al
jne 0x51ea5e
mov ecx, dword [ebp - 0xc]
push ecx
push ebx
mov eax, edi
call fcn.0051df30
add esp, 8
test al, al
je 0x51ea5e
mov edx, dword [ebp + 0x10]
mov ecx, edi
mov edi, dword [ebp + 0x14]
mov esi, ebx
call fcn.0051e050
jmp 0x51ea6e
mov edx, dword [ebp - 8]
push esi
push edx
call sym.postgres.exe_lappend
add esp, 8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov dword [ebp - 4], eax
test eax, eax
jne 0x51ea16
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 8]
mov dword [esi + 0x78], ecx
mov edx, dword [ebp - 0xc]
push edx
call sym.postgres.exe_pfree
mov eax, dword [ebp - 0x14]
add esp, 4
cmp byte [eax + 0x1c], 0
jne 0x51eac7
cmp dword [eax + 0x38], 0
jne 0x51eac7
cmp dword [eax + 0x3c], 0
jne 0x51eac7
cmp dword [eax + 0x44], 0
jne 0x51eac7
cmp dword [eax + 0x48], 0
jne 0x51eac7
mov eax, edi
call fcn.0051db30
test al, al
jne 0x51eac7
fld qword [edi + 0x88]
jmp 0x51eac9
fldz
mov ecx, dword [edi + 8]
lea eax, [ebp - 0x10]
push eax
sub esp, 8
fstp qword [esp]
push 0
push edi
push ebx
push ecx
call sym.postgres.exe_subquery_planner
mov edx, dword [ebp - 0x10]
xor ebx, ebx
add esp, 0x1c
mov dword [esi + 0x68], eax
mov dword [esi + 0x6c], edx
cmp dword [edi + 0xb4], ebx
je 0x51eb19
push str.set_subquery_pathlist
push 0x467
push str.src_backendoptimizerpath_allpaths.c
call sym.postgres.exe_elog_start
push str.unexpected_outer_reference_in_subquery_in_FROM
push 0x14
call sym.postgres.exe_elog_finish
add esp, 0x14
mov eax, dword [esi + 0x68]
push eax
call sym.postgres.exe_is_dummy_plan
add esp, 4
test al, al
je 0x51eb53
fldz
push ebx
push ebx
fstp qword [esi + 0x10]
push esi
mov dword [esi + 0x18], ebx
mov dword [esi + 0x20], ebx
call sym.postgres.exe_create_append_path
push eax
push esi
call sym.postgres.exe_add_path
push esi
call sym.postgres.exe_set_cheapest
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push edi
call sym.postgres.exe_set_subquery_size_estimates
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x60]
push edx
push esi
push edi
call sym.postgres.exe_convert_subquery_pathkeys
push ebx
push eax
push esi
push edi
call sym.postgres.exe_create_subqueryscan_path
push eax
push esi
call sym.postgres.exe_add_path
push esi
call sym.postgres.exe_set_cheapest
add esp, 0x30
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret