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

Disassembly:
sub esp, 0x70
mov ecx, dword [esp + 0x74]
xor eax, eax
push ebx
mov ebx, dword [esp + 0x7c]
push ebp
mov edx, dword [ecx]
mov ecx, 7
push esi
mov esi, dword [esp + 0x88]
push edi
lea edi, [esp + 0x2c]
mov dword [esp + 0x10], eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x84]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x1c], edx
mov ebp, dword [edi + 8]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ebp
test ebp, ebp
jne 0x4d5a88
cmp dword [edi + 0x74], ebp
jne 0x4d5a79
test byte [edx + 0x50], 8
jne 0x4d5a79
mov byte [edi + 0x17], 1
push edi
call fcn.0051ae50
add esp, 4
mov dword [esp + 0x14], eax
mov ebp, eax
cmp byte [esp + 0x2c], 0xc
jne 0x4d5aa8
mov eax, dword [ebx + 0x1c]
push dword [eax]
push dword [esp + 0x34]
push 0x74
push ebp
call fcn.0051a3d0
add esp, 0x10
mov byte [esp + 0x2c], 0xe
test dword [ebx + 4], 0x400
je 0x4d5ad4
lea eax, [esp + 0x2c]
push eax
push ebx
push edi
call fcn.004d75d0
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x10], ecx
test ecx, ecx
jns 0x4d6158
xor eax, eax
mov dword [esp + 0x10], eax
test dword [ebx + 4], 0x2000
je 0x4d5af0
mov eax, ebx
nop
test dword [eax + 4], 0x2000
je 0x4d5b0f
mov eax, dword [eax + 0x34]
test eax, eax
jne 0x4d5ae0
cmp dword [ebx + 0x30], 0
je 0x4d5b23
push dword [esp + 0x8c]
push ebx
push edi
call fcn.004d61f0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
lea eax, [esp + 0x2c]
push eax
push ebx
push edi
call fcn.004cd4d0
add esp, 0xc
jmp 0x4d601f
mov esi, dword [esp + 0x24]
cmp dword [esi + 0x34], 0
jne 0x4d5b4a
push str.COMPOUND_QUERY
push 1
push edi
call fcn.00522260
push str.LEFT_MOST_SUBQUERY
push 1
push edi
call fcn.00522260
add esp, 0x18
movzx eax, byte [ebx]
sub eax, 0x86
je 0x4d5e42
dec eax
je 0x4d5d32
dec eax
je 0x4d5e42
mov ecx, dword [edi + 0x28]
push 0
push ecx
push 0x74
lea eax, [ecx + 1]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], eax
inc eax
push ebp
mov dword [edi + 0x28], eax
call fcn.0051a3d0
push ebx
mov dword [ebx + 0x14], eax
call fcn.004b9ab0
or dword [eax + 4], 0x20
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x5c]
push eax
push esi
push edi
mov byte [esp + 0x68], 1
mov dword [esp + 0x70], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
call fcn.005117c0
mov ecx, eax
add esp, 0x20
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x4d6158
push eax
push dword [esp + 0x28]
push 0x74
push ebp
call fcn.0051a3d0
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x3c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x5c], eax
movzx eax, byte [ebx]
push eax
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x3c], 0
call fcn.005143d0
push eax
push str._s_USING_TEMP_B_TREE
push 1
push edi
call fcn.00522260
lea eax, [esp + 0x6c]
push eax
push ebx
push edi
call fcn.005117c0
mov dword [esp + 0x40], eax
add esp, 0x30
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x20], eax
mov dword [ebx + 0x34], esi
movzx eax, word [esi + 2]
cmp word [ebx + 2], ax
jle 0x4d5c49
mov word [ebx + 2], ax
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4d5c5d
push eax
push dword [esp + 0x20]
call fcn.004f6c70
add esp, 8
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x3c], eax
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4d6010
mov ebp, dword [edi + 0x38]
dec ebp
push ebp
push dword [esp + 0x8c]
lea ebx, [ebp - 1]
push edi
mov dword [edi + 0x38], ebx
call fcn.004b21b0
mov edi, dword [esp + 0x20]
push ebp
push dword [esp + 0x28]
push 0x26
push edi
call fcn.0051a3d0
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.00502e10
mov esi, eax
push esi
push dword [esp + 0x3c]
push 0x85
push edi
call fcn.0051a3d0
push 0
push esi
push ebx
push dword [esp + 0x60]
mov edi, eax
push 0x1e
push dword [esp + 0x58]
call fcn.0051a560
add esp, 0x48
push esi
mov esi, dword [esp + 0x88]
push esi
call fcn.0050fab0
push ebp
push ebx
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push dword [esp + 0x34]
push dword [esp + 0xa8]
push esi
call fcn.004e3d60
push ebx
mov ebx, dword [esp + 0x40]
push ebx
call fcn.00525570
mov esi, dword [esp + 0x48]
push edi
push esi
push 5
push ebx
call fcn.0051a3d0
add esp, 0x40
push ebp
mov ebp, ebx
push ebp
call fcn.00525570
push 0
lea eax, [esi + 1]
push eax
push 0x79
push ebp
call fcn.0051a3d0
jmp 0x4d5ff4
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 8]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [ebx + 0x3c]
mov dword [esi + 0x3c], eax
lea eax, [esp + 0x2c]
push eax
push esi
push edi
call fcn.005117c0
mov ecx, eax
mov dword [esi + 0x3c], 0
add esp, 0xc
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x4d6158
mov dword [ebx + 0x34], eax
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [esi + 0xc]
mov dword [ebx + 0xc], eax
test ecx, ecx
je 0x4d5db0
push ecx
push 0x14
push ebp
call fcn.0051a370
mov ecx, dword [ebx + 0xc]
add esp, 0xc
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x4d5db0
push ecx
inc ecx
push ecx
push dword [ebx + 8]
push 0x9f
push ebp
call fcn.0051a430
add esp, 0x14
push str.UNION_ALL
push 1
push edi
call fcn.00522260
lea eax, [esp + 0x38]
push eax
push ebx
push edi
call fcn.005117c0
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x38], eax
mov dword [ebx + 0x34], esi
movzx eax, word [esi + 2]
push eax
movzx eax, word [ebx + 2]
push eax
call fcn.00507580
mov ecx, dword [ebx + 0x3c]
add esp, 0x20
mov si, ax
mov word [ebx + 2], si
test ecx, ecx
je 0x4d5e27
lea eax, [esp + 0x18]
push eax
push dword [ecx + 0xc]
call fcn.004f7a00
add esp, 8
test eax, eax
je 0x4d5e27
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4d5e27
cdq
push edx
push eax
call fcn.005074e0
add esp, 8
cmp si, ax
jle 0x4d5e27
mov word [ebx + 2], ax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4d6010
push eax
push ebp
call fcn.00522e50
add esp, 8
jmp 0x4d6010
cmp byte [esp + 0x2c], 1
jne 0x4d5e53
mov edi, dword [esp + 0x30]
mov dword [esp + 0x18], edi
jmp 0x4d5e82
mov edi, dword [edi + 0x28]
mov ecx, dword [esp + 0x84]
push 0
push edi
lea eax, [edi + 1]
mov dword [esp + 0x20], edi
push 0x74
push ebp
mov dword [ecx + 0x28], eax
call fcn.0051a3d0
push ebx
mov dword [ebx + 0x14], eax
call fcn.004b9ab0
add esp, 0x14
or dword [eax + 4], 0x20
lea eax, [esp + 0x64]
mov dword [esp + 0x68], edi
mov edi, dword [esp + 0x84]
push eax
push esi
push edi
mov byte [esp + 0x70], 1
mov dword [esp + 0x78], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
call fcn.005117c0
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x4d6158
cmp byte [ebx], 0x88
mov edx, dword [ebx + 0x3c]
sete al
mov dword [ebx + 0x34], ecx
inc al
mov dword [esp + 0x28], edx
mov byte [esp + 0x64], al
movzx eax, byte [ebx]
push eax
mov dword [ebx + 0x3c], ecx
call fcn.005143d0
push eax
push str._s_USING_TEMP_B_TREE
push 1
push edi
call fcn.00522260
lea eax, [esp + 0x78]
push eax
push ebx
push edi
call fcn.005117c0
add esp, 0x20
mov dword [esp + 0x10], eax
cmp byte [ebx], 0x86
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x20], eax
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x30], 0
jne 0x4d5f44
movzx eax, word [esi + 2]
push eax
movzx eax, word [ebx + 2]
push eax
call fcn.00507580
add esp, 8
mov word [ebx + 2], ax
mov eax, dword [ebx + 0x3c]
mov esi, dword [esp + 0x1c]
test eax, eax
je 0x4d5f59
push eax
push esi
call fcn.004f6c70
add esp, 8
cmp byte [esp + 0x2c], 1
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x3c], eax
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
je 0x4d6010
cmp byte [esi + 0x57], 0
jne 0x4d6010
mov ebx, dword [edi + 0x38]
mov eax, dword [esp + 0x84]
dec ebx
push ebx
push dword [esp + 0x8c]
lea edi, [ebx - 1]
push eax
mov dword [eax + 0x38], edi
call fcn.004b21b0
push ebx
push dword [esp + 0x28]
push 0x26
push ebp
call fcn.0051a3d0
mov ecx, dword [esp + 0xa0]
lea eax, [esp + 0x48]
mov esi, dword [ebp + 0x74]
push ebx
push edi
push eax
push 0
push 0
push dword [esp + 0x48]
push dword [esp + 0xbc]
push ecx
call fcn.004e3d60
push edi
push ebp
call fcn.00525570
add esp, 0x44
push esi
mov esi, dword [esp + 0x1c]
push esi
push 5
push ebp
call fcn.0051a3d0
push ebx
push ebp
call fcn.00525570
push 0
push esi
push 0x79
push ebp
call fcn.0051a3d0
mov edi, dword [esp + 0xac]
add esp, 0x28
mov ebx, dword [esp + 0x88]
cmp dword [ebx + 0x38], 0
jne 0x4d601f
push edi
call fcn.005222f0
add esp, 4
cmp dword [edi + 0x24], 0
jne 0x4d6158
test byte [ebx + 4], 0x20
je 0x4d6158
mov eax, dword [ebx + 0x1c]
push 1
mov eax, dword [eax]
push eax
push dword [esp + 0x24]
mov dword [esp + 0x30], eax
call fcn.00506010
mov esi, eax
add esp, 0xc
mov dword [esp + 0x28], esi
test esi, esi
jne 0x4d605d
lea ebx, [eax + 7]
jmp 0x4d615c
cmp dword [esp + 0x24], 0
lea edi, [esi + 0x14]
jle 0x4d60a0
mov esi, dword [esp + 0x84]
xor ebp, ebp
push ebp
push ebx
push esi
call fcn.004d61a0
add esp, 0xc
mov dword [edi], eax
test eax, eax
jne 0x4d608a
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 8]
mov dword [edi], eax
inc ebp
add edi, 4
cmp ebp, dword [esp + 0x24]
jl 0x4d6070
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x14]
lea esp, [esp]
lea edi, [ebx + 0x14]
mov dword [esp + 0x1c], 0
mov ebx, dword [esp + 0x24]
nop
mov edx, dword [edi]
test edx, edx
js 0x4d6128
mov eax, dword [ebp]
cmp byte [eax + 0x57], 0
je 0x4d60c6
mov eax, 0x6a4314
jmp 0x4d60cf
mov eax, dword [ebp + 0x70]
lea ecx, [edx + edx*4]
lea eax, [eax + ecx*4]
mov dword [eax + 8], ebx
inc dword [esi]
mov eax, dword [ebp]
cmp byte [eax + 0x57], 0
je 0x4d60eb
push esi
push 0xfffffffffffffff7
push eax
call fcn.004bbca0
add esp, 0xc
jmp 0x4d6111
mov eax, dword [ebp + 0x70]
lea ecx, [edx + edx*4]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
je 0x4d610a
push 0xfffffffffffffff7
push esi
push eax
push ebp
call fcn.00533cd0
add esp, 0x10
jmp 0x4d6111
mov dword [eax + 0x10], esi
mov byte [eax + 1], 0xf7
mov eax, dword [esp + 0x1c]
inc eax
mov dword [edi], 0xffffffff
add edi, 4
mov dword [esp + 0x1c], eax
cmp eax, 2
jl 0x4d60b0
mov ebx, dword [esp + 0x88]
mov ebx, dword [ebx + 0x34]
mov dword [esp + 0x88], ebx
test ebx, ebx
jne 0x4d60a0
dec dword [esi]
jne 0x4d6151
push esi
push dword [esi + 0xc]
call fcn.004f0e00
add esp, 8
mov edi, dword [esp + 0x84]
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x38]
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [ecx + 0x10], eax
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4d6188
push eax
push fcn.00513f80
push edi
call fcn.0050b3a0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x70
ret