Function at 0x51c694
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x51c69c
push ecx
push ebx
push esi
push edi
xor eax, eax
push ebp
push 0x51c9c3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
call fcn.00405884
mov esi, eax
test esi, esi
jl 0x51c71b
inc esi
xor ebx, ebx
lea edi, [ebx + ebx*2]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
test byte [eax + edi*8 + 0x14], 1
je 0x51c717
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
cmp dword [eax + edi*8 + 0xc], 0
je 0x51c717
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
cmp dword [eax + edi*8 + 4], 0
jne 0x51c717
push dword [ebp - 4]
push 0x51c9dc
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
push dword [eax + edi*8 + 0xc]
push 0x51c9f8
lea eax, [ebp - 4]
mov edx, 4
call fcn.00404650
inc ebx
dec esi
jne 0x51c6c9
cmp dword [ebp - 4], 0
je 0x51c97b
push 0x51ca04
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 8]
call fcn.0051bc60
pop ecx
push dword [ebp - 8]
push 0x51ca4c
push dword [ebp - 4]
push 0x51ca64
lea eax, [ebp - 4]
mov edx, 5
call fcn.00404650
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call fcn.004b95f0
mov edx, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call fcn.004757e0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
call fcn.00405884
mov esi, eax
test esi, esi
jl 0x51c833
inc esi
xor ebx, ebx
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
test byte [edx + eax*8 + 0x14], 1
je 0x51c82b
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
cmp dword [edx + eax*8 + 0xc], 0
je 0x51c82b
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
cmp dword [edx + eax*8 + 4], 0
jne 0x51c82b
mov al, byte [0x51ca90]
push eax
lea eax, [ebp - 0x18]
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 8]
mov edx, dword [ecx + edx*8 + 0xc]
call fcn.00414fe4
lea ecx, [ebp - 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov edx, 0x51ca9c
mov edi, dword [eax]
call dword [edi + 0x244]
test al, al
je 0x51c82b
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x30]
xor edx, edx
call fcn.0046bcc0
lea edx, [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx + 0x64]
lea eax, [ebp - 0x2c]
lea edx, [ebp - 0x1c]
call fcn.004843c8
mov edx, dword [ebp - 0x1c]
lea eax, [ebx + ebx*2]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 8]
lea eax, [ecx + eax*8 + 4]
call fcn.00404314
inc ebx
dec esi
jne 0x51c78a
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call fcn.004757ec
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
call fcn.00405884
mov esi, eax
test esi, esi
jl 0x51c97b
inc esi
xor ebx, ebx
lea edi, [ebx + ebx*2]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
test byte [eax + edi*8 + 0x14], 1
je 0x51c973
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
cmp dword [eax + edi*8 + 0xc], 0
je 0x51c973
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
cmp dword [edx + eax*8 + 4], 0
je 0x51c8a8
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
mov eax, dword [edx + eax*8 + 4]
mov edx, 0x51caac
call fcn.004046dc
jne 0x51c973
mov eax, dword [ebp + 8]
cmp dword [eax - 0x14], 0
jne 0x51c95b
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
call fcn.0051d3d0
mov edx, dword [eax + 0x6c]
mov eax, dword [ebp + 8]
add eax, 0xffffffec
call fcn.00404358
push 1
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0x14]
mov eax, dword [0x534150]
mov eax, dword [eax]
xor ecx, ecx
mov edi, dword [eax]
call dword [edi + 0x24]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp + 8]
add eax, 0xffffffec
call fcn.00404358
mov eax, dword [ebp + 8]
cmp dword [eax - 0x14], 0
jne 0x51c95b
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call fcn.004b95f0
mov edx, 0x51cac4
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call fcn.004757e0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov eax, dword [eax + 0x30]
xor edx, edx
call fcn.0046bcc0
lea edx, [ebp - 0x44]
mov ecx, dword [eax]
call dword [ecx + 0x64]
lea eax, [ebp - 0x44]
lea edx, [ebp - 0x34]
call fcn.004843c8
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp + 8]
add eax, 0xffffffec
call fcn.00404358
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
call fcn.004757ec
lea eax, [ebx + ebx*2]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 8]
lea eax, [edx + eax*8 + 4]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x14]
call fcn.00404314
inc ebx
dec esi
jne 0x51c856
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c9ca
lea eax, [ebp - 0x44]
call fcn.004109ac
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004042e4
lea eax, [ebp - 0x2c]
call fcn.004109ac
lea eax, [ebp - 0x1c]
call fcn.004042c0
lea eax, [ebp - 0x18]
call fcn.004109ac
lea eax, [ebp - 8]
mov edx, 2
call fcn.004042e4
ret