Function at 0x4c6db0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x120
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x124]
push ebx
mov ebx, ecx
mov dword [esp + 0x18], eax
mov dword [eax], 0
mov eax, dword [ebx + 0x17a93]
mov dword [esp + 8], ebx
test eax, eax
jne 0x4c6dfc
pop ebx
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.00586584
add esp, 0x120
ret
imul eax, eax, 0x82
push ebp
inc eax
push esi
mov esi, eax
push edi
mov edi, dword [sym.imp.MSVCR90.dll_malloc]
lea eax, [esi + 0xe7]
push eax
call edi
mov ebp, eax
add esp, 4
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x4c6fd2
push esi
call edi
mov ecx, eax
add esp, 4
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x4c6fb8
mov ebp, dword [sym.imp.MSVCR90.dll_sprintf]
mov byte [ecx], 0
mov eax, dword [ebx + 0x17a9b]
xor edi, edi
cmp dword [ebx + 0x17a93], edi
jle 0x4c6eb2
lea ebx, [eax + 0x12]
mov eax, dword [ebx]
test eax, eax
je 0x4c6e9c
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.004a74f0
add esp, 8
mov esi, 0x5a85d0
test edi, edi
je 0x4c6e7a
mov esi, 0x5aec34
mov eax, dword [esp + 0x10]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c6e81
mov ecx, dword [esp + 0x10]
sub eax, edx
lea edx, [esp + 0x28]
push edx
add eax, ecx
push esi
push eax
call ebp
add esp, 0xc
mov edx, dword [esp + 0x14]
inc edi
add ebx, 0x30
cmp edi, dword [edx + 0x17a93]
jl 0x4c6e58
mov ecx, dword [esp + 0x10]
mov ebx, edx
mov edi, dword [esp + 0x18]
push ecx
push str.SELECT__FROM______SELECT_constraintname_FROM____sysconstraint___t_UNION_ALL______SELECT_constraintname_FROM____sysdomain___t_UNION_ALL______SELECT_DISTINCT_constraintname_FROM____sysrefconstraint________tWHERE_constraintname_IN___s_
push edi
call ebp
push 0
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x38]
push ecx
push fcn.00472210
push 0
push edi
call fcn.0050dfb0
mov esi, eax
add esp, 0x28
test esi, esi
jne 0x4c6f7e
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4c6f6b
movzx ecx, word [eax]
cmp cx, word [eax + 2]
jne 0x4c6efe
mov dword [esp + 0x14], esi
jmp 0x4c6f07
movsx ecx, cx
add ecx, eax
mov dword [esp + 0x14], ecx
mov esi, dword [ebx + 0x17a9b]
xor ebp, ebp
cmp dword [ebx + 0x17a93], ebp
jle 0x4c6f6b
mov edi, dword [esp + 0x24]
cmp dword [edi], 0
jne 0x4c6f67
mov ecx, dword [esi + 0x12]
test ecx, ecx
je 0x4c6f5b
mov eax, dword [esp + 0x14]
jmp 0x4c6f30
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4c6f50
test dl, dl
je 0x4c6f4c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4c6f50
add eax, 2
add ecx, 2
test dl, dl
jne 0x4c6f30
xor eax, eax
jmp 0x4c6f55
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4c6f5b
mov dword [edi], esi
inc ebp
add esi, 0x30
cmp ebp, dword [ebx + 0x17a93]
jl 0x4c6f17
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
push edx
call fcn.0050dec0
mov esi, eax
add esp, 4
test esi, esi
je 0x4c6fa1
push edi
mov edi, dword [sym.imp.MSVCR90.dll_free]
call edi
mov eax, dword [esp + 0x14]
push eax
call edi
push 0xbb9
push 0
call fcn.00406f10
add esp, 0x10
mov eax, esi
jmp 0x4c6fe1
mov esi, dword [sym.imp.MSVCR90.dll_free]
push edi
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
add esp, 8
xor eax, eax
jmp 0x4c6fe1
mov esi, dword [sym.imp.MSVCR90.dll_free]
push ebp
call esi
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x4c6fd2
push eax
call esi
add esp, 4
push 0xbb9
push 6
call fcn.00406f10
add esp, 8
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00586584
add esp, 0x120
ret