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

Disassembly:
sub esp, 0xe0
mov eax, dword [0x518450]
xor eax, esp
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0xec]
xor ecx, ecx
push ebx
mov ebx, dword [esp + 0xe8]
inc ecx
mov dword [esp + 0x10], eax
push ebp
push esi
mov eax, dword [ebx + 0x228]
mov esi, dword [esp + 0xf4]
mov dword [esp + 0x74], eax
mov eax, dword [ebx + 0x22c]
mov dword [ebx + 0x228], eax
inc eax
mov dword [esp + 0x54], esi
mov dword [esp + 0x5c], ecx
mov dword [ebx + 0x22c], eax
push edi
mov edi, dword [ebx]
mov dword [esp + 0x30], edi
test esi, esi
je 0x4a6282
cmp byte [edi + 0x1e], 0
jne 0x4a6282
xor eax, eax
cmp dword [ebx + 0x40], eax
jne 0x4a6282
push eax
push eax
push eax
push 0x15
push ebx
call fcn.00493ab1
add esp, 0x14
test eax, eax
je 0x4a522a
xor ecx, ecx
lea eax, [ecx + 1]
jmp 0x4a6284
push 0x30
xor ebp, ebp
lea eax, [esp + 0x80]
push ebp
push eax
call fcn.004bf040
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp byte [eax], 4
ja 0x4a525f
push dword [esi + 0x18]
push edi
call fcn.0049b1c9
pop ecx
mov eax, 0xfffe
mov dword [esi + 0x18], ebp
and word [esi + 6], ax
pop ecx
push ebp
push esi
push ebx
call fcn.004a646d
mov eax, dword [esi + 0x18]
add esp, 0xc
mov edx, dword [esi]
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
cmp dword [ebx + 0x40], ebp
jne 0x4a6224
cmp byte [edi + 0x1e], 0
jne 0x4a6224
movzx eax, word [esi + 6]
shr eax, 2
and eax, 1
push ebx
mov dword [esp + 0x58], eax
call fcn.0049d9c4
mov ebp, dword [esp + 0x20]
mov edi, eax
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x28], edi
pop ecx
test edi, edi
je 0x4a6235
cmp dword [edx], 1
movzx eax, byte [ebp]
jle 0x4a52e5
cmp eax, 6
je 0x4a52d3
cmp eax, 7
jne 0x4a52e5
push str.only_a_single_result_allowed_for_a_SELECT_that_is_part_of_an_expression
push ebx
call fcn.00499475
pop ecx
pop ecx
jmp 0x4a6231
xor ecx, ecx
mov ebp, ecx
mov dword [esp + 0x44], ecx
cmp dword [esi + 0x1c], ecx
jne 0x4a54ee
mov edx, dword [esp + 0x10]
movsx eax, word [edx]
cmp ebp, eax
jge 0x4a54ee
mov eax, ebp
shl eax, 6
mov dword [esp + 0x28], eax
mov edx, dword [eax + edx + 0x18]
test edx, edx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x10]
je 0x4a54e0
mov edx, dword [eax + edx + 0x1c]
test edx, edx
je 0x4a5349
mov ecx, dword [esp + 0x10]
push edx
push dword [eax + ecx + 0x20]
push 2
push edi
call fcn.004a9403
mov edx, dword [esp + 0x20]
add esp, 0x10
xor ecx, ecx
jmp 0x4a54e0
lea eax, [esp + 0x34]
mov dword [esp + 0x34], ecx
push eax
push esi
call fcn.004899f6
mov eax, dword [esp + 0x3c]
add dword [ebx + 0x21c], eax
mov eax, dword [esp + 0x34]
movzx ebp, word [eax + 6]
mov eax, dword [esp + 0x4c]
shr ebp, 2
and ebp, 1
push ebp
push dword [esp + 0x60]
push eax
push esi
push ebx
call fcn.00487e1d
add esp, 0x1c
test eax, eax
je 0x4a53a5
test ebp, ebp
je 0x4a5399
or word [esi + 6], 4
mov dword [esp + 0x54], 1
or eax, 0xffffffff
mov dword [esp + 0x44], eax
jmp 0x4a5494
mov eax, dword [ebx + 0x48]
xor ebp, ebp
mov ecx, dword [esp + 0x28]
inc eax
mov edx, dword [esp + 0x10]
push eax
push ebp
push 7
mov dword [ebx + 0x48], eax
push edi
mov dword [esp + 0x44], ebp
mov dword [ecx + edx + 0x20], eax
call fcn.004a9403
mov ecx, dword [esp + 0x38]
add esp, 0x10
mov edx, dword [esp + 0x10]
mov dword [esp + 0x38], eax
inc eax
cmp byte [ecx + edx + 0x26], 0
mov dword [ecx + edx + 0x1c], eax
jne 0x4a5404
cmp dword [ebx + 0x1ac], ebp
jne 0x4a5404
inc dword [ebx + 0x48]
push dword [ebx + 0x48]
push 0x1a
push edi
call fcn.004a93ea
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x34], eax
mov ebp, dword [esp + 0x28]
mov eax, dword [edx + ebp + 0x28]
mov dword [esp + 0xe0], eax
xor eax, eax
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], eax
mov al, byte [ebx + 0x22c]
mov word [esp + 0xdc], 9
mov byte [edx + ebp + 0x27], al
lea eax, [esp + 0xdc]
push eax
push dword [esp + 0x30]
push ebx
call fcn.004a5192
mov eax, dword [esp + 0x38]
add esp, 0xc
movsd xmm0, qword [eax + 0x48]
call fcn.004c0221
mov edx, dword [esp + 0x10]
mov ecx, dword [edx + ebp + 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4a5476
push eax
push edi
call fcn.004af419
pop ecx
pop ecx
mov eax, dword [esp + 0x10]
push dword [eax + ebp + 0x20]
push 3
push edi
call fcn.004a93ea
push eax
push dword [esp + 0x48]
push edi
call fcn.004a962b
add esp, 0x18
mov eax, dword [esp + 0x30]
cmp byte [eax + 0x1e], 0
jne 0x4a621d
lea eax, [esp + 0x34]
xor ebp, ebp
push eax
push esi
mov dword [esp + 0x3c], ebp
call fcn.004899f6
mov eax, dword [esp + 0x3c]
sub dword [ebx + 0x21c], eax
mov eax, dword [esp + 0x24]
mov edx, dword [esi + 8]
mov ebp, dword [esp + 0x4c]
pop ecx
pop ecx
xor ecx, ecx
mov dword [esp + 0x10], edx
cmp byte [eax], 4
jbe 0x4a54e0
mov eax, dword [esi + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
inc ebp
mov dword [esp + 0x44], ebp
cmp dword [esi + 0x1c], ecx
je 0x4a52fa
mov edx, dword [esi + 0x14]
mov eax, dword [esi]
mov dword [esp + 0x34], edx
movzx edx, word [esi + 6]
mov dword [esp + 0x18], eax
and edx, 1
mov eax, dword [esi + 0xc]
mov dword [esp + 0x50], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x6c], edx
cmp dword [esi + 0x1c], ecx
je 0x4a557e
cmp dword [esi + 0x24], ecx
jne 0x4a555e
mov edx, ecx
mov eax, esi
mov dword [eax + 0x20], ecx
inc edx
mov dword [eax + 0x24], esi
mov ecx, eax
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x4a5526
mov edi, dword [esp + 0x30]
cmp dword [edi + 0x58], eax
je 0x4a555e
cmp edx, dword [edi + 0x58]
jle 0x4a555e
push str.too_many_terms_in_compound_SELECT
push ebx
call fcn.00499475
pop ecx
pop ecx
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
jmp 0x4a6239
push dword [esp + 0x1c]
push esi
push ebx
call fcn.0048b9dd
mov esi, dword [esp + 0x84]
add esp, 0xc
mov dword [ebx + 0x228], esi
jmp 0x4a6284
mov ebp, dword [esp + 0x40]
push ebp
push eax
call fcn.0049b168
pop ecx
pop ecx
test eax, eax
jne 0x4a55a5
mov eax, dword [esp + 0x30]
push 0
test byte [eax + 0xc], 0x20
pop eax
cmove ebp, eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], ebp
mov al, byte [esi + 6]
xor ecx, ecx
and al, 5
inc ecx
cmp al, cl
jne 0x4a55f0
push dword [esi]
push ebp
call fcn.0049b168
pop ecx
xor ebp, ebp
pop ecx
test eax, eax
jne 0x4a55f2
push ebp
push dword [esi]
mov eax, 0xfffe
push dword [esp + 0x38]
and word [esi + 6], ax
call fcn.0049b21f
mov dword [esp + 0x54], eax
add esp, 0xc
mov dword [esi + 0x10], eax
mov dword [esp + 0x2c], eax
mov eax, ebp
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
jmp 0x4a55f6
xor ebp, ebp
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4a5631
push eax
push ebx
call fcn.0048a85b
mov edx, dword [esp + 0x48]
mov ecx, eax
mov eax, dword [ebx + 0x44]
push 0xfffffffffffffff0
push ecx
mov dword [edx + 8], eax
inc dword [ebx + 0x44]
mov eax, dword [edx]
push ebp
add eax, 2
push eax
push dword [edx + 8]
push 0x2a
push edi
call fcn.004a946f
add esp, 0x24
mov dword [esp + 0x28], eax
mov dword [esi + 0x40], eax
jmp 0x4a5636
or dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x1c]
cmp byte [eax], 9
jne 0x4a5653
mov edx, dword [esp + 0x18]
push dword [edx]
push dword [eax + 4]
push 0x2a
push edi
call fcn.004a9403
add esp, 0x10
push edi
call fcn.004af77e
movsd xmm0, qword [0x4e9b70]
push eax
push esi
push ebx
mov dword [esp + 0xc0], eax
movsd qword [esi + 0x48], xmm0
call fcn.00484328
add esp, 0x10
cmp dword [esi + 0x30], ebp
jne 0x4a5696
mov eax, dword [esp + 0x28]
test eax, eax
js 0x4a5696
push eax
push edi
call fcn.004aef06
pop ecx
pop ecx
mov byte [eax], 0x2b
or word [esi + 6], 0x40
test byte [esi + 6], 1
je 0x4a56d1
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x44], eax
inc eax
mov dword [ebx + 0x44], eax
push dword [esi]
push ebx
call fcn.0048a85b
push 0xfffffffffffffff0
push eax
push ebp
push ebp
push dword [esp + 0x5c]
push 0x2a
push edi
call fcn.004a946f
push 0x10
push edi
mov dword [esp + 0x4c], eax
call fcn.004a97c6
add esp, 0x2c
jmp 0x4a56db
or dword [esp + 0x20], 0xffffffff
or dword [esp + 0x44], 0xffffffff
cmp dword [esp + 0x54], 0
mov edx, dword [esp + 0x48]
jne 0x4a58d6
test edx, edx
jne 0x4a58d6
cmp dword [esp + 0x6c], edx
je 0x4a56fc
mov eax, dword [esi]
jmp 0x4a56fe
mov eax, ebp
push ebp
push eax
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x5c]
push dword [esp + 0x20]
push ebx
call fcn.004b281f
add esp, 0x18
mov dword [esp + 0x24], eax
test eax, eax
je 0x4a622d
movsd xmm1, qword [eax + 0x30]
movsd xmm0, qword [esi + 0x48]
comisd xmm0, xmm1
jbe 0x4a5737
movsd qword [esi + 0x48], xmm1
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x40], eax
test ecx, ecx
js 0x4a5758
test eax, eax
jne 0x4a5758
push ecx
push edi
call fcn.004a97de
or dword [esi + 0x40], 0xffffffff
pop ecx
pop ecx
mov eax, dword [esp + 0x24]
mov cl, byte [eax + 8]
mov byte [esp + 0x17], cl
test cl, cl
je 0x4a58a6
push dword [esp + 0x20]
push edi
call fcn.004aef06
or dword [esp + 0x4c], 0xffffffff
mov edx, eax
cmp byte [esp + 0x1f], 2
pop ecx
pop ecx
jne 0x4a589f
inc dword [ebx + 0x48]
mov ecx, dword [ebx + 0x48]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
lea ebp, [ecx + 1]
mov eax, dword [eax]
lea esi, [eax + ebp]
lea eax, [ecx + eax*2]
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x18]
mov dword [ebx + 0x48], eax
xor eax, eax
inc eax
mov byte [edx], 7
push eax
push ebp
push esi
push ebx
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
call fcn.00499ac9
mov eax, dword [esi]
mov ecx, dword [esp + 0x38]
add eax, 3
add eax, dword [edi + 0x1c]
mov dword [esp + 0x5c], eax
dec eax
push eax
push ecx
push 0x1b
push edi
call fcn.004a9403
xor eax, eax
add esp, 0x20
cmp dword [esi], eax
mov esi, dword [esp + 0x58]
mov dword [esp + 0x34], eax
jle 0x4a5860
mov ecx, eax
mov eax, dword [esp + 0x5c]
sub eax, ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0xc]
push dword [ecx + eax]
push ebx
call fcn.0049a92b
mov esi, eax
mov eax, dword [esp + 0x70]
add eax, ebp
push eax
push dword [esp + 0x58]
push ebp
push 0x4b
push edi
call fcn.004a941e
push 0xfffffffffffffffc
push esi
push 0xffffffffffffffff
push edi
call fcn.004a967f
push 0x80
push edi
call fcn.004a97c6
mov eax, dword [esp + 0x68]
add esp, 0x34
mov ecx, dword [esp + 0x20]
inc eax
mov edx, dword [esp + 0x18]
add ecx, 0x14
inc ebp
mov dword [esp + 0x34], eax
mov dword [esp + 0x20], ecx
cmp eax, dword [edx]
jl 0x4a57fe
mov esi, dword [esp + 0x58]
xor eax, eax
mov ecx, dword [esp + 0x24]
push dword [ecx + 0x14]
push eax
push 1
push edi
call fcn.004a9403
push dword [esp + 0x38]
xor ebp, ebp
push ebp
push 7
push edi
call fcn.004a9403
mov eax, dword [esp + 0x38]
push dword [eax]
mov eax, dword [esp + 0x4c]
push dword [esp + 0x80]
inc eax
push eax
push 0xd
push edi
call fcn.004a941e
add esp, 0x34
jmp 0x4a58a2
mov byte [edx], 0x95
mov eax, dword [esp + 0x24]
push dword [eax + 0x18]
push dword [eax + 0x14]
push dword [esp + 0x24]
push dword [esp + 0x50]
push dword [esp + 0x50]
push ebp
push ebp
push dword [esp + 0x34]
push esi
push ebx
call fcn.00491ea8
push dword [esp + 0x4c]
call fcn.004b315e
add esp, 0x2c
jmp 0x4a61bf
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x64], ebp
test edx, edx
je 0x4a5934
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax]
test eax, eax
jle 0x4a5901
add ecx, 0x10
xor edi, edi
dec eax
mov word [ecx], di
lea ecx, [ecx + 0x14]
test eax, eax
jg 0x4a58f0
mov edi, dword [esp + 0x24]
mov eax, dword [edx]
mov ecx, dword [edx + 0xc]
test eax, eax
jle 0x4a591a
add ecx, 0x10
xor edx, edx
dec eax
mov word [ecx], dx
lea ecx, [ecx + 0x14]
test eax, eax
jg 0x4a590d
movsd xmm0, qword [esi + 0x48]
movsd xmm1, qword [0x4e9b18]
comisd xmm0, xmm1
jbe 0x4a5941
movsd qword [esi + 0x48], xmm1
jmp 0x4a5941
movsd xmm0, qword [0x4e9ac8]
movsd qword [esi + 0x48], xmm0
push edi
call fcn.004af77e
pop ecx
mov dword [esp + 0x54], eax
lea edi, [esp + 0xb8]
xor eax, eax
push 9
pop ecx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x48]
mov dword [esp + 0xbc], eax
lea eax, [esp + 0x7c]
mov dword [esp + 0xb8], ebx
mov dword [esp + 0xd4], eax
test edi, edi
je 0x4a598b
mov eax, dword [edi]
inc eax
mov dword [esp + 0x8c], eax
jmp 0x4a5992
mov dword [esp + 0x8c], ebp
push dword [esp + 0x18]
lea eax, [esp + 0xbc]
mov dword [esp + 0x8c], edi
push eax
call fcn.00499646
push dword [esp + 0x48]
lea eax, [esp + 0xc4]
push eax
call fcn.00499646
mov eax, dword [esp + 0x44]
add esp, 0x10
test eax, eax
je 0x4a59d6
push eax
lea eax, [esp + 0xbc]
push eax
call fcn.00499673
pop ecx
pop ecx
mov eax, dword [esp + 0x94]
mov dword [esp + 0x9c], eax
xor eax, eax
cmp dword [esp + 0xa4], eax
jle 0x4a5a22
mov ebp, eax
mov esi, eax
mov eax, dword [esp + 0xa0]
mov eax, dword [eax + ebp]
push dword [eax + 0x10]
lea eax, [esp + 0xbc]
push eax
call fcn.00499646
inc esi
lea ebp, [ebp + 0x10]
pop ecx
pop ecx
cmp esi, dword [esp + 0xa4]
jl 0x4a59f3
mov esi, dword [esp + 0x58]
xor eax, eax
mov ecx, dword [esp + 0x30]
cmp byte [ecx + 0x1e], 0
jne 0x4a622d
test edi, edi
je 0x4a5f65
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x80], eax
inc eax
push edi
push ebx
mov dword [ebx + 0x44], eax
call fcn.0048a85b
mov edi, dword [esp + 0x2c]
xor ebp, ebp
push 0xfffffffffffffff0
push eax
push ebp
push dword [esp + 0xa0]
mov dword [esp + 0xc4], eax
push dword [esp + 0x98]
push 0x2b
push edi
call fcn.004a946f
inc dword [ebx + 0x48]
mov dword [esp + 0xd8], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x94], eax
inc eax
mov dword [esp + 0x60], eax
inc eax
push edi
mov dword [ebx + 0x48], eax
call fcn.004af77e
inc dword [ebx + 0x48]
mov dword [esp + 0x9c], eax
mov eax, dword [ebx + 0x48]
push edi
mov dword [esp + 0x4c], eax
call fcn.004af77e
mov ecx, dword [ebx + 0x48]
mov edx, dword [esp + 0x74]
push dword [esp + 0x68]
mov dword [esp + 0x8c], eax
lea eax, [ecx + 1]
add ecx, dword [edx]
mov dword [esp + 0x98], eax
mov dword [ebx + 0x48], ecx
push ebp
lea eax, [ecx + 1]
mov dword [esp + 0x5c], eax
mov eax, dword [edx]
add eax, ecx
push 7
push edi
mov dword [ebx + 0x48], eax
call fcn.004a9403
push dword [esp + 0xac]
push ebp
push 7
push edi
call fcn.004a9403
add esp, 0x4c
push dword [esp + 0x5c]
push dword [esp + 0x24]
push 2
push edi
call fcn.004a9403
push ebp
push ebp
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x6c]
push dword [esp + 0x30]
push ebx
call fcn.004b281f
add esp, 0x28
mov dword [esp + 0x38], eax
test eax, eax
je 0x4a622d
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], eax
test eax, eax
jne 0x4a5b49
mov eax, dword [esi + 0x10]
mov dword [esp + 0x48], eax
mov dword [esp + 0x60], ebp
jmp 0x4a5cfc
cmp dword [esp + 0x6c], ebp
je 0x4a5b5a
test byte [esi + 6], 1
mov eax, str.DISTINCT
je 0x4a5b5f
mov eax, str.GROUP_BY
push eax
push ebx
call fcn.00485c67
mov esi, dword [esp + 0x34]
pop ecx
pop ecx
mov dword [esp + 0x60], 1
mov eax, dword [esi]
mov dword [esp + 0x4c], eax
inc eax
mov dword [esp + 0x6c], eax
mov ecx, eax
mov dword [esp + 0x50], eax
mov edx, eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x2c], eax
test eax, eax
jle 0x4a5bb3
mov eax, dword [esp + 0x90]
add eax, 0xc
cmp dword [eax], edx
jl 0x4a5ba6
inc ecx
inc edx
add eax, 0x18
dec dword [esp + 0x2c]
jne 0x4a5ba0
mov dword [esp + 0x50], ecx
push ecx
push ebx
call fcn.0049d19f
push ebx
mov dword [esp + 0x38], eax
call fcn.0049992b
push ebp
push dword [esp + 0x3c]
push esi
push ebx
call fcn.00499ac9
mov eax, dword [esp + 0x68]
mov esi, dword [esp + 0x48]
add eax, esi
push eax
push dword [esp + 0xa0]
push 0x37
push edi
call fcn.004a9403
mov edx, dword [esp + 0xc0]
add esp, 0x2c
mov dword [esp + 0x64], ebp
test edx, edx
jle 0x4a5c61
mov ecx, dword [esp + 0x6c]
lea eax, [esi + ecx]
mov esi, ebp
mov dword [esp + 0x4c], eax
mov ebp, eax
mov eax, dword [esp + 0x90]
cmp dword [eax + esi + 0xc], ecx
jl 0x4a5c4f
push ebp
push dword [eax + esi + 4]
push dword [eax + esi + 8]
push dword [eax + esi]
push ebx
call fcn.00499b23
add esp, 0x14
cmp ebp, eax
je 0x4a5c3e
push ebp
push eax
push 0xf
push edi
call fcn.004a9403
add esp, 0x10
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x94]
inc ecx
mov dword [esp + 0x6c], ecx
inc ebp
mov eax, dword [esp + 0x64]
add esi, 0x18
inc eax
mov dword [esp + 0x64], eax
cmp eax, edx
jl 0x4a5c0b
xor ebp, ebp
push ebx
call fcn.0049d1d0
mov esi, eax
push esi
push dword [esp + 0x58]
push dword [esp + 0x38]
push 0x1f
push edi
call fcn.004a941e
push esi
push dword [esp + 0x9c]
push 0x60
push edi
call fcn.004a9403
push esi
push ebx
call fcn.004a41bc
mov esi, dword [esp + 0x80]
push esi
push dword [esp + 0x60]
push ebx
call fcn.004a4193
push dword [esp + 0x74]
call fcn.004b315e
mov edx, dword [ebx + 0x44]
add esp, 0x40
mov dword [esp + 0x4c], edx
mov dword [esp + 0x84], edx
lea eax, [edx + 1]
push ebx
mov dword [ebx + 0x44], eax
call fcn.0049d1d0
push esi
push eax
push edx
push 0x2c
push edi
mov dword [esp + 0x7c], eax
call fcn.004a941e
push dword [esp + 0x6c]
push dword [esp + 0x9c]
push 0x46
push edi
call fcn.004a9403
push ebx
mov byte [esp + 0xa9], 1
call fcn.0049992b
add esp, 0x2c
mov eax, dword [edi + 0x1c]
push ebx
mov dword [esp + 0x54], eax
call fcn.0049992b
pop ecx
mov ecx, dword [esp + 0x60]
test ecx, ecx
je 0x4a5d2c
push dword [esp + 0x64]
push dword [esp + 0x84]
push 0x3e
push edi
call fcn.004a9403
mov ecx, dword [esp + 0x70]
add esp, 0x10
mov eax, dword [esp + 0x48]
mov esi, ebp
cmp dword [eax], ebp
jle 0x4a5d8d
mov ebp, eax
mov eax, dword [esp + 0x28]
add eax, esi
push eax
test ecx, ecx
je 0x4a5d63
push esi
push dword [esp + 0x54]
push 0x1d
push edi
call fcn.004a941e
add esp, 0x14
test esi, esi
jne 0x4a5d7d
push 0x20
push edi
call fcn.004a97c6
pop ecx
pop ecx
jmp 0x4a5d7d
imul ecx, esi, 0x14
mov byte [esp + 0x80], 1
mov eax, dword [ebp + 0xc]
push dword [ecx + eax]
push ebx
call fcn.00499a6f
add esp, 0xc
mov ecx, dword [esp + 0x60]
inc esi
cmp esi, dword [ebp]
jl 0x4a5d38
mov eax, dword [esp + 0x48]
xor ebp, ebp
push 0xfffffffffffffffa
push dword [esp + 0xb0]
push dword [eax]
push dword [esp + 0x34]
push dword [esp + 0x78]
push 0x18
push edi
call fcn.004a946f
mov esi, dword [edi + 0x1c]
lea eax, [esi + 1]
push eax
push ebp
push eax
push 0x19
push edi
call fcn.004a941e
mov eax, dword [esp + 0x78]
push dword [eax]
push dword [esp + 0x9c]
push dword [esp + 0x60]
push ebx
call fcn.00499e04
mov eax, dword [esp + 0x7c]
add esp, 0x40
inc eax
push dword [esp + 0x74]
push eax
push 2
push edi
call fcn.004a9403
push dword [esp + 0x64]
push dword [esp + 0x50]
push 0x78
push edi
call fcn.004a9403
push dword [esp + 0x7c]
push dword [esp + 0x44]
push 2
push edi
call fcn.004a9403
push esi
push edi
call fcn.004af419
lea eax, [esp + 0xb4]
push eax
push ebx
call fcn.004b449d
add esp, 0x40
push dword [esp + 0x70]
push 1
push 7
push edi
call fcn.004a9403
add esp, 0x10
cmp dword [esp + 0x60], 0
je 0x4a5e4d
push dword [esp + 0x50]
push dword [esp + 0x84]
push 0x51
push edi
call fcn.004a9403
add esp, 0x10
jmp 0x4a5e66
push dword [esp + 0x38]
call fcn.004b315e
push dword [esp + 0xb8]
push edi
call fcn.004a97de
add esp, 0xc
mov esi, dword [esp + 0x3c]
push dword [esp + 0x74]
lea eax, [esi + 1]
push eax
push 2
push edi
call fcn.004a9403
push dword [esp + 0x64]
push ebp
push 1
push edi
call fcn.004a9403
mov edi, dword [edi + 0x1c]
push esi
mov esi, dword [esp + 0x48]
push 1
push 7
push esi
call fcn.004a9403
mov eax, dword [esp + 0x6c]
inc eax
push eax
push 3
push esi
call fcn.004a93ea
push dword [esp + 0xb0]
push esi
call fcn.004b0b7e
mov esi, dword [esi + 0x1c]
add esp, 0x44
lea eax, [esi + 2]
push eax
push dword [esp + 0x74]
push 0x78
push dword [esp + 0x30]
call fcn.004a9403
mov eax, dword [esp + 0x4c]
inc eax
push eax
push 3
push dword [esp + 0x3c]
call fcn.004a93ea
lea eax, [esp + 0x98]
push eax
push ebx
call fcn.00486faa
mov edx, dword [esp + 0x58]
inc esi
push 8
push esi
push edx
push ebx
call fcn.0049abe9
push edi
push esi
push dword [esp + 0x58]
mov esi, dword [esp + 0x98]
push dword [esp + 0x84]
push dword [esp + 0x84]
push ebp
push ebp
push dword [esi]
push esi
push ebx
call fcn.00491ea8
mov eax, dword [esp + 0x98]
add esp, 0x5c
mov edi, dword [esp + 0x24]
inc eax
push eax
push 3
push edi
call fcn.004a93ea
push dword [esp + 0x68]
push edi
call fcn.004b0b7e
lea eax, [esp + 0x90]
push eax
push ebx
call fcn.004905c6
push dword [esp + 0x3c]
push 3
push edi
call fcn.004a93ea
add esp, 0x28
jmp 0x4a61b3
mov edi, eax
lea eax, [esp + 0x7c]
push eax
push esi
mov dword [esp + 0x64], edi
call fcn.0048a5b8
mov dword [esp + 0x60], eax
pop ecx
pop ecx
test eax, eax
je 0x4a608b
push dword [eax + 0x44]
push dword [ebx]
call fcn.004a4ffd
mov ecx, eax
xor ebp, ebp
mov eax, dword [ebx + 0x44]
mov edi, ebp
mov dword [esp + 0x28], eax
inc eax
mov dword [ebx + 0x44], eax
mov eax, dword [esp + 0x60]
push ecx
push ebx
mov dword [esp + 0x48], ecx
mov eax, dword [eax + 0x14]
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], eax
call fcn.0049714a
mov eax, dword [esp + 0x68]
push dword [eax]
push ebp
push dword [eax + 0x14]
push dword [esp + 0x54]
push ebx
call fcn.004a7229
mov ecx, dword [esp + 0x7c]
add esp, 0x24
mov edx, dword [ecx + 0x10]
test edx, edx
je 0x4a601e
cmp byte [edx + 0x1a], 0
jne 0x4a5ff3
test edi, edi
je 0x4a5ff1
mov eax, dword [edx + 4]
cmp eax, dword [edi + 4]
jge 0x4a5ff3
mov edi, edx
mov edx, dword [edx + 0x20]
test edx, edx
jne 0x4a5fdf
mov dword [esp + 0x64], edi
test edi, edi
je 0x4a601e
mov eax, dword [edi + 4]
cmp eax, dword [ecx + 8]
jge 0x4a601e
mov eax, dword [edi + 0x14]
push edi
push ebx
mov dword [esp + 0x70], eax
call fcn.0049de24
pop ecx
pop ecx
mov dword [esp + 0x4c], eax
push dword [esp + 0x38]
mov edi, dword [esp + 0x28]
push dword [esp + 0x6c]
push dword [esp + 0x28]
push 0x27
push edi
call fcn.004a941e
mov eax, dword [esp + 0x60]
add esp, 0x14
test eax, eax
je 0x4a604f
push 0xfffffffffffffff0
push eax
push 0xffffffffffffffff
push edi
call fcn.004a967f
add esp, 0x10
mov eax, dword [esp + 0xa0]
push dword [eax + 8]
push dword [esp + 0x24]
push 0x20
push edi
call fcn.004a9403
push dword [esp + 0x30]
push 0x2d
push edi
call fcn.004a93ea
push dword [esp + 0x80]
mov eax, dword [esp + 0x78]
push eax
push ebx
call fcn.00485c04
add esp, 0x28
jmp 0x4a6172
xor ebp, ebp
push esi
mov dword [esp + 0x24], ebp
call fcn.0048b5d4
mov byte [esp + 0x1b], al
pop ecx
test al, al
je 0x4a60e5
mov eax, dword [esi]
push ebp
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
push dword [eax + 0x10]
push dword [esp + 0x38]
call fcn.0049b21f
mov edi, eax
add esp, 0xc
mov dword [esp + 0x5c], edi
mov dword [esp + 0x20], edi
test edi, edi
je 0x4a60e5
mov eax, dword [esp + 0x30]
cmp byte [eax + 0x1e], 0
jne 0x4a60e5
mov eax, dword [edi + 0xc]
cmp byte [esp + 0x17], 1
setne cl
mov byte [eax + 0xc], cl
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
mov byte [eax], 0x98
lea eax, [esp + 0x7c]
push eax
push ebx
call fcn.004905c6
mov al, byte [esp + 0x1f]
movzx eax, al
push eax
push ebp
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x64]
push dword [esp + 0x28]
push ebx
call fcn.004b281f
add esp, 0x20
mov dword [esp + 0x38], eax
test eax, eax
jne 0x4a6127
push edi
mov edi, dword [esp + 0x34]
push edi
call fcn.0049b1c9
jmp 0x4a554f
lea eax, [esp + 0x7c]
push eax
push ebx
call fcn.004b449d
mov edi, dword [esp + 0x2c]
pop ecx
pop ecx
cmp dword [esp + 0x20], ebp
jne 0x4a6158
cmp byte [esp + 0x17], 0
je 0x4a6158
mov eax, dword [esp + 0x38]
push dword [eax + 0x18]
push ebp
push 1
push edi
call fcn.004a9403
add esp, 0x10
push dword [esp + 0x38]
call fcn.004b315e
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.00486faa
add esp, 0xc
mov edx, dword [esp + 0x34]
push 8
mov dword [esp + 0x44], ebp
mov ebp, dword [esp + 0x58]
push ebp
push edx
push ebx
call fcn.0049abe9
push ebp
push ebp
push dword [esp + 0x34]
xor eax, eax
push 0xffffffffffffffff
push eax
push eax
push eax
push dword [esi]
push esi
push ebx
call fcn.00491ea8
push dword [esp + 0x94]
push dword [esp + 0x6c]
call fcn.0049b1c9
add esp, 0x40
xor ebp, ebp
push dword [esp + 0x54]
push edi
call fcn.004b0b7e
pop ecx
pop ecx
cmp dword [esp + 0x44], 0
jl 0x4a61d3
push str.DISTINCT
push ebx
call fcn.00485c67
pop ecx
pop ecx
cmp dword [esp + 0x40], 0
je 0x4a61fa
push str.ORDER_BY
push ebx
call fcn.00485c67
push dword [esp + 0x24]
mov eax, dword [esp + 0x24]
push dword [eax]
push edi
push esi
push ebx
call fcn.00488e18
add esp, 0x1c
push dword [esp + 0xb0]
push edi
call fcn.004b0b7e
mov edi, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
pop ecx
pop ecx
mov ecx, ebp
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x60], ecx
jmp 0x4a623c
mov edi, eax
jmp 0x4a5551
mov ebp, dword [esp + 0x1c]
xor ecx, ecx
inc ecx
jmp 0x4a6240
mov ebp, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
xor ecx, ecx
inc ecx
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x78]
mov dword [ebx + 0x228], esi
test ecx, ecx
jne 0x4a625f
cmp byte [ebp], 5
jne 0x4a625f
push edx
push eax
push ebx
call fcn.0048898a
add esp, 0xc
push dword [esp + 0x90]
push edi
call fcn.00498232
push dword [esp + 0xa8]
push edi
call fcn.00498232
mov eax, dword [esp + 0x70]
add esp, 0x10
jmp 0x4a6284
mov eax, ecx
mov ecx, dword [esp + 0xec]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b9a6c
add esp, 0xe0
ret