Function at 0x4c5e40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x44
push ebx
mov ebx, dword [esp + 0x50]
xor edx, edx
push ebp
mov ebp, dword [esp + 0x50]
push esi
mov eax, dword [ebx + 0x1c]
push edi
mov edi, dword [ebx + 0x20]
mov esi, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x28], edx
cmp dword [ebx + 0x44], edx
je 0x4c5e87
push str.cannot_use_window_functions_in_recursive_queries
push ebp
call fcn.004ebb90
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
push 0
push 0
push 0
push 0x21
push ebp
call fcn.004e03b0
add esp, 0x14
test eax, eax
jne 0x4c648e
dec dword [ebp + 0x38]
mov ecx, 0x140
mov eax, dword [ebp + 0x38]
push eax
push ebx
push ebp
mov dword [esp + 0x28], eax
mov word [ebx + 2], cx
call fcn.004aab20
mov eax, dword [ebx + 0x3c]
add esp, 0xc
mov ecx, dword [ebx + 0x30]
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 8], 0
mov edx, dword [edi]
mov dword [esp + 0x14], ecx
test edx, edx
jle 0x4c5f1e
lea ecx, [edi + 0x30]
lea ebx, [ebx]
test byte [ecx], 0x20
jne 0x4c5f0f
inc eax
add ecx, 0x48
cmp eax, edx
jl 0x4c5f00
jmp 0x4c5f1a
lea eax, [eax + eax*8]
mov eax, dword [edi + eax*8 + 0x34]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x14]
mov edi, dword [ebp + 0x28]
mov dword [esp + 0x10], edi
lea eax, [edi + 1]
mov dword [ebp + 0x28], eax
cmp byte [ebx], 0x86
jne 0x4c5f46
xor ecx, ecx
mov dword [esp + 0x28], eax
cmp dword [esp + 0x14], ecx
setne cl
add ecx, 5
inc eax
mov dword [ebp + 0x28], eax
jmp 0x4c5f4d
neg ecx
sbb ecx, ecx
add ecx, 8
inc dword [ebp + 0x2c]
mov edx, dword [ebp + 0x2c]
mov byte [esp + 0x38], cl
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x20], edx
cmp dword [esi + 0x78], ecx
jg 0x4c5fa1
push dword [esp + 0x24]
push edx
push dword [esp + 0x20]
push 0x78
push esi
call fcn.004c7840
mov edx, dword [esp + 0x38]
add esp, 0x14
jmp 0x4c5fd4
mov ebx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x24]
mov dword [eax + ecx*4 + 4], ebx
mov ebx, dword [esp + 0x5c]
mov dword [eax + ecx*4], 0x78
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
cmp dword [esp + 0x14], 0
je 0x4c6009
push 1
push ebx
push ebp
call fcn.004cfe20
push 0xfffffffffffffff7
push eax
mov eax, dword [esp + 0x28]
push 0
mov eax, dword [eax]
add eax, 2
push eax
push edi
push 0x74
push esi
call fcn.00512e00
mov eax, dword [esp + 0x3c]
add esp, 0x28
mov dword [esp + 0x50], eax
jmp 0x4c604d
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x4c6022
push 0
push edx
push edi
push 0x74
push esi
call fcn.004c7840
add esp, 0x14
jmp 0x4c604d
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x74
mov dword [eax + ecx*4 + 4], edi
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov edi, dword [esp + 0x28]
test edi, edi
je 0x4c60ab
mov edx, dword [esi + 0x74]
cmp dword [esi + 0x78], edx
jg 0x4c6071
push 0
push 0
push edi
push 0x74
push esi
call fcn.004c7840
add esp, 0x14
mov edx, eax
jmp 0x4c60a4
mov ebx, dword [esp + 0x5c]
lea eax, [edx + 1]
mov dword [esi + 0x74], eax
lea ecx, [edx + edx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x74
mov dword [eax + ecx*4 + 4], edi
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov dword [ebx + 0x14], edx
or dword [ebx + 4], 0x20
mov dword [ebx + 0x30], 0
mov edi, ebx
test byte [edi + 4], 8
jne 0x4c645f
mov eax, dword [edi + 0x34]
mov byte [edi], 0x87
test dword [eax + 4], 0x2000
je 0x4c60d3
mov edi, eax
test edi, edi
jne 0x4c60b4
mov eax, dword [edi + 0x34]
push str.SETUP
push 1
push ebp
mov dword [esp + 0x30], eax
mov dword [eax + 0x38], 0
call fcn.0051abd0
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
push ebp
call fcn.0050a130
mov ecx, dword [esp + 0x3c]
add esp, 0x18
mov dword [ecx + 0x38], ebx
test eax, eax
jne 0x4c646d
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x28], ecx
cmp dword [esi + 0x78], ecx
jg 0x4c6137
mov edx, dword [esp + 0x1c]
push eax
push edx
mov edx, dword [esp + 0x18]
push edx
push 0x26
push esi
call fcn.004c7840
add esp, 0x14
mov dword [esp + 0x28], eax
jmp 0x4c616a
mov edx, dword [esp + 0x10]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x1c]
mov dword [eax + ecx*4], 0x26
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x4c618a
push 0
push 0
push dword [esp + 0x20]
push 0x87
push esi
call fcn.004c7840
add esp, 0x14
jmp 0x4c61bd
mov edx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x87
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x74]
test eax, eax
je 0x4c621a
mov eax, dword [eax]
inc eax
mov dword [esp + 0x58], eax
cmp dword [esi + 0x78], ecx
jg 0x4c61f1
push dword [esp + 0x20]
push eax
push dword [esp + 0x18]
push 0x5d
push esi
call fcn.004c7840
mov edx, dword [esp + 0x24]
add esp, 0x14
jmp 0x4c6274
mov ebx, dword [esp + 0x58]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 8], ebx
mov ebx, dword [esp + 0x20]
mov dword [eax + ecx*4 + 0xc], ebx
mov ebx, dword [esp + 0x5c]
mov dword [eax + ecx*4], 0x5d
jmp 0x4c6264
cmp dword [esi + 0x78], ecx
jg 0x4c623d
push 0
push dword [esp + 0x24]
push dword [esp + 0x18]
push 0x85
push esi
call fcn.004c7840
mov edx, dword [esp + 0x24]
add esp, 0x14
jmp 0x4c6274
mov ebp, dword [esp + 0x20]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 8], ebp
mov ebp, dword [esp + 0x58]
mov dword [eax + ecx*4], 0x85
mov dword [eax + ecx*4 + 0xc], 0
mov edx, dword [esp + 0x10]
mov dword [eax + ecx*4 + 0x10], 0
mov dword [eax + ecx*4 + 4], edx
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x4c6291
push 0
push 0
push edx
push 0x81
push esi
call fcn.004c7840
add esp, 0x14
jmp 0x4c62c4
mov ebx, dword [esp + 0x5c]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x81
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
dec dword [ebp + 0x38]
mov eax, dword [esp + 0x2c]
mov edx, dword [ebp + 0x38]
mov dword [esp + 0x58], edx
test eax, eax
jle 0x4c6326
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x4c62f3
push 1
push edx
push eax
push 0x31
push esi
call fcn.004c7840
mov edx, dword [esp + 0x6c]
add esp, 0x14
jmp 0x4c6326
mov ebx, dword [esp + 0x2c]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], ebx
mov ebx, dword [esp + 0x5c]
mov dword [eax + ecx*4], 0x31
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 1
mov dword [eax + ecx*4 + 0x10], 0
push dword [esp + 0x1c]
push edx
push dword [esp + 0x68]
push 0
push 0
push dword [esp + 0x2c]
push ebx
push ebp
call fcn.004dc6d0
mov edx, dword [esp + 0x50]
add esp, 0x20
test edx, edx
je 0x4c6398
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x4c6365
push 0
push dword [esp + 0x20]
push edx
push 0x3c
push esi
call fcn.004c7840
add esp, 0x14
jmp 0x4c6398
mov ebx, dword [esp + 0x5c]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x1c]
mov dword [eax + ecx*4], 0x3c
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x58]
not edx
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x4c63b6
push edx
push esi
push ecx
call fcn.004d98e0
add esp, 0xc
jmp 0x4c63bf
mov ecx, dword [ecx + 0x40]
mov eax, dword [esi + 0x74]
mov dword [ecx + edx*4], eax
push str.RECURSIVE_STEP
push 1
push ebp
mov dword [edi + 0x34], 0
call fcn.0051abd0
lea eax, [esp + 0x44]
push eax
push ebx
push ebp
call fcn.0050a130
mov eax, dword [esp + 0x3c]
add esp, 0x18
mov edx, dword [esp + 0x28]
mov dword [edi + 0x34], eax
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x4c6407
push 0
push edx
push 0
push 0xb
push esi
call fcn.004c7840
add esp, 0x14
jmp 0x4c6436
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0xb
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x1c]
not edx
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x4c6454
push edx
push esi
push ecx
call fcn.004d98e0
add esp, 0xc
jmp 0x4c646d
mov ecx, dword [ecx + 0x40]
mov eax, dword [esi + 0x74]
mov dword [ecx + edx*4], eax
jmp 0x4c646d
push str.recursive_aggregate_queries_not_supported
push ebp
call fcn.004ebb90
add esp, 8
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x4c6480
push eax
push dword [ebp]
call fcn.004b0f30
add esp, 8
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x3c], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret