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

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, dword [esp + 0x44]
xor ebx, ebx
push edi
cmp esi, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
je 0x4a6153
mov eax, dword [esi + 0x1c]
cmp eax, ebx
mov dword [esp + 0x48], eax
je 0x4a6153
cmp dword [eax + 0x18], ebx
je 0x4a59ba
xor eax, eax
mov al, byte [esi + 4]
push eax
call fcn.004a6180
mov ecx, dword [esp + 0x48]
push eax
push str.ORDER_BY_clause_should_come_after__s_not_before
push ecx
call fcn.0048bd80
add esp, 0x10
mov ebx, 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a59a9
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00497510
add esp, 4
mov dword [esi + 0x30], 0
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x30
ret
cmp dword [eax + 0x20], ebx
je 0x4a59d7
xor edx, edx
mov dl, byte [esi + 4]
push edx
call fcn.004a6180
push eax
mov eax, dword [esp + 0x4c]
push str.LIMIT_clause_should_come_after__s_not_before
push eax
jmp 0x4a5987
mov ebp, dword [esp + 0x44]
push ebp
call fcn.004a41f0
mov edi, eax
add esp, 4
test edi, edi
je 0x4a598f
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x4a59f8
lea ecx, [esp + 0x10]
mov dword [esi + 0x30], ecx
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esi + 0x30]
cmp ecx, 8
mov dword [eax + 0x30], edx
jne 0x4a5a44
mov ecx, dword [esp + 0x50]
push 0
push ecx
push 0x79
push edi
call fcn.004918a0
mov edx, dword [esp + 0x60]
push 0
push edx
push 0x6a
push edi
call fcn.004918a0
mov dword [esp + 0x6c], 7
add esp, 0x20
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], 1
mov al, byte [esi + 4]
mov edx, eax
and edx, 0xff
add edx, 0xffffff91
cmp edx, 3
ja case.default.0x4a5a5b
jmp dword [edx*4 + 0x4a6164]
mov edx, dword [esi + 0x18]
test edx, edx
jne case.0x4a5a5b.111
mov eax, dword [esp + 0x48]
mov edx, dword [esi + 0x20]
mov dword [eax + 0x20], edx
mov edx, dword [esi + 0x24]
mov dword [eax + 0x24], edx
mov edx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x54]
push 0
push 0
push 0
push edx
push ecx
push eax
push ebp
call fcn.004a44d0
mov ebx, eax
xor ecx, ecx
add esp, 0x20
cmp ebx, ecx
jne 0x4a5994
mov eax, dword [esp + 0x48]
mov dword [esi + 0x1c], ecx
mov edx, dword [eax + 0x28]
mov dword [esi + 0x28], edx
mov edx, dword [esp + 0x54]
mov eax, dword [eax + 0x2c]
push edx
push ecx
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x58]
push ecx
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], ecx
push ecx
mov ecx, dword [esp + 0x5c]
push eax
push ecx
push esi
push ebp
call fcn.004a44d0
mov edx, dword [esp + 0x68]
mov ebx, eax
add esp, 0x20
mov dword [esi + 0x1c], edx
test ebx, ebx
jne 0x4a5994
jmp case.default.0x4a5a5b
sub al, 0x70
mov dword [esp + 0x18], 0
neg al
sbb eax, eax
and al, 0xfe
add eax, 7
cmp ecx, eax
mov dword [esp + 0x1c], eax
jne 0x4a5b29
mov ecx, dword [esi + 0x18]
test ecx, ecx
jne 0x4a5b29
mov ecx, dword [esi + 0x20]
test ecx, ecx
jne 0x4a5b29
mov ecx, dword [esi + 0x24]
test ecx, ecx
jne 0x4a5b29
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x44], ecx
jmp 0x4a5ba0
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x44], ebx
lea edx, [ebx + 1]
mov dword [ebp + 0x1c], edx
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4a5b53
push 1
push ebx
push eax
push esi
push ebp
call fcn.004a61b0
add esp, 0x14
test eax, eax
jne 0x4a598f
push 0
push ebx
push 0x79
push edi
call fcn.004918a0
mov cl, byte [esi + 4]
add esp, 0x10
cmp cl, 0x70
je 0x4a5b81
push eax
push esi
call fcn.004a6420
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4a5994
mov ebx, dword [esp + 0x44]
push 0
push ebx
push 0x6a
push edi
call fcn.004918a0
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov dword [esp + ecx*4 + 0x2c], eax
mov eax, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x44]
push ecx
push 0
push 0
push 0
push edx
push eax
mov eax, dword [esp + 0x60]
push eax
push ebp
call fcn.004a44d0
mov ebx, eax
add esp, 0x20
test ebx, ebx
jne 0x4a5994
mov al, byte [esi + 4]
sub eax, 0x6f
je 0x4a5bed
dec eax
je 0x4a5be3
sub eax, 2
jne 0x4a5bf5
mov dword [esp + 0x18], 6
jmp 0x4a5bf5
mov dword [esp + 0x18], 7
jmp 0x4a5bf5
mov dword [esp + 0x18], 5
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x54]
xor eax, eax
push edx
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0x24]
push eax
push eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
push eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x28]
push eax
push ecx
push esi
push ebp
call fcn.004a44d0
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x68]
mov ebx, eax
mov eax, dword [esp + 0x40]
push ecx
mov dword [esi + 0x1c], edx
mov dword [esi + 0x18], eax
call fcn.004a7180
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov dword [esi + 0x24], eax
add esp, 0x24
or eax, 0xffffffff
mov dword [esi + 0x20], edx
test ebx, ebx
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
jne 0x4a5994
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x1c]
cmp ecx, eax
jne 0x4a5c88
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x44]
cmp eax, edx
je case.default.0x4a5a5b
cmp dword [esp + 0x4c], 1
jne 0x4a5c9d
mov eax, dword [esi]
push eax
push 0
push ebp
call fcn.004a5510
add esp, 0xc
push edi
call fcn.004919c0
mov ebx, eax
push edi
mov dword [esp + 0x2c], ebx
call fcn.004919c0
mov ecx, dword [esp + 0x4c]
push ebx
push ecx
push 0x7e
push edi
mov dword [esp + 0x6c], eax
call fcn.004918a0
push esi
push ebp
call fcn.004a57c0
push edi
call fcn.00491a30
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
push 0
push ebx
push edx
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x58], eax
mov eax, dword [esi]
push ecx
mov ecx, dword [esi + 0x18]
push edx
mov edx, dword [eax]
push 0xffffffffffffffff
push ecx
mov ecx, dword [esp + 0x84]
push edx
push ecx
push eax
push esi
push ebp
call fcn.004a4dd0
mov ebx, eax
add esp, 0x54
test ebx, ebx
jne 0x4a598f
mov edx, dword [esp + 0x54]
push edx
push edi
call fcn.00491a10
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x4c]
push eax
push ecx
push 0x6f
push edi
call fcn.004918a0
mov edx, dword [esp + 0x3c]
push edx
push edi
call fcn.00491a10
mov eax, dword [esp + 0x64]
push ebx
push eax
push 0x1e
push edi
call fcn.004918a0
add esp, 0x30
jmp case.default.0x4a5a5b
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x44], ebx
lea ecx, [ebx + 2]
mov dword [ebp + 0x1c], ecx
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4a5d74
push 1
push ebx
push eax
push esi
push ebp
call fcn.004a61b0
add esp, 0x14
test eax, eax
jne 0x4a598f
push 0
push ebx
push 0x79
push edi
call fcn.004918a0
push eax
push esi
call fcn.004a6420
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4a5994
mov ebx, dword [esp + 0x44]
push eax
push ebx
push 0x6a
push edi
call fcn.004918a0
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x24]
push edx
push 0
push 0
mov dword [esp + ecx*4 + 0x48], eax
mov eax, dword [esp + 0x64]
push 0
push ebx
push 5
inc ecx
push eax
push ebp
mov dword [esp + 0x44], ecx
call fcn.004a44d0
mov ebx, eax
add esp, 0x30
test ebx, ebx
jne 0x4a5994
mov ecx, dword [esp + 0x44]
push eax
lea eax, [ecx + 1]
push eax
push 0x79
push edi
call fcn.004918a0
push eax
push esi
call fcn.004a6420
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4a5994
mov edx, dword [esp + 0x44]
push eax
lea ebx, [edx + 1]
push ebx
push 0x6a
push edi
call fcn.004918a0
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 0x24]
mov dword [esp + 0x34], edx
mov dword [esp + ecx*4 + 0x3c], eax
inc ecx
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x64]
xor eax, eax
push ecx
push eax
push eax
push eax
push ebx
push 5
push esi
push ebp
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
call fcn.004a44d0
mov edx, dword [esp + 0x78]
mov ebx, eax
mov eax, dword [esi + 0x20]
mov dword [esi + 0x1c], edx
push eax
call fcn.004a7180
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
add esp, 0x34
mov dword [esi + 0x20], ecx
test ebx, ebx
mov dword [esi + 0x24], edx
jne 0x4a5994
cmp dword [esp + 0x4c], 1
jne 0x4a5e81
mov eax, dword [esi]
push eax
push ebx
push ebp
call fcn.004a5510
add esp, 0xc
push edi
call fcn.004919c0
mov ebx, eax
push edi
mov dword [esp + 0x24], ebx
call fcn.004919c0
push ebx
mov ebx, dword [esp + 0x50]
push ebx
push 0x7e
push edi
mov dword [esp + 0x6c], eax
call fcn.004918a0
push esi
push ebp
call fcn.004a57c0
push 0
push ebx
push 7
push edi
call fcn.004918a0
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x58], eax
lea eax, [ebx + 1]
push ecx
push eax
push 0x22
push edi
call fcn.004918a0
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x94]
mov eax, dword [esi]
add esp, 0x40
push 0
push edx
mov edx, dword [esp + 0x58]
push ecx
mov ecx, dword [esp + 0x58]
push edx
mov edx, dword [esi + 0x18]
push ecx
mov ecx, dword [eax]
push 0xffffffffffffffff
push edx
push ecx
push ebx
push eax
push esi
push ebp
call fcn.004a4dd0
mov ebx, eax
add esp, 0x30
test ebx, ebx
jne 0x4a598f
mov edx, dword [esp + 0x54]
push edx
push edi
call fcn.00491a10
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x4c]
push eax
push ecx
push 0x6f
push edi
call fcn.004918a0
mov edx, dword [esp + 0x34]
push edx
push edi
call fcn.00491a10
mov eax, dword [esp + 0x64]
push ebx
inc eax
push eax
push 0x1e
push edi
call fcn.004918a0
mov ecx, dword [esp + 0x74]
push ebx
push ecx
push 0x1e
push edi
call fcn.004918a0
add esp, 0x40
mov edx, dword [esi]
mov eax, dword [esp + 0x48]
mov ecx, dword [edx]
mov edx, dword [eax]
mov dword [esp + 0x18], ecx
cmp ecx, dword [edx]
je 0x4a5f7d
xor eax, eax
mov al, byte [esi + 4]
push eax
call fcn.004a6180
push eax
push str.SELECTs_to_the_left_and_right_of__s_do_not_have_the_same_number_of_result_columns
push ebp
jmp 0x4a5987
mov edx, dword [esp + 0x14]
test edx, edx
jle 0x4a5fb6
lea eax, [esp + edx*4 + 0x2c]
mov dword [esp + 0x54], edx
jmp 0x4a5f93
mov eax, dword [esp + 0x44]
sub eax, 4
push ecx
mov dword [esp + 0x48], eax
mov ecx, dword [eax]
push ecx
push edi
call fcn.00491b20
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x24]
add esp, 0xc
dec eax
mov dword [esp + 0x54], eax
jne 0x4a5f8f
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x4a5fd2
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a59a9
cmp dword [eax], 0
jle 0x4a5994
lea edx, [ecx*4 + 0x10]
push edx
call fcn.0048bb00
add esp, 4
mov dword [esp + 0x44], eax
test eax, eax
jne 0x4a5ff4
mov ebx, 7
jmp 0x4a5994
mov ecx, dword [ebp]
mov dword [esp + 0x54], 0
mov dl, byte [ecx + 0x10]
mov ecx, dword [esp + 0x18]
test ecx, ecx
mov byte [eax], dl
mov dword [eax + 4], ecx
jle 0x4a6053
add eax, 0xc
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x54]
push eax
push esi
push ebp
call fcn.004a6460
mov ecx, dword [esp + 0x54]
add esp, 0xc
test eax, eax
mov dword [ecx], eax
jne 0x4a6037
mov edx, dword [ebp]
mov eax, dword [edx + 0x18]
mov dword [ecx], eax
mov eax, dword [esp + 0x54]
add ecx, 4
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x54], eax
jl 0x4a6016
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x10]
xor ecx, ecx
test edx, edx
mov dword [esp + 0x54], ecx
je 0x4a60a7
jmp 0x4a6067
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x10]
cmp ecx, dword [edx]
jge 0x4a60a7
mov edx, ecx
neg edx
sbb edx, edx
and edx, 3
add edx, 0xfffffff7
push edx
push eax
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 8]
mov eax, dword [edx + ecx*8 + 4]
push eax
push edi
call fcn.00491b50
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x20]
add esp, 0x10
inc ecx
test eax, eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x54], ecx
jne 0x4a6063
mov edx, dword [esi + 0x18]
test edx, edx
je 0x4a6139
mov ecx, dword [edx + 8]
cmp dword [edx], 0
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x54], 0
jle 0x4a611b
jmp 0x4a60cc
mov eax, dword [esp + 0x44]
mov edx, dword [ecx]
mov dword [esp + 0x48], edx
mov edx, dword [ecx + 4]
test edx, edx
je 0x4a60f2
push 0xffffffffffffffff
push edx
push ebp
call fcn.004958c0
mov ecx, dword [esp + 0x54]
add esp, 0xc
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x1c]
jmp 0x4a6104
mov edx, dword [esp + 0x48]
mov edx, dword [edx + 0x28]
mov eax, dword [eax + edx*4 + 0xc]
mov edx, dword [esp + 0x48]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x54]
mov edx, dword [esi + 0x18]
inc eax
add ecx, 0xc
cmp eax, dword [edx]
mov dword [esp + 0x54], eax
mov dword [esp + 0x1c], ecx
jl 0x4a60c8
mov eax, dword [esp + 0x50]
mov edx, dword [esi]
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [edx]
push ecx
push eax
push edi
push esi
push ebp
call fcn.004a5250
mov eax, dword [esp + 0x5c]
add esp, 0x18
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x4a599c
push eax
call fcn.0048bb80
add esp, 4
jmp 0x4a5994
mov dword [esi + 0x30], ebx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x30
ret