Function at 0x10052920
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1016ac76
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x10438fc0]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
push esi
push edi
mov eax, dword [0x10438fc0]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
cmp byte [ecx + 4], 0
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], edx
je 0x10052ade
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
push eax
mov eax, dword [ecx]
call eax
xor edi, edi
cmp eax, edi
jl 0x10052be1
push 0x28
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.ole32.dll_StringFromGUID2]
push edi
push edi
push edi
lea esi, [esp + 0x1c]
mov dword [esp + 0x1c], edi
call fcn.100163a0
mov dword [esp + 0xe8], edi
mov edi, str.SELECT__FROM_GDB_ItemRelationships_WHERE
mov eax, esi
call fcn.10016670
cmp byte [ebp + 0xc], 0
je 0x100529d3
mov eax, esi
push eax
mov eax, str._OriginID__
jmp 0x100529dd
lea ecx, [esp + 0x10]
push ecx
mov eax, str._DestID__
call fcn.10016730
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x38]
call fcn.10016730
lea eax, [esp + 0x10]
push eax
mov eax, 0x10415910
call fcn.10016730
mov esi, dword [ebx]
cmp esi, dword [ebx + 4]
je 0x10052a51
lea edi, [esi + 0x10]
lea esp, [esp]
push 0x28
lea ecx, [esp + 0x88]
push ecx
push esi
call dword [sym.imp.ole32.dll_StringFromGUID2]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x88]
call fcn.10016730
cmp edi, dword [ebx + 4]
je 0x10052a46
lea eax, [esp + 0x10]
push eax
mov eax, str.__
call fcn.10016730
add esi, 0x10
add edi, 0x10
cmp esi, dword [ebx + 4]
jne 0x10052a10
lea ecx, [esp + 0x10]
push ecx
mov eax, 0x10198188
call fcn.10016730
mov edx, dword [esp + 0x18]
mov edi, dword [edx + 0x28]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], 0
call fcn.100438c0
add esp, 4
push 0
push 0x1044bc6c
push 0x1044bd5c
mov byte [esp + 0xf4], 1
mov esi, dword [esp + 0x20]
push 0
push esi
call sub.MSVCR100.dll___RTDynamicCast
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x10052ae8
mov byte [esp + 0xe8], al
test esi, esi
je 0x10052abe
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10052ade
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10052ade
add eax, 0xfffffff4
dec dword [eax]
jne 0x10052ade
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, 0x80004005
jmp 0x10052be1
push ebx
call fcn.10045a40
mov edi, eax
test edi, edi
jns 0x10052b31
mov byte [esp + 0xe8], 0
test esi, esi
je 0x10052b0a
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10052b2a
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10052b2a
add eax, 0xfffffff4
dec dword [eax]
jne 0x10052b2a
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, edi
jmp 0x10052be1
mov edx, dword [ebx]
mov eax, dword [edx + 4]
mov ecx, ebx
call eax
mov edi, eax
test edi, edi
js 0x10052af4
mov ecx, ebx
call fcn.10045e80
test eax, eax
jne 0x10052ba9
jmp 0x10052b50
cmp dword [ebx + 0x1c], 0
je 0x10052c07
push 0x70
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
test eax, eax
je 0x10052b72
mov esi, eax
call fcn.100a0880
jmp 0x10052b74
xor eax, eax
mov edx, dword [ebx + 0x1c]
mov edi, dword [edx + 8]
mov ecx, dword [esp + 0x18]
mov esi, eax
mov dword [esp + 0x1c], eax
call fcn.10053740
test eax, eax
jne 0x10052b9a
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x1c]
call fcn.10057340
mov ecx, ebx
call fcn.10045e80
mov esi, dword [esp + 0x14]
test eax, eax
je 0x10052b50
mov byte [esp + 0xe8], 0
test esi, esi
je 0x10052bbf
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10052bdf
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10052bdf
add eax, 0xfffffff4
dec dword [eax]
jne 0x10052bdf
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret 0xc
mov byte [esp + 0xe8], 0
test esi, esi
je 0x10052abe
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
jmp 0x10052abe