Function at 0x10112a70
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x14]
and eax, 8
push edi
push 0x5c
mov dword [esp + 0x20], eax
mov ebx, ecx
lea eax, [esi + 4]
mov dword [esp + 0x1c], edx
push 0
push eax
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], 0
call fcn.1012a970
mov ecx, dword [ebp + 0x10]
lea eax, [ebx + 0x3c]
add esp, 0xc
mov dword [esi], ecx
cmp dword [eax], 0
jne 0x10112b6e
mov eax, dword [ebx]
push dword [eax + 8]
push dword [eax + 4]
push str.SELECT_pgno_FROM__q._q_idx_WHERE_segid__AND_term___ORDER_BY_term_DESC_LIMIT_1
call fcn.100212d0
add esp, 0xc
mov edi, eax
cmp dword [ebx + 0x24], 0
jne 0x10112b0c
test edi, edi
je 0x10112b03
mov eax, dword [ebx]
lea ecx, [ebx + 0x3c]
push 0
push ecx
push 0
mov ecx, dword [eax]
mov edx, edi
push 0x85
push 0xffffffffffffffff
call fcn.100931a0
add esp, 0x14
mov dword [ebx + 0x24], eax
jmp 0x10112b10
mov dword [ebx + 0x24], 7
jmp 0x10112b68
test edi, edi
je 0x10112b68
cmp dword [0x10165af8], 0
je 0x10112b5e
mov eax, dword [0x10168b40]
test eax, eax
je 0x10112b2c
push eax
call dword [0x10165b48]
add esp, 4
push edi
call dword [0x10165b24]
sub dword [0x101689c8], eax
add esp, 4
dec dword [0x101689ec]
push edi
call dword [0x10165b1c]
mov eax, dword [0x10168b40]
add esp, 4
test eax, eax
je 0x10112b68
push eax
call dword [0x10165b50]
jmp 0x10112b65
push edi
call dword [0x10165b1c]
add esp, 4
mov ecx, dword [ebp + 0x10]
lea eax, [ebx + 0x3c]
cmp dword [ebx + 0x24], 0
mov edi, dword [eax]
jne 0x10112dd2
mov eax, dword [ecx]
cdq
push edx
push eax
push 1
push edi
call fcn.1004b120
add esp, 0x10
mov edx, 1
mov ecx, edi
call fcn.1004acb0
test eax, eax
jne 0x10112bec
cmp dword [esp + 0x18], eax
je 0x10112bd9
mov ecx, dword [edi + 0x64]
push eax
push eax
mov eax, dword [ebp + 8]
add ecx, 0x28
cdq
push edx
mov edx, dword [esp + 0x24]
push eax
call fcn.10042eb0
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x10112bd9
mov ecx, dword [edi]
mov edx, eax
mov dword [ecx + 0x40], eax
call fcn.10022010
mov ecx, dword [edi]
mov edx, dword [esp + 0x20]
call fcn.1001ec40
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10112bec
push eax
call dword [0x10165b50]
add esp, 4
push edi
call fcn.10049b70
add esp, 4
cmp eax, 0x64
jne 0x10112ccd
test edi, edi
je 0x10112c3a
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10112c15
push eax
call dword [0x10165b48]
add esp, 4
mov ecx, dword [edi + 0x78]
test ecx, ecx
je 0x10112c27
xor eax, eax
cmp ax, word [edi + 0x90]
jb 0x10112c3f
mov ecx, dword [edi]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.10022010
mov ecx, 0x10151958
movzx eax, word [ecx + 0x10]
test al, 0x24
je 0x10112c4f
mov eax, dword [ecx]
mov dword [esp + 0x10], eax
jmp 0x10112c80
test al, 8
je 0x10112c5e
movsd xmm0, qword [ecx]
call fcn.10042660
jmp 0x10112c7c
test al, 0x12
je 0x10112c6f
cmp dword [ecx + 8], 0
je 0x10112c6f
call fcn.10042690
jmp 0x10112c7c
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov ecx, eax
mov dword [esp + 0x14], ecx
test edi, edi
je 0x10112cc0
mov ecx, dword [edi]
mov edx, dword [edi + 0x24]
cmp byte [ecx + 0x57], 0
jne 0x10112c9d
test edx, edx
jne 0x10112c9d
xor eax, eax
jmp 0x10112ca2
call fcn.1001ec40
mov dword [edi + 0x24], eax
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10112cb8
push eax
call dword [0x10165b50]
add esp, 4
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
sar ecx, 1
and eax, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
push edi
call fcn.10048b40
add esp, 4
mov dword [ebx + 0x24], eax
mov edx, 1
mov ecx, edi
call fcn.1004acb0
test eax, eax
jne 0x10112cfc
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10112cfc
push eax
call dword [0x10165b50]
add esp, 4
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov edx, esi
mov eax, dword [eax + 4]
cmp dword [esp + 0x14], eax
cmovge ecx, dword [esp + 0x10]
cmovge eax, dword [esp + 0x14]
mov dword [esp + 0x20], ecx
dec eax
mov ecx, ebx
mov dword [esi + 8], eax
call fcn.10111310
cmp dword [esi + 0xc], 0
mov edi, dword [esp + 0x1c]
je 0x10112d41
push dword [ebp + 8]
mov edx, edi
mov ecx, ebx
push dword [esp + 0x1c]
push esi
call fcn.10112570
add esp, 0xc
cmp dword [ebx + 0x24], 0
jne 0x10112da8
test edi, edi
jne 0x10112da8
mov edx, dword [esi + 4]
mov edi, dword [esi + 0xc]
or edx, 1
mov dword [esi + 4], edx
test edi, edi
je 0x10112da8
mov eax, dword [ebp + 0xc]
and eax, 2
mov dword [ebp + 0xc], eax
je 0x10112d6c
or edx, 2
mov dword [esi + 4], edx
cmp dword [esp + 0x20], 0
je 0x10112d9b
mov ecx, dword [esi + 0x24]
and edx, 2
cmp ecx, dword [esi + 8]
jne 0x10112d86
mov eax, dword [esi + 0x30]
cmp eax, dword [edi + 8]
jl 0x10112d98
mov eax, dword [esi]
push ecx
mov ecx, ebx
push dword [eax]
call fcn.10110d70
add esp, 8
mov dword [esi + 0x40], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x10112da8
mov edx, esi
mov ecx, ebx
call fcn.10112240
test byte [esi + 4], 2
je 0x10112dbc
mov dword [esi + 0x20], 0x10111ab0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
mov ecx, 0x10111da0
mov edx, 0x10111b30
cmp dword [eax + 0x30], 1
cmove ecx, edx
mov dword [esi + 0x20], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret