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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, ecx
mov dword [esp + 4], edx
push ebx
push esi
push edi
mov edi, dword [eax]
xor ebx, ebx
mov dword [esp + 0x14], eax
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x1c], ecx
lea ecx, [eax + 0x3c]
mov dword [esp + 0x18], ecx
cmp dword [eax + 0x3c], ebx
jne 0x1013255a
push dword [edi + 8]
cmp dword [edi + 0x24], ebx
mov ecx, 0x10166843
push dword [edi + 4]
mov eax, str._origin
cmove eax, ecx
push eax
push str.SELECT_sz_s_FROM__Q._q_docsize_WHERE_id_
call fcn.100294e0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x101324d3
lea ebx, [eax + 7]
jmp 0x1013255a
mov eax, dword [esp + 0x14]
mov edx, esi
push 0
push dword [esp + 0x1c]
mov eax, dword [eax]
push 0
push 0x85
push 0xffffffffffffffff
inc dword [eax + 0x44]
mov ecx, dword [edi]
call fcn.1009d7f0
mov ebx, eax
add esp, 0x14
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
dec dword [eax + 0x44]
cmp dword [0x10177b48], 0
je 0x10132550
mov eax, dword [0x1017ad00]
test eax, eax
je 0x1013251e
push eax
call dword [0x10177b98]
add esp, 4
push esi
call dword [0x10177b74]
sub dword [0x1017ab88], eax
add esp, 4
dec dword [0x1017abac]
push esi
call dword [0x10177b6c]
mov eax, dword [0x1017ad00]
add esp, 4
test eax, eax
je 0x1013255a
push eax
call dword [0x10177ba0]
jmp 0x10132557
push esi
call dword [0x10177b6c]
add esp, 4
mov edi, dword [esp + 0x18]
mov esi, dword [edi]
push esi
call fcn.10053c90
add esp, 4
test esi, esi
je 0x10132718
push dword [ebp + 0xc]
push dword [ebp + 8]
push 1
push esi
call fcn.10056380
push esi
call fcn.10054c20
add esp, 0x14
cmp eax, 0x64
jne 0x101326fe
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x101325a4
push eax
call dword [0x10177b98]
add esp, 4
mov eax, dword [esi + 0x78]
test eax, eax
je 0x101325b6
xor ecx, ecx
cmp cx, word [esi + 0x90]
jb 0x101325ce
mov ecx, dword [esi]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.1002a360
mov eax, 0x10161a88
push eax
call fcn.10053df0
mov ecx, dword [esi]
add esp, 4
mov edx, dword [esi + 0x24]
mov dword [esp + 0x14], eax
cmp byte [ecx + 0x57], 0
jne 0x101325ee
test edx, edx
jne 0x101325ee
xor eax, eax
jmp 0x101325f3
call fcn.100272e0
mov dword [esi + 0x24], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10132609
push eax
call dword [0x10177ba0]
add esp, 4
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x1013261c
push eax
call dword [0x10177b98]
add esp, 4
mov ecx, dword [esi + 0x78]
test ecx, ecx
je 0x1013262e
xor eax, eax
cmp ax, word [esi + 0x90]
jb 0x10132646
mov ecx, dword [esi]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.1002a360
mov ecx, 0x10161a88
movzx eax, word [ecx + 0x10]
test al, 2
je 0x10132659
cmp byte [ecx + 0x12], 1
jne 0x10132659
mov ebx, dword [ecx + 0xc]
jmp 0x10132682
test al, 0x10
je 0x10132671
mov edx, dword [ecx + 0xc]
test eax, 0x400
je 0x1013266d
mov ebx, dword [ecx]
add ebx, edx
jmp 0x10132682
mov ebx, edx
jmp 0x10132682
test al, 1
je 0x10132679
xor ebx, ebx
jmp 0x10132682
mov dl, 1
call fcn.1004e750
mov ebx, eax
mov ecx, dword [esi]
mov edx, dword [esi + 0x24]
cmp byte [ecx + 0x57], 0
jne 0x10132695
test edx, edx
jne 0x10132695
xor eax, eax
jmp 0x1013269a
call fcn.100272e0
mov dword [esi + 0x24], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x101326b0
push eax
call dword [0x10177ba0]
add esp, 4
xor edi, edi
mov dword [esp + 0x18], edi
cmp dword [esp + 0x1c], edi
jle 0x101326ea
nop dword [eax]
cmp edi, ebx
jge 0x101326fe
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea ecx, [edi + ecx]
call fcn.10135610
add dword [esp + 0x10], 4
add edi, eax
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x1c]
jl 0x101326c0
cmp edi, ebx
jne 0x101326fe
push esi
call fcn.10053c90
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.10053c90
add esp, 4
mov ecx, 0x10b
test eax, eax
cmove eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret