Function at 0x57d5d0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push edi
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp + 8], 0
mov eax, dword [edi + 4]
mov ecx, dword [ebx]
test eax, eax
lea edx, [eax - 1]
mov dword [ebp - 0x14], edx
mov edx, dword [edi + 8]
mov dword [ebp - 4], edx
je 0x57d919
mov eax, dword [edi]
mov edx, dword [ecx + 8]
push esi
push eax
mov eax, dword [ecx + 4]
push edx
push eax
push str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d
call fcn.004e3af0
lea ecx, [ebp + 8]
push eax
push ecx
push ebx
call fcn.0056be80
mov eax, dword [ebx + 0x24]
add esp, 0x1c
test eax, eax
jne 0x57d902
mov edx, dword [ebp + 8]
push edx
call fcn.004f6bd0
add esp, 4
cmp eax, 0x64
jne 0x57d902
mov eax, dword [ebp + 8]
push 1
push eax
call fcn.004f7d40
mov ecx, dword [ebp + 8]
push 1
push ecx
mov dword [ebp - 8], eax
call fcn.004f7e30
mov edx, dword [ebp + 8]
push 2
push edx
mov dword [ebp - 0x1c], eax
call fcn.004f7dd0
mov esi, eax
mov eax, dword [ebp + 8]
push 3
push eax
mov dword [ebp - 0x10], esi
call fcn.004f7dd0
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 4]
add esp, 0x20
cmp esi, eax
jl 0x57d8f7
mov eax, dword [edi]
push 0x20
cdq
push 0
push edx
push eax
call fcn.005a7ed0
mov ecx, eax
mov eax, esi
mov edi, edx
cdq
add ecx, eax
adc edi, edx
push edi
push ecx
push ebx
call fcn.0056f510
mov esi, eax
add esp, 0xc
test esi, esi
mov dword [ebp - 0xc], esi
je 0x57d902
mov ecx, dword [esi + 4]
mov eax, dword [esi + 8]
cmp ecx, eax
jg 0x57d6d1
mov dword [ebx + 0x24], 0x10b
jmp 0x57d75a
push esi
call fcn.005704a0
mov edx, dword [esi]
mov edi, eax
push edx
call fcn.0056c890
and eax, 0xffff
add esp, 8
cmp eax, edi
jge 0x57d749
cmp edi, dword [esi + 8]
jge 0x57d749
mov ecx, dword [esi]
lea eax, [ebp - 0x18]
add ecx, edi
push eax
push ecx
call fcn.005811d0
mov edx, dword [ebp - 0x18]
add edi, eax
mov eax, dword [ebp - 8]
add esp, 8
cmp edx, eax
mov dword [ebp - 0x20], edi
mov ecx, edx
jl 0x57d716
mov ecx, eax
test ecx, ecx
je 0x57d741
cmp edx, eax
jge 0x57d720
mov eax, edx
mov esi, dword [esi]
mov edi, dword [ebp - 0x1c]
mov ecx, eax
mov eax, dword [ebp - 0x20]
add esi, eax
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x57d737
sbb eax, eax
sbb eax, 0xffffffff
mov esi, dword [ebp - 0xc]
test eax, eax
jne 0x57d745
mov eax, dword [ebp - 8]
sub edx, eax
mov eax, edx
test eax, eax
jge 0x57d750
mov dword [ebx + 0x24], 0x10b
push esi
push ebx
call fcn.0057d9b0
add esp, 8
push esi
call fcn.00573d60
mov eax, dword [ebx + 0x24]
add esp, 4
test eax, eax
jne 0x57d902
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp + 0xc]
lea edx, [edi - 1]
inc eax
push edx
inc ecx
push eax
push ecx
push esi
push ebx
call fcn.0057d920
mov eax, dword [ebx + 0x24]
add esp, 0x14
test eax, eax
jne 0x57d902
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x57d8eb
mov esi, dword [esi]
push edi
push esi
push 0
push ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], 0
call fcn.00570b00
mov edi, eax
push edi
push ebx
call fcn.00571b60
add esp, 0x18
test eax, eax
jne 0x57d8d7
mov eax, esi
push 0x20
cdq
push 0
push edx
push eax
call fcn.005a7ed0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0xc]
push edi
lea esi, [edx + 1]
mov dword [ebp - 4], esi
call fcn.00570ab0
add esp, 4
cmp esi, eax
jge 0x57d84d
jmp 0x57d7fb
mov esi, dword [ebp - 4]
mov ecx, dword [ebp - 0x2c]
mov eax, esi
mov esi, dword [ebp - 0x28]
cdq
add eax, ecx
adc edx, esi
push edx
push eax
push ebx
call fcn.0056c750
mov esi, eax
add esp, 0xc
test esi, esi
je 0x57d839
mov eax, dword [esi]
push eax
call fcn.0056c890
add esp, 4
test ax, ax
je 0x57d830
mov dword [ebx + 0x24], 0x10b
push esi
call fcn.00573d60
add esp, 4
mov esi, dword [ebp - 4]
push edi
inc esi
mov dword [ebp - 4], esi
call fcn.00570ab0
add esp, 4
cmp esi, eax
jl 0x57d7f8
push edi
call fcn.00570ab0
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0xc], eax
cdq
add eax, ecx
adc edx, esi
push edx
push eax
push ebx
call fcn.0056c750
mov esi, eax
add esp, 0x10
test esi, esi
je 0x57d8be
mov ecx, dword [esi]
push ecx
call fcn.0056c890
mov ecx, dword [esi + 8]
and eax, 0xffff
add esp, 4
cmp eax, ecx
jge 0x57d8ae
mov ecx, dword [esi]
lea edx, [ebp - 0x34]
add ecx, eax
push edx
push ecx
call fcn.00581270
push edi
call fcn.00571d80
mov ecx, dword [ebp - 0x34]
add esp, 0xc
cmp ecx, eax
jne 0x57d8ae
mov eax, dword [ebp - 0x30]
cmp eax, edx
je 0x57d8b5
mov dword [ebx + 0x24], 0x10b
push esi
call fcn.00573d60
add esp, 4
push edi
push ebx
call fcn.00571a80
push edi
push ebx
call fcn.00571b60
add esp, 0x10
test eax, eax
je 0x57d7e0
mov ecx, dword [ebp - 4]
push edi
mov dword [ebp - 4], ecx
call fcn.0056d430
mov edi, dword [ebp - 0x10]
add esp, 4
jmp 0x57d8f1
mov edx, dword [esi + 8]
mov dword [ebp - 4], edx
mov dword [ebp - 0x14], edi
mov edi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x57d62d
mov eax, dword [ebp + 8]
push eax
call fcn.004f3620
mov ecx, dword [ebx + 0x24]
add esp, 4
test ecx, ecx
pop esi
jne 0x57d919
mov dword [ebx + 0x24], eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret