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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, edx
mov dword [esp + 0x38], eax
mov ebx, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], 0
cmp dword [edi + 0x44], 0
mov eax, dword [edi + 0x20]
mov esi, dword [ebx + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x1c]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
je 0x47ceaf
push str.cannot_use_window_functions_in_recursive_queries
push ebx
call fcn.00407e90
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004bf1a3
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
mov ecx, dword [eax + 0x168]
test ecx, ecx
je 0x47cf32
cmp byte [eax + 0xb1], 0
jne 0x47cf32
cmp byte [ebx + 0xcc], 0
jne 0x47cf32
push dword [ebx + 0xf4]
push 0
push 0
push 0
push 0x21
push dword [eax + 0x16c]
call ecx
add esp, 0x18
mov dword [esp + 0x30], eax
cmp eax, 1
jne 0x47cf07
push str.not_authorized
push ebx
call fcn.00407e90
mov eax, dword [esp + 0x38]
mov dword [ebx + 0xc], 0x17
jmp 0x47cf27
test eax, eax
je 0x47cf32
cmp eax, 2
je 0x47cf2a
push str.authorizer_malfunction
push ebx
call fcn.00407e90
mov dword [ebx + 0xc], 1
mov eax, 1
add esp, 8
test eax, eax
jne 0x47d629
dec dword [ebx + 0x38]
mov ecx, 0x140
mov eax, dword [ebx + 0x38]
mov edx, edi
mov word [edi + 2], cx
mov ecx, ebx
push eax
mov dword [esp + 0x2c], eax
call fcn.0047c980
mov eax, dword [edi + 0x3c]
add esp, 4
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x30]
mov dword [edi + 0x3c], 0
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov edx, dword [ecx]
mov dword [esp + 0x20], eax
xor eax, eax
test edx, edx
jle 0x47cfb0
add ecx, 0x30
test byte [ecx], 0x20
jne 0x47cfa1
inc eax
add ecx, 0x48
cmp eax, edx
jl 0x47cf92
jmp 0x47cfb0
mov ecx, dword [esp + 0x1c]
lea eax, [eax + eax*8]
mov eax, dword [ecx + eax*8 + 0x34]
mov dword [esp + 0x24], eax
mov edx, dword [ebx + 0x28]
mov dword [esp + 0xc], edx
lea eax, [edx + 1]
mov dword [ebx + 0x28], eax
cmp byte [edi], 0x85
jne 0x47cfd8
xor ecx, ecx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x20], ecx
setne cl
add ecx, 5
inc eax
mov dword [ebx + 0x28], eax
jmp 0x47cfe3
mov ecx, dword [esp + 0x20]
neg ecx
sbb ecx, ecx
add ecx, 8
inc dword [ebx + 0x2c]
mov eax, dword [ebx + 0x2c]
mov byte [esp + 0x40], cl
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x2c], eax
cmp dword [esi + 0x78], ecx
jg 0x47d03b
push dword [esp + 0x10]
mov edx, 0x77
mov ecx, esi
push eax
push dword [esp + 0x2c]
call fcn.0042a9a0
mov edx, dword [esp + 0x18]
add esp, 0xc
jmp 0x47d072
mov edi, dword [esp + 0x24]
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], edi
mov edi, dword [esp + 0x2c]
mov dword [eax + ecx*4 + 8], edi
mov edi, dword [esp + 0x10]
mov dword [eax + ecx*4 + 0xc], edi
mov edi, dword [esp + 0x14]
mov dword [eax + ecx*4], 0x77
mov dword [eax + ecx*4 + 0x10], 0
cmp dword [esp + 0x20], 0
je 0x47d167
push ecx
mov edx, edi
mov ecx, ebx
call fcn.0047cce0
mov edx, dword [esi + 0x74]
add esp, 4
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
add eax, 2
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x78], edx
jg 0x47d0bd
push 0
push eax
push dword [esp + 0x14]
mov edx, 0x73
mov ecx, esi
call fcn.0042a9a0
add esp, 0xc
mov edx, eax
jmp 0x47d0f4
mov edi, dword [esp + 0xc]
lea eax, [edx + 1]
mov dword [esi + 0x74], eax
lea ecx, [edx + edx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edi
mov edi, dword [esp + 0x1c]
mov dword [eax + ecx*4 + 8], edi
mov edi, dword [esp + 0x14]
mov dword [eax + ecx*4], 0x73
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esi]
cmp byte [eax + 0x53], 0
je 0x47d11d
mov ecx, dword [esp + 0x10]
mov edx, 0xfffffff7
push ecx
mov ecx, eax
call fcn.0042b470
mov eax, dword [esp + 0x24]
add esp, 4
mov dword [esp + 0x58], eax
jmp 0x47d1ba
test edx, edx
jns 0x47d125
mov edx, dword [esi + 0x74]
dec edx
mov eax, dword [esi + 0x70]
lea ecx, [edx + edx*4]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x10]
je 0x47d152
push 0xfffffffffffffff7
push ecx
mov edx, eax
mov ecx, esi
call fcn.0042b6e0
mov eax, dword [esp + 0x28]
add esp, 8
mov dword [esp + 0x58], eax
jmp 0x47d1ba
test ecx, ecx
je 0x47d15d
mov dword [eax + 0x10], ecx
mov byte [eax + 1], 0xf7
mov eax, dword [esp + 0x20]
mov dword [esp + 0x58], eax
jmp 0x47d1ba
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x47d187
push 0
push dword [esp + 0x14]
mov ecx, esi
push edx
mov edx, 0x73
call fcn.0042a9a0
add esp, 0xc
jmp 0x47d1ba
mov edi, dword [esp + 0x14]
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 + 0x10]
mov dword [eax + ecx*4], 0x73
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x47d220
mov edx, dword [esi + 0x74]
cmp dword [esi + 0x78], edx
jg 0x47d1e2
push 0
push 0
push eax
mov edx, 0x73
mov ecx, esi
call fcn.0042a9a0
add esp, 0xc
mov edx, eax
jmp 0x47d219
mov edi, dword [esp + 0x18]
lea eax, [edx + 1]
mov dword [esi + 0x74], eax
lea ecx, [edx + edx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4 + 4], edi
mov edi, dword [esp + 0x14]
mov dword [eax + ecx*4], 0x73
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
or dword [edi + 4], 0x20
mov dword [edi + 0x14], edx
mov dword [edi + 0x30], 0
nop word [eax + eax]
test byte [edi + 4], 8
jne 0x47d5fb
mov eax, dword [edi + 0x34]
mov byte [edi], 0x86
test dword [eax + 4], 0x2000
je 0x47d24f
mov edi, eax
test edi, edi
jne 0x47d230
mov eax, dword [edi + 0x34]
push str.SETUP
push 1
push ebx
mov dword [esp + 0x1c], eax
mov dword [eax + 0x38], 0
call fcn.0042af20
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x4c]
add esp, 0xc
mov ecx, ebx
push eax
call fcn.00483630
mov edx, dword [esp + 0x14]
add esp, 4
mov ecx, dword [esp + 0x14]
mov dword [edx + 0x38], ecx
test eax, eax
jne 0x47d609
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x1c], ecx
cmp dword [esi + 0x78], ecx
jg 0x47d2bc
mov edx, dword [esp + 0x28]
mov ecx, esi
push eax
push edx
push dword [esp + 0x14]
lea edx, [eax + 0x26]
call fcn.0042a9a0
add esp, 0xc
mov dword [esp + 0x1c], eax
jmp 0x47d2ef
mov edx, dword [esp + 0xc]
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 + 0x28]
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 0x47d310
push 0
push 0
push dword [esp + 0x2c]
mov edx, 0x86
mov ecx, esi
call fcn.0042a9a0
add esp, 0xc
jmp 0x47d343
mov edx, dword [esp + 0x24]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x86
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 + 0x20]
mov ecx, dword [esi + 0x74]
test eax, eax
je 0x47d3a4
mov eax, dword [eax]
inc eax
mov dword [esp + 0x18], eax
cmp dword [esi + 0x78], ecx
jg 0x47d377
push dword [esp + 0x2c]
mov edx, 0x5c
mov ecx, esi
push eax
push dword [esp + 0x14]
call fcn.0042a9a0
add esp, 0xc
jmp 0x47d3f7
mov edx, dword [esp + 0xc]
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 + 0x18]
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x2c]
mov dword [eax + ecx*4], 0x5c
mov dword [eax + ecx*4 + 0xc], edx
jmp 0x47d3ef
cmp dword [esi + 0x78], ecx
jg 0x47d3c4
push 0
push dword [esp + 0x30]
mov edx, 0x84
mov ecx, esi
push dword [esp + 0x14]
call fcn.0042a9a0
add esp, 0xc
jmp 0x47d3f7
mov edx, dword [esp + 0xc]
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 + 0x2c]
mov dword [eax + ecx*4], 0x84
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]
mov edx, dword [esp + 0xc]
cmp dword [esi + 0x78], ecx
jg 0x47d419
push 0
push 0
push edx
mov edx, 0x80
mov ecx, esi
call fcn.0042a9a0
add esp, 0xc
jmp 0x47d44c
mov edx, dword [esp + 0xc]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x70]
mov dword [eax + ecx*4], 0x80
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 edx, dword [ebx + 0x38]
mov eax, dword [esp + 0x34]
dec edx
mov dword [esp + 0x18], edx
mov dword [ebx + 0x38], edx
test eax, eax
jle 0x47d4b3
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x47d480
push 1
push edx
push eax
mov edx, 0x31
mov ecx, esi
call fcn.0042a9a0
mov edx, dword [esp + 0x24]
add esp, 0xc
jmp 0x47d4b3
mov edx, dword [esp + 0x34]
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 + 0x18]
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 + 0x28]
mov ecx, ebx
push edx
push dword [esp + 0x40]
mov edx, dword [esp + 0x20]
push 0
push 0
push dword [esp + 0x38]
call fcn.00479da0
mov edx, dword [esp + 0x48]
add esp, 0x18
test edx, edx
je 0x47d529
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x47d4fa
push 0
push dword [esp + 0x2c]
mov ecx, esi
push edx
mov edx, 0x3c
call fcn.0042a9a0
add esp, 0xc
jmp 0x47d529
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 + 0x28]
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 + 0x18]
not edx
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x47d547
push edx
mov edx, esi
call fcn.0042b160
add esp, 4
jmp 0x47d550
mov ecx, dword [ecx + 0x40]
mov eax, dword [esi + 0x74]
mov dword [ecx + edx*4], eax
push str.RECURSIVE_STEP
push 1
push ebx
mov dword [edi + 0x34], 0
call fcn.0042af20
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x4c]
add esp, 0xc
mov ecx, ebx
push eax
call fcn.00483630
mov eax, dword [esp + 0x14]
add esp, 4
mov edx, dword [esp + 0x1c]
mov dword [edi + 0x34], eax
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x47d5a3
push 0
push edx
push 0
mov edx, 0xb
mov ecx, esi
call fcn.0042a9a0
add esp, 0xc
jmp 0x47d5d2
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 + 0x28]
not edx
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x47d5f0
push edx
mov edx, esi
call fcn.0042b160
add esp, 4
jmp 0x47d609
mov ecx, dword [ecx + 0x40]
mov eax, dword [esi + 0x74]
mov dword [ecx + edx*4], eax
jmp 0x47d609
push str.recursive_aggregate_queries_not_supported
push ebx
call fcn.00407e90
add esp, 8
mov esi, dword [esp + 0x14]
mov edx, dword [esi + 0x30]
test edx, edx
je 0x47d61b
mov ecx, dword [ebx]
call fcn.00444910
mov eax, dword [esp + 0x20]
mov dword [esi + 0x30], eax
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x3c], eax
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004bf1a3
mov esp, ebp
pop ebp
ret