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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov eax, ecx
xor ebx, ebx
xorps xmm0, xmm0
mov dword [esp + 8], eax
push esi
push edi
lea edi, [eax + 0x3c]
movlpd qword [esp + 0x20], xmm0
cmp dword [edi], ebx
jne 0x1013272d
mov ebx, dword [eax]
mov ecx, 0x101675d3
mov eax, str._origin
push dword [ebx + 8]
cmp dword [ebx + 0x24], 0
push dword [ebx + 4]
cmove eax, ecx
push eax
push str.SELECT_sz_s_FROM__Q._q_docsize_WHERE_id_
call fcn.1002a830
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x101326a9
push dword [edi]
call fcn.10054fa0
add esp, 4
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
mov edx, esi
push 0
push edi
push 0
mov eax, dword [eax]
push 0x85
push 0xffffffffffffffff
inc dword [eax + 0x44]
mov ecx, dword [ebx]
call fcn.1009fe60
mov ebx, eax
add esp, 0x14
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
dec dword [eax + 0x44]
cmp dword [0x10178a38], 0
je 0x10132723
mov eax, dword [0x1017bbe8]
test eax, eax
je 0x101326f1
push eax
call dword [0x10178a88]
add esp, 4
push esi
call dword [0x10178a64]
sub dword [0x1017ba70], eax
add esp, 4
dec dword [0x1017ba94]
push esi
call dword [0x10178a5c]
mov eax, dword [0x1017bbe8]
add esp, 4
test eax, eax
je 0x1013272d
push eax
call dword [0x10178a90]
jmp 0x1013272a
push esi
call dword [0x10178a5c]
add esp, 4
mov esi, dword [edi]
mov edi, esi
push esi
call fcn.10054fa0
add esp, 4
test ebx, ebx
jne 0x10132945
push dword [ebp + 0xc]
push dword [ebp + 8]
push 1
push esi
call fcn.10057670
push esi
call fcn.10055f30
add esp, 0x14
cmp eax, 0x64
jne 0x10132805
test esi, esi
jne 0x10132779
mov ecx, 0x10162818
call fcn.1004e6e0
mov ebx, eax
mov edi, edx
jmp 0x1013280d
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x1013278c
push eax
call dword [0x10178a88]
add esp, 4
mov eax, dword [esi + 0x78]
test eax, eax
je 0x101327a6
mov ecx, 1
cmp cx, word [esi + 0x90]
jae 0x101327a6
lea ecx, [eax + 0x28]
jmp 0x101327be
mov ecx, dword [esi]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.1002b6b0
mov ecx, 0x10162818
call fcn.1004e6e0
mov ecx, dword [edi]
mov ebx, eax
mov dword [esp + 0xc], edx
mov edx, dword [edi + 0x24]
cmp byte [ecx + 0x57], 0
jne 0x101327dc
test edx, edx
jne 0x101327dc
xor eax, eax
jmp 0x101327e1
call fcn.10028630
mov dword [edi + 0x24], eax
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x101327ff
push eax
call dword [0x10178a90]
mov ecx, dword [esp + 0x10]
add esp, 4
mov dword [esp + 0xc], ecx
mov edi, dword [esp + 0xc]
jmp 0x10132811
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
mov dword [esp + 0xc], edi
push esi
call fcn.10054fa0
add esp, 4
test eax, eax
jne 0x10132947
mov ecx, ebx
or ecx, edi
je 0x10132947
mov eax, dword [esp + 0x10]
mov esi, dword [eax + 4]
mov dword [esp + 0x1c], esi
cmp dword [esi + 0x60], 0
jne 0x1013285e
mov ecx, esi
call fcn.1011dbb0
cmp dword [esi + 0x2c], 0
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], edx
jne 0x10132934
mov ecx, esi
call fcn.1011d9d0
mov dword [esi + 0x60], eax
cmp dword [esi + 0x2c], 0
jne 0x10132934
mov eax, dword [esi + 0x60]
inc dword [eax]
mov edx, dword [esi + 0x60]
mov dword [esp + 0x20], edx
test edx, edx
je 0x10132934
mov edi, dword [edx + 0x1c]
xor ecx, ecx
sub edi, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
js 0x1013292d
lea eax, [edi + edi*2]
lea edx, [edx + eax*4]
add edx, 0x28
mov dword [esp + 0x10], edx
nop
mov esi, dword [edx - 4]
sub esi, 1
js 0x10132911
mov eax, dword [esp + 0xc]
lea edi, [esi*8]
sub edi, esi
shl edi, 3
mov edx, dword [edx]
add edx, edi
cmp dword [edx + 0x14], eax
ja 0x10132901
jb 0x101328c8
cmp dword [edx + 0x10], ebx
ja 0x10132901
cmp dword [edx + 0x1c], eax
jb 0x10132901
ja 0x101328d4
cmp dword [edx + 0x18], ebx
jb 0x10132901
test ecx, ecx
jne 0x101328e7
add dword [edx + 0x28], 1
mov dword [esp + 0x14], 1
adc dword [edx + 0x2c], ecx
push dword [ebp + 0xc]
mov ecx, dword [esp + 0x20]
push dword [ebp + 8]
call fcn.1012a2e0
mov eax, dword [esp + 0x14]
add esp, 8
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
sub edi, 0x38
sub esi, 1
jns 0x101328b8
mov edi, dword [esp + 0x18]
dec edi
sub edx, 0xc
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], edx
test edi, edi
jns 0x101328a0
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ecx, edx
call fcn.1011d160
mov eax, dword [esi + 0x2c]
mov dword [esi + 0x2c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret