Function at 0x100545c7
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x228]
mov dword [esp + 0x9c], eax
mov eax, dword [ebx + 0x22c]
xor ecx, ecx
inc ecx
mov dword [ebx + 0x228], eax
inc eax
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebx + 0x22c], eax
push edi
mov edi, dword [ebx]
xor eax, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], edi
cmp esi, eax
je 0x10055397
cmp byte [edi + 0x1e], al
jne 0x10055397
cmp dword [ebx + 0x40], eax
jne 0x10055397
push eax
push eax
push eax
push 0x15
mov eax, ebx
call fcn.10045796
add esp, 0x10
test eax, eax
je 0x10054640
xor eax, eax
inc eax
jmp 0x10055399
push 0x2c
lea eax, [esp + 0x7c]
push 0
push eax
call fcn.1006c610
mov eax, dword [ebp + 0x10]
add esp, 0xc
cmp byte [eax], 4
ja 0x10054670
push edi
mov edi, dword [esi + 0x18]
call fcn.100415ac
and dword [esi + 0x18], 0
mov eax, 0xfffe
and word [esi + 6], ax
pop ecx
push 0
push esi
push ebx
call fcn.10054260
mov eax, dword [esi + 0x18]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x60], eax
mov eax, dword [esi]
add esp, 0xc
cmp dword [ebx + 0x40], 0
mov dword [esp + 0x3c], eax
jne 0x1005533e
mov eax, dword [esp + 0x28]
cmp byte [eax + 0x1e], 0
jne 0x1005533e
movzx eax, word [esi + 6]
shr eax, 2
and eax, 1
mov edi, ebx
mov dword [esp + 0x38], eax
call fcn.100521ec
mov dword [esp + 0x14], eax
test eax, eax
je 0x1005533e
mov ecx, dword [esp + 0x3c]
cmp dword [ecx], 1
mov edi, dword [ebp + 0x10]
movzx eax, byte [edi]
jle 0x100546ee
cmp eax, 6
je 0x100546e2
cmp eax, 7
jne 0x100546ee
push str.only_a_single_result_allowed_for_a_SELECT_that_is_part_of_an_expression
mov edi, ebx
jmp 0x10054896
and dword [esp + 0x30], 0
jmp 0x1005482d
mov eax, dword [esp + 0x54]
movsx ecx, word [eax]
cmp dword [esp + 0x30], ecx
jge 0x10054837
mov ecx, dword [esp + 0x30]
imul ecx, ecx, 0x38
lea ebx, [ecx + eax + 8]
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x10054829
cmp byte [ebx + 0x14], 0
jne 0x10054829
and dword [esp + 0x34], 0
lea eax, [esp + 0x34]
mov ecx, esi
call fcn.100408c8
mov ecx, dword [esp + 0x34]
mov eax, dword [ebp + 8]
add dword [eax + 0x21c], ecx
mov eax, dword [esp + 0x1c]
movzx edi, word [eax + 6]
shr edi, 2
and edi, 1
push edi
push dword [esp + 0x3c]
mov eax, esi
push dword [esp + 0x38]
push dword [ebp + 8]
call fcn.100536fa
add esp, 0x10
test eax, eax
je 0x1005478a
test edi, edi
je 0x10054783
or word [esi + 6], 4
mov dword [esp + 0x38], 1
or dword [esp + 0x30], 0xffffffff
jmp 0x100547e8
mov eax, dword [ebx + 0x18]
and dword [esp + 0xb4], 0
and dword [esp + 0xb8], 0
mov edi, dword [esp + 0x1c]
mov dword [esp + 0xb0], eax
mov eax, dword [ebp + 8]
mov cl, byte [eax + 0x22c]
mov byte [esp + 0xac], 9
mov byte [esp + 0xad], 0
mov byte [ebx + 0x17], cl
lea ecx, [esp + 0xac]
push ecx
push edi
push eax
call fcn.100545c7
mov byte [ebx + 0x14], 1
fld qword [edi + 0x48]
add esp, 0xc
call fcn.10082bf6
mov ecx, dword [ebx + 0xc]
mov dword [ecx + 0x18], eax
mov eax, dword [esp + 0x28]
cmp byte [eax + 0x1e], 0
jne 0x1005533e
and dword [esp + 0x34], 0
lea eax, [esp + 0x34]
mov ecx, esi
call fcn.100408c8
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x34]
sub dword [eax + 0x21c], ecx
mov edi, dword [ebp + 0x10]
cmp byte [edi], 4
mov eax, dword [esi + 8]
mov dword [esp + 0x54], eax
jbe 0x10054829
mov eax, dword [esi + 0x18]
mov dword [esp + 0x24], eax
inc dword [esp + 0x30]
cmp dword [esi + 0x1c], 0
je 0x100546f8
mov eax, dword [esi]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x60], eax
movzx eax, word [esi + 6]
mov ecx, eax
and ecx, 1
xor edx, edx
mov dword [esp + 0x50], ecx
cmp dword [esi + 0x1c], edx
je 0x100548c1
cmp dword [esi + 0x24], edx
jne 0x100548a1
xor ecx, ecx
mov eax, esi
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], esi
mov ecx, eax
mov eax, dword [eax + 0x1c]
inc edx
test eax, eax
jne 0x1005486f
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x58]
test eax, eax
je 0x100548a1
cmp edx, eax
jle 0x100548a1
mov edi, dword [ebp + 8]
push str.too_many_terms_in_compound_SELECT
call fcn.100254a9
pop ecx
jmp 0x1005533e
push edi
mov edi, dword [ebp + 8]
push edi
mov eax, esi
call fcn.100523b1
pop ecx
pop ecx
mov ecx, dword [esp + 0xa4]
mov dword [edi + 0x228], ecx
jmp 0x10055399
and al, 5
cmp al, 1
jne 0x100548e8
mov ebx, dword [esp + 0x3c]
push 0
push dword [esp + 0x2c]
call fcn.1004114b
mov dword [esi + 0x10], eax
mov dword [esp + 0x18], eax
pop ecx
mov eax, 0xfffe
and word [esi + 6], ax
pop ecx
mov ebx, dword [esp + 0x24]
mov edi, dword [esi + 0x10]
call fcn.100435fb
test eax, eax
jne 0x10054907
mov eax, dword [esp + 0x28]
test byte [eax + 0xc], 0x20
jne 0x10054907
and dword [esp + 0x24], 0
mov edi, dword [esp + 0x24]
mov ebx, dword [ebp + 8]
test edi, edi
je 0x10054946
push edi
push ebx
call fcn.10051833
mov ecx, dword [ebx + 0x44]
push 0xfffffffffffffff0
push eax
mov dword [edi + 8], ecx
inc dword [ebx + 0x44]
mov eax, dword [edi]
push 0
inc eax
inc eax
push eax
push dword [edi + 8]
push 0x29
push dword [esp + 0x34]
call fcn.10035d99
add esp, 0x24
mov dword [esp + 0x2c], eax
mov dword [esi + 0x40], eax
jmp 0x1005494b
or dword [esp + 0x2c], 0xffffffff
mov eax, dword [ebp + 0x10]
cmp byte [eax], 9
jne 0x1005496a
mov ecx, dword [esp + 0x3c]
push dword [ecx]
push dword [eax + 4]
mov eax, dword [esp + 0x1c]
push 0x29
call fcn.10035d82
add esp, 0xc
mov eax, dword [esp + 0x14]
call fcn.10035e33
fld qword [0x1009a8e8]
push eax
fstp qword [esi + 0x48]
mov dword [esp + 0xac], eax
push esi
mov eax, ebx
call fcn.10052215
test byte [esi + 6], 1
pop ecx
pop ecx
je 0x100549cc
mov edi, dword [ebx + 0x44]
lea eax, [edi + 1]
mov dword [ebx + 0x44], eax
push dword [esi]
mov dword [esp + 0x38], edi
push ebx
call fcn.10051833
push 0xfffffffffffffff0
push eax
push 0
push 0
push edi
push 0x29
push dword [esp + 0x34]
call fcn.10035d99
mov ecx, dword [esp + 0x38]
add esp, 0x24
mov dl, 0x10
call fcn.10035ff3
jmp 0x100549d1
or dword [esp + 0x34], 0xffffffff
cmp dword [esp + 0x38], 0
mov edx, dword [esp + 0x10]
jne 0x10054a69
test edx, edx
jne 0x10054a6d
push edx
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x48]
push dword [esp + 0x60]
push ebx
call fcn.1005bbf9
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1005533e
fld qword [esi + 0x48]
fcomp qword [edi + 0x28]
fnstsw ax
test ah, 0x41
jne 0x10054a1c
fld qword [edi + 0x28]
fstp qword [esi + 0x48]
cmp dword [esp + 0x2c], 0
jl 0x10054a3e
cmp dword [esp + 0x24], 0
jne 0x10054a3e
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
push 1
call fcn.10036127
or dword [esi + 0x40], 0xffffffff
pop ecx
push dword [edi + 0x14]
mov eax, dword [ebp + 0x10]
push dword [edi + 0x10]
push 0xffffffffffffffff
push dword [esp + 0x30]
push 0
push 0
push dword [esp + 0x54]
push esi
push ebx
call fcn.1005150f
add esp, 0x24
call fcn.1005c40d
jmp 0x100552ea
test edx, edx
je 0x10054ab6
mov eax, dword [esi]
mov ecx, dword [eax]
mov eax, dword [eax + 0xc]
test ecx, ecx
jle 0x10054a88
add eax, 0x10
xor edi, edi
mov word [eax], di
dec ecx
add eax, 0x14
test ecx, ecx
jg 0x10054a7b
mov eax, dword [edx]
mov ecx, dword [edx + 0xc]
test eax, eax
jle 0x10054aa1
add ecx, 0x10
xor edx, edx
mov word [ecx], dx
dec eax
add ecx, 0x14
test eax, eax
jg 0x10054a94
fld qword [0x1009a938]
fcom qword [esi + 0x48]
fnstsw ax
test ah, 5
jp 0x10054aba
fstp qword [esi + 0x48]
jmp 0x10054abc
fld1
jmp 0x10054ab1
fstp st(0)
mov eax, dword [esp + 0x14]
call fcn.10035e33
mov dword [esp + 0x4c], eax
xor eax, eax
push 9
pop ecx
lea edi, [esp + 0xbc]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xc0], eax
lea eax, [esp + 0x78]
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0xbc], ebx
test eax, eax
je 0x10054b08
mov eax, dword [eax]
inc eax
mov dword [esp + 0x84], eax
jmp 0x10054b10
and dword [esp + 0x84], 0
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x80], eax
lea eax, [esp + 0xbc]
push eax
call fcn.100438f4
mov esi, dword [esp + 0x28]
pop ecx
lea eax, [esp + 0xbc]
push eax
call fcn.100438f4
xor ebx, ebx
pop ecx
cmp dword [esp + 0x60], ebx
je 0x10054b58
push dword [esp + 0x60]
lea eax, [esp + 0xc0]
call fcn.100438cd
pop ecx
cmp dword [esp + 0x9c], ebx
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x94], eax
jle 0x10054b99
xor edi, edi
mov eax, dword [esp + 0x98]
mov eax, dword [edi + eax]
mov esi, dword [eax + 0x10]
lea ecx, [esp + 0xbc]
push ecx
call fcn.100438f4
inc ebx
add edi, 0x10
cmp ebx, dword [esp + 0xa0]
pop ecx
jl 0x10054b71
mov eax, dword [esp + 0x28]
cmp byte [eax + 0x1e], 0
jne 0x1005533e
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x1005509e
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x44]
mov dword [esp + 0x7c], eax
inc eax
push ebx
push edi
mov dword [edi + 0x44], eax
call fcn.10051833
mov esi, dword [esp + 0x1c]
push 0xfffffffffffffff0
push eax
push 0
push dword [esp + 0x98]
mov dword [esp + 0x7c], eax
push dword [esp + 0x94]
push 0x29
push esi
call fcn.10035d99
mov dword [esp + 0x8c], eax
mov eax, dword [edi + 0x48]
add esp, 0x24
inc eax
mov dword [esp + 0x48], eax
inc eax
mov dword [esp + 0x6c], eax
inc eax
mov dword [esp + 0x38], eax
mov dword [edi + 0x48], eax
mov eax, esi
call fcn.10035e33
inc dword [edi + 0x48]
mov dword [esp + 0x74], eax
mov eax, dword [edi + 0x48]
mov dword [esp + 0x1c], eax
mov eax, esi
call fcn.10035e33
mov dword [esp + 0x44], eax
mov eax, dword [edi + 0x48]
lea ecx, [eax + 1]
mov dword [esp + 0x5c], ecx
mov ecx, dword [ebx]
add eax, ecx
lea ecx, [eax + 1]
mov dword [edi + 0x48], eax
mov dword [esp + 0x70], ecx
mov ecx, dword [ebx]
xor ebx, ebx
push ebx
push dword [esp + 0x70]
add ecx, eax
push ebx
push 7
mov eax, esi
mov dword [edi + 0x48], ecx
call fcn.10035d07
push ebx
push dword [esp + 0x5c]
mov eax, esi
push ebx
push 7
call fcn.10035d07
push dword [esp + 0x64]
mov eax, esi
push dword [esp + 0x40]
push 2
call fcn.10035d82
add esp, 0x2c
push ebx
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x48]
push dword [esp + 0x60]
push edi
call fcn.1005bbf9
add esp, 0x14
mov dword [esp + 0x58], eax
cmp eax, ebx
je 0x1005533e
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x10054cb8
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax + 0x10]
and dword [esp + 0x40], 0
jmp 0x10054e4b
cmp dword [esp + 0x50], 0
je 0x10054ccd
mov eax, dword [ebp + 0xc]
test byte [eax + 6], 1
mov eax, str.DISTINCT
je 0x10054cd2
mov eax, str.GROUP_BY
push eax
call fcn.100518ef
mov edi, dword [ebx]
mov edx, dword [esp + 0x90]
lea eax, [edi + 1]
pop ecx
mov dword [esp + 0x40], 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
test edx, edx
jle 0x10054d12
mov ecx, dword [esp + 0x88]
add ecx, 0xc
cmp dword [ecx], eax
jl 0x10054d0c
inc dword [esp + 0x2c]
inc eax
add ecx, 0x18
dec edx
jne 0x10054d03
mov esi, dword [esp + 0x2c]
mov ecx, dword [ebp + 8]
call fcn.10043969
mov esi, eax
mov eax, ecx
call fcn.100422d6
push 0
push eax
mov ecx, esi
mov eax, ebx
call fcn.10042f43
lea eax, [esi + edi]
push eax
push dword [esp + 0x88]
mov eax, dword [esp + 0x24]
push 0x35
call fcn.10035d82
mov eax, dword [esp + 0x34]
and dword [esp + 0x44], 0
add esp, 0x14
cmp dword [esp + 0x8c], 0
mov dword [esp + 0x10], eax
jle 0x10054dd2
add eax, esi
and dword [esp + 0x20], 0
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x88]
add eax, ecx
mov ecx, dword [esp + 0x10]
cmp dword [eax + 0xc], ecx
jl 0x10054dbc
push dword [esp + 0x50]
mov edi, dword [ebp + 8]
push dword [eax + 4]
push dword [eax + 8]
push dword [eax]
call fcn.1004225e
add esp, 0x10
cmp dword [esp + 0x50], eax
je 0x10054db4
push dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x1c]
push 0xf
call fcn.10035d82
add esp, 0xc
inc dword [esp + 0x10]
inc dword [esp + 0x50]
inc dword [esp + 0x30]
mov eax, dword [esp + 0x30]
add dword [esp + 0x20], 0x18
cmp eax, dword [esp + 0x8c]
jl 0x10054d6e
mov eax, dword [ebp + 8]
call fcn.1004391a
mov edi, eax
mov eax, dword [esp + 0x14]
push edi
push dword [esp + 0x30]
push esi
push 0x1e
call fcn.10035d07
mov eax, dword [esp + 0x24]
push edi
push dword [esp + 0x90]
push 0x46
call fcn.10035d82
mov eax, dword [ebp + 8]
add esp, 0x1c
mov edx, edi
call fcn.10043935
mov edi, dword [esp + 0x2c]
mov ecx, esi
call fcn.1004398d
mov edi, dword [esp + 0x58]
call fcn.1005c40d
push dword [esp + 0x4c]
mov eax, dword [esp + 0x18]
push dword [esp + 0x80]
push 0x40
call fcn.10035d82
mov eax, dword [ebp + 8]
add esp, 0xc
mov byte [esp + 0x79], 1
call fcn.100422d6
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
call fcn.100422d6
xor eax, eax
cmp dword [ebx], eax
mov dword [esp + 0x10], eax
jle 0x10054ebb
mov dword [esp + 0x20], eax
cmp dword [esp + 0x40], 0
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x10]
je 0x10054e90
add ecx, eax
push ecx
push eax
push dword [esp + 0x84]
mov eax, esi
push 0x1c
call fcn.10035d07
add esp, 0x10
jmp 0x10054eaa
lea edi, [eax + ecx]
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x78], 1
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + ecx]
mov ecx, dword [ebp + 8]
call fcn.10042e24
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
add dword [esp + 0x20], 0x14
cmp eax, dword [ebx]
jl 0x10054e68
mov edi, dword [esp + 0x70]
push 0xfffffffffffffffa
push dword [esp + 0x68]
push dword [ebx]
push edi
push dword [esp + 0x6c]
push 0x18
push esi
call fcn.10035d99
mov eax, dword [esi + 0x1c]
add esp, 0x1c
mov dword [esp + 0x64], eax
inc eax
push eax
push 0
push eax
push 0x19
mov eax, esi
call fcn.10035d07
push dword [esp + 0x6c]
mov ebx, dword [ebx]
mov eax, dword [ebp + 8]
call fcn.100422f4
add esp, 0x14
push dword [esp + 0x74]
mov eax, esi
push dword [esp + 0x3c]
push 2
call fcn.10035d82
add esp, 0xc
push dword [esp + 0x4c]
mov eax, esi
push dword [esp + 0x70]
push 0x71
call fcn.10035d82
add esp, 0xc
push dword [esp + 0x44]
mov eax, esi
push dword [esp + 0x20]
push 2
call fcn.10035d82
mov edx, dword [esi + 0x1c]
mov eax, dword [esp + 0x70]
add esp, 0xc
mov ecx, esi
call fcn.10035fe3
lea eax, [esp + 0x78]
push eax
push dword [ebp + 8]
call fcn.100543f2
push 0
push dword [esp + 0x54]
xor ebx, ebx
inc ebx
push ebx
push 7
mov eax, esi
call fcn.10035d07
add esp, 0x18
cmp dword [esp + 0x40], 0
je 0x10054f8a
push dword [esp + 0x2c]
mov eax, esi
push dword [esp + 0x80]
push 0x43
call fcn.10035d82
add esp, 0xc
jmp 0x10054fa0
mov edi, dword [esp + 0x58]
call fcn.1005c40d
mov ecx, dword [esp + 0x68]
push ebx
mov eax, esi
call fcn.10036127
pop ecx
push dword [esp + 0x74]
mov eax, esi
push dword [esp + 0x3c]
push 2
call fcn.10035d82
add esp, 0xc
xor edi, edi
push edi
push dword [esp + 0x50]
mov eax, esi
push edi
push ebx
call fcn.10035d07
mov eax, dword [esi + 0x1c]
push edi
push dword [esp + 0x80]
mov dword [esp + 0x80], eax
push ebx
push 7
mov eax, esi
call fcn.10035d07
push dword [esp + 0x58]
mov eax, esi
push 3
call fcn.10035d6d
mov edx, dword [esp + 0x9c]
mov ecx, esi
call fcn.10035e7f
mov ebx, dword [esi + 0x1c]
lea eax, [ebx + 2]
push eax
push dword [esp + 0x74]
mov eax, esi
push 0x71
call fcn.10035d82
add esp, 0x34
push dword [esp + 0x38]
mov eax, esi
push 3
call fcn.10035d6d
mov eax, dword [ebp + 8]
lea edi, [esp + 0x80]
call fcn.100543a8
push 8
inc ebx
push ebx
push dword [esp + 0x70]
push dword [ebp + 8]
call fcn.1004328d
push dword [esp + 0x80]
mov eax, dword [ebp + 0xc]
push ebx
push dword [esp + 0x54]
push dword [esp + 0x48]
push 0
push 0
push dword [eax]
push eax
push dword [ebp + 8]
mov eax, dword [ebp + 0x10]
call fcn.1005150f
add esp, 0x3c
push dword [esp + 0x38]
mov eax, esi
push 3
call fcn.10035d6d
mov edx, dword [esp + 0x4c]
mov ecx, esi
call fcn.10035e7f
push dword [ebp + 8]
mov ebx, edi
call fcn.100542e5
add esp, 0xc
push dword [esp + 0x1c]
mov eax, esi
push 3
call fcn.10035d6d
pop ecx
jmp 0x100552d8
mov esi, dword [ebp + 0xc]
and dword [esp + 0x48], 0
lea eax, [esp + 0x78]
push eax
mov eax, esi
call fcn.10053c46
mov edi, eax
pop ecx
test edi, edi
je 0x100551b6
mov ebx, dword [ebp + 8]
mov esi, dword [edi + 0x44]
mov ecx, dword [ebx]
call fcn.10050960
and dword [esp + 0x1c], 0
and dword [esp + 0x58], 0
mov esi, eax
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x44], eax
inc eax
mov dword [ebx + 0x44], eax
mov eax, dword [edi + 0x14]
mov dword [esp + 0x5c], eax
mov eax, ebx
call fcn.10048a81
push dword [edi]
mov ebx, dword [edi + 0x14]
mov eax, dword [ebp + 8]
push 0
push esi
call fcn.10045815
mov eax, dword [edi + 0x10]
mov ebx, dword [esp + 0x64]
add esp, 0xc
test eax, eax
je 0x1005514a
cmp byte [eax + 0x1a], 0
jne 0x10055121
test ebx, ebx
je 0x1005511f
mov ecx, dword [eax + 4]
cmp ecx, dword [ebx + 4]
jge 0x10055121
mov ebx, eax
mov eax, dword [eax + 0x20]
test eax, eax
jne 0x1005510d
test ebx, ebx
je 0x1005514a
mov eax, dword [ebx + 4]
cmp eax, dword [edi + 8]
jge 0x1005514a
mov eax, dword [ebx + 0x14]
push ebx
push dword [ebp + 8]
mov dword [esp + 0x64], eax
call fcn.10048dc7
pop ecx
pop ecx
mov dword [esp + 0x1c], eax
push esi
push dword [esp + 0x60]
mov esi, dword [esp + 0x1c]
push dword [esp + 0x4c]
mov eax, esi
push 0x26
call fcn.10035d07
add esp, 0x10
cmp dword [esp + 0x1c], 0
je 0x1005517c
push 0xfffffffffffffff0
push dword [esp + 0x20]
or eax, 0xffffffff
push esi
call fcn.10036166
add esp, 0xc
mov eax, dword [esp + 0x98]
push dword [eax + 8]
mov eax, esi
push dword [esp + 0x48]
push 0x1f
call fcn.10035d82
add esp, 0xc
push dword [esp + 0x44]
mov eax, esi
push 0x2b
call fcn.10035d6d
pop ecx
pop ecx
mov eax, edi
mov edi, dword [ebp + 8]
mov ecx, ebx
call fcn.1005456e
jmp 0x1005528e
and dword [esp + 0x1c], 0
mov eax, esi
call fcn.10053bd6
mov byte [esp + 0x1b], al
test al, al
je 0x1005520a
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [esp + 0x28]
mov ebx, dword [eax + 0x10]
push 0
push esi
call fcn.1004114b
pop ecx
pop ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x48], eax
test eax, eax
je 0x1005520a
cmp byte [esi + 0x1e], 0
jne 0x1005520a
cmp byte [esp + 0x1b], 1
mov edx, dword [eax + 0xc]
setne cl
mov byte [edx + 0xc], cl
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov byte [eax], 0x98
mov esi, dword [ebp + 8]
push esi
lea ebx, [esp + 0x7c]
call fcn.100542e5
movzx ax, byte [esp + 0x1f]
pop ecx
movzx eax, ax
push eax
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x48]
push dword [esp + 0x60]
push esi
call fcn.1005bbf9
mov edi, eax
xor ebx, ebx
add esp, 0x14
cmp edi, ebx
jne 0x10055252
push dword [esp + 0x28]
mov edi, dword [esp + 0x4c]
call fcn.100415ac
jmp 0x1005489b
lea eax, [esp + 0x78]
push eax
push esi
call fcn.100543f2
pop ecx
pop ecx
cmp dword [esp + 0x1c], ebx
jne 0x1005527e
cmp byte [esp + 0x1b], bl
je 0x1005527e
mov eax, dword [esp + 0x14]
push ebx
push dword [edi + 0x14]
push ebx
push 1
call fcn.10035d07
add esp, 0x10
call fcn.1005c40d
lea edi, [esp + 0x78]
mov eax, esi
call fcn.100543a8
push 8
push dword [esp + 0x50]
xor esi, esi
push dword [esp + 0x68]
mov dword [esp + 0x30], esi
push dword [ebp + 8]
call fcn.1004328d
push dword [esp + 0x5c]
mov eax, dword [ebp + 0xc]
push dword [esp + 0x60]
push 0xffffffffffffffff
push esi
push esi
push esi
push dword [eax]
push eax
push dword [ebp + 8]
mov eax, dword [ebp + 0x10]
call fcn.1005150f
mov edi, dword [esp + 0x7c]
add esp, 0x34
push dword [esp + 0x28]
call fcn.100415ac
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x50]
pop ecx
mov ecx, esi
call fcn.10035e7f
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
cmp dword [esp + 0x34], 0
jl 0x100552fe
push str.DISTINCT
mov edi, ebx
call fcn.100518ef
pop ecx
cmp dword [esp + 0x24], 0
je 0x10055329
push str.ORDER_BY
mov edi, ebx
call fcn.100518ef
mov eax, dword [esp + 0x40]
pop ecx
push dword [ebp + 0x10]
push dword [eax]
push dword [esp + 0x1c]
push esi
push ebx
call fcn.10051986
add esp, 0x14
mov edx, dword [esp + 0xa8]
mov ecx, dword [esp + 0x14]
call fcn.10035e7f
and dword [esp + 0x20], 0
cmp dword [esp + 0x20], 0
mov ecx, dword [esp + 0xa4]
mov eax, dword [ebp + 8]
mov dword [eax + 0x228], ecx
jne 0x1005536e
mov ecx, dword [ebp + 0x10]
cmp byte [ecx], 5
jne 0x1005536e
push dword [esp + 0x3c]
push dword [esp + 0x58]
push eax
call fcn.10051d9a
add esp, 0xc
push dword [esp + 0x88]
push dword [esp + 0x2c]
call fcn.100239b6
push dword [esp + 0xa0]
push dword [esp + 0x34]
call fcn.100239b6
mov eax, dword [esp + 0x30]
add esp, 0x10
jmp 0x10055399
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret