Function at 0x4cdea0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe7c
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0xe78], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call fcn.004ca870
mov esi, eax
add esp, 4
test esi, esi
jne 0x4ce148
mov edx, dword [ebx + 0x6e4]
test edx, edx
jle 0x4cdf24
lea ecx, [edx + edx*2]
add ecx, ecx
shr ecx, 1
shr ecx, 1
lea esi, [ebx + 0x172ec]
lea edi, [esp + 0x628]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
lea eax, [ebx + 0x6ec]
mov dword [esp + 0x10], edx
xor ecx, ecx
mov esi, dword [eax]
mov dword [esp + ecx + 0x28], esi
mov si, word [eax + 4]
mov word [esp + ecx + 0x2c], si
add eax, 0x16c
add ecx, 6
sub dword [esp + 0x10], 1
jne 0x4cdf06
mov edi, dword [ebx + 0x172e8]
mov ecx, dword [ebx + 0x23]
push edi
push edx
mov edx, dword [ebx + 0x1f]
lea eax, [esp + 0x30]
push eax
push 0
push ecx
push edx
lea edx, [esp + 0x640]
mov ecx, ebx
mov dword [esp + 0x30], edi
call fcn.004c9120
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x4ce148
xor ecx, ecx
cmp cx, word [ebx + 0x178ec]
mov dword [esp + 0x14], eax
jge 0x4ce0a1
mov dword [esp + 0x10], eax
mov edx, dword [ebx + 0x178ee]
add edx, dword [esp + 0x10]
xor ecx, ecx
movsx eax, word [edx + 0xa5]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
test eax, eax
jle 0x4ce021
xor esi, esi
mov dword [esp + 0x1c], esi
lea ebx, [ebx]
mov eax, dword [edx + 0xab]
movsx eax, word [eax + ecx*2]
cmp dword [ebx + 0x172e8], eax
jne 0x4cdfb6
mov dword [esp + 0x18], ecx
mov ecx, eax
imul ecx, ecx, 0x16c
mov edi, dword [ecx + ebx + 0x6ec]
lea ecx, [ecx + ebx + 0x6ec]
mov cx, word [ecx + 4]
lea esi, [esp + esi + 0x28]
lea eax, [eax + eax*2 + 0xb976]
mov dword [esi], edi
mov word [esi + 4], cx
mov esi, dword [esp + 0x1c]
mov ecx, dword [ebx + eax*2]
lea eax, [ebx + eax*2]
mov ax, word [eax + 4]
mov dword [esp + esi + 0x628], ecx
mov ecx, dword [esp + 0x20]
mov word [esp + esi + 0x62c], ax
movsx eax, word [edx + 0xa5]
inc ecx
add esi, 6
cmp ecx, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], esi
jl 0x4cdfa0
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
cmp byte [edx + 0x9c], 0
je 0x4ce04f
lea ecx, [eax + eax*2]
add ecx, ecx
mov esi, 1
mov word [esp + ecx + 0x28], si
mov byte [esp + ecx + 0x2c], 1
mov word [esp + ecx + 0x628], si
mov byte [esp + ecx + 0x62c], 1
inc eax
push edi
push eax
mov eax, dword [edx + 0x84]
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [edx + 0x80]
push 1
push eax
push ecx
lea edx, [esp + 0x640]
mov ecx, ebx
call fcn.004c9120
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x4ce148
mov eax, dword [esp + 0x14]
movsx edx, word [ebx + 0x178ec]
add dword [esp + 0x10], 0xaf
inc eax
cmp eax, edx
mov dword [esp + 0x14], eax
jl 0x4cdf71
mov eax, dword [ebx + 0x1f]
push eax
lea ecx, [esp + 0xc2c]
push str.SELECT_constraintname_constrainttext__t_t_FROM____sysconstraint___t_t_WHERE_segno___ld_AND_constrainttext_like_CHECK___
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf]
push 0
lea edx, [esp + 0xc38]
push edx
push 0
lea eax, [ebx + 0x17c1a]
push eax
push 0x72
push ebx
call fcn.004cbb40
mov esi, eax
add esp, 0x24
test esi, esi
jne 0x4ce12c
mov ecx, dword [ebx + 0x1f]
imul edi, edi, 0x16c
mov eax, dword [edi + ebx + 0x6e8]
lea edi, [edi + ebx + 0x6e8]
push eax
push ecx
lea edx, [esp + 0xcd0]
push str.SELECT_constraintname_constrainttext__t_t_FROM____sysdomain_____syscolumn___t_t_WHERE_tsegno___ld_AND_name__domainname_AND_cname___s
push edx
call dword [sym.imp.MSVCR90.dll_sprintf]
mov ecx, dword [edi]
push esi
lea eax, [esp + 0xcdc]
push eax
push ecx
lea eax, [ebx + 0x17c1a]
push eax
push 0x76
push ebx
call fcn.004cbb40
mov esi, eax
add esp, 0x28
test esi, esi
je 0x4ce16e
jle 0x4ce136
cmp esi, 0x1388
jl 0x4ce148
push 1
push 0x7dd
push esi
call fcn.00407430
mov esi, eax
add esp, 0xc
push 0x7dd
push 0
call fcn.00406f10
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe78]
xor ecx, esp
call fcn.00586584
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xe84]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00586584
mov esp, ebp
pop ebp
ret