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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
push ebx
mov ebx, dword [ebp + 0xc]
movzx ecx, word [ebx]
cmp cx, 0x40
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0xc]
mov dword [esp + 0x30], eax
jle 0x4c88a7
push 0x40
push str.at_most__d_tables_in_a_join
call fcn.0049a6c7
pop ecx
jmp 0x4c8d12
mov eax, edi
mov eax, dword [eax]
movsx edi, cx
shl edi, 6
add edi, 0x27
and edi, 0xfffffff8
lea ecx, [edi + 0x264]
push ecx
mov dword [esp + 0x1c], eax
call fcn.00498f87
mov esi, eax
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x1e], 0
pop ecx
mov dword [esp + 0x24], esi
jne 0x4c8d05
movsx eax, word [ebx]
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 8]
mov dword [esi], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 8], ebx
call fcn.004a71bd
mov dword [esi + 0x14], eax
mov ax, word [ebp + 0x18]
add edi, esi
push 0x104
mov word [esi + 4], ax
lea eax, [edi + 0x160]
push 0
push eax
mov dword [esp + 0x40], edi
mov dword [esi + 0x1c], edi
call fcn.004ee670
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x160]
add esp, 0xc
push eax
mov eax, edi
call fcn.004c5dd2
mov eax, dword [ebp + 8]
and dword [esp + 0x48], 0
pop ecx
push dword [ebp + 0x10]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x48], 0x4b280f
call fcn.004af051
push 0x43
push dword [ebp + 0x10]
push edi
call fcn.004c5f01
add esp, 0x14
cmp dword [ebp + 0x10], 0
je 0x4c898d
cmp word [ebx], 0
je 0x4c897a
push dword [ebp + 0x10]
push 3
pop eax
call fcn.004b120b
pop ecx
test eax, eax
je 0x4c898d
push 8
push dword [esi + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.004b2b93
add esp, 0x10
and dword [esp + 0x10], 0
xor eax, eax
cmp ax, word [ebx]
jge 0x4c89eb
lea eax, [ebx + 0x14]
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x1c]
mov edx, dword [edx + 0xc]
lea eax, [edi + 0x160]
mov ecx, dword [eax]
mov dword [eax + ecx*4 + 4], edx
inc dword [eax]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
test eax, eax
je 0x4c89d9
test byte [eax + 0x22], 0x10
je 0x4c89d9
mov ecx, dword [esp + 0x10]
xor eax, eax
inc eax
xor edx, edx
call fcn.0051ecb0
or dword [edi + 8], eax
or dword [edi + 0xc], edx
movsx eax, word [ebx]
inc dword [esp + 0x10]
add dword [esp + 0x1c], 0x38
cmp dword [esp + 0x10], eax
jl 0x4c89a0
push ebx
call fcn.004c62ab
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x1e], 0
pop ecx
jne 0x4c8d05
movsx edx, word [ebx]
or dword [esp + 0x40], 0xffffffff
or dword [esp + 0x44], 0xffffffff
or dword [esp + 0x28], 0xffffffff
and dword [esp + 0x14], 0
and dword [esp + 0x10], 0
lea eax, [esi + 0x20]
mov dword [esp + 0x20], eax
test edx, edx
jle 0x4c8c1a
and dword [esp + 0x3c], 0
fld qword [0x54c988]
and dword [esp + 0x38], 0
xor eax, eax
push 8
pop ecx
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
fstp qword [esp + 0x68]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
imul eax, eax, 0x38
cmp dword [esp + 0x14], edx
lea esi, [eax + ebx + 8]
mov dword [esp + 0x2c], esi
jge 0x4c8b80
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
shl eax, 6
lea eax, [eax + ecx + 0x5c]
mov dword [esp + 0x50], eax
test byte [esi + 0x15], 0xa
push 0
pop eax
setne al
cmp dword [esp + 0x38], 0
mov dword [esp + 0x54], eax
je 0x4c8a97
test eax, eax
jne 0x4c8b80
mov edi, dword [esp + 0x34]
push dword [esi + 0x18]
lea eax, [edi + 0x160]
call fcn.004c5f40
and eax, dword [esp + 0x44]
and edx, dword [esp + 0x48]
pop ecx
or eax, edx
jne 0x4c8acd
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x1c], eax
jne 0x4c8b63
inc dword [esp + 0x14]
jmp 0x4c8b63
cmp dword [esp + 0x10], 0
jne 0x4c8adf
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4c8adf
mov eax, dword [eax]
jmp 0x4c8ae1
xor eax, eax
mov ecx, dword [esi + 0xc]
test byte [ecx + 0x22], 0x10
lea ecx, [esp + 0x78]
je 0x4c8b0b
push dword [esp + 0x50]
push ecx
push eax
push dword [esp + 0x50]
push dword [esp + 0x50]
push esi
push edi
push dword [ebp + 8]
call fcn.004c737a
add esp, 0x20
jmp 0x4c8b22
push ecx
push eax
push dword [esp + 0x4c]
push dword [esp + 0x4c]
push esi
push edi
push dword [ebp + 8]
call fcn.004c74bf
add esp, 0x1c
cmp dword [esp + 0x38], 0
je 0x4c8b3b
fld qword [esp + 0x68]
fcomp qword [esp + 0x88]
fnstsw ax
test ah, 0x41
jne 0x4c8b5c
mov eax, dword [esp + 0x1c]
push 8
pop ecx
lea esi, [esp + 0x78]
lea edi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x54], 0
jne 0x4c8b80
movsx eax, word [ebx]
inc dword [esp + 0x1c]
add dword [esp + 0x50], 0x40
add esi, 0x38
cmp dword [esp + 0x1c], eax
mov dword [esp + 0x2c], esi
jl 0x4c8a7a
mov eax, dword [esp + 0x58]
test eax, 0x1000000
je 0x4c8b91
mov ecx, dword [ebp + 0x14]
and dword [ecx], 0
mov ecx, dword [esp + 0x20]
and dword [esp + 0x28], eax
lea esi, [esp + 0x58]
mov edi, ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, eax
and edi, 0xf0000
je 0x4c8bba
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x44]
mov dword [ecx + 0x14], edx
inc dword [eax + 0x44]
jmp 0x4c8bbe
or dword [ecx + 0x14], 0xffffffff
mov eax, dword [esp + 0x3c]
imul eax, eax, 0x38
lea esi, [eax + ebx]
mov eax, dword [esp + 0x34]
push dword [esi + 0x20]
add eax, 0x160
call fcn.004c5f40
not eax
and dword [esp + 0x44], eax
mov al, byte [esp + 0x40]
pop ecx
mov ecx, dword [esp + 0x20]
not edx
and dword [esp + 0x44], edx
mov byte [ecx + 0x28], al
mov esi, dword [esi + 0x3c]
test esi, esi
je 0x4c8c00
test edi, edi
je 0x4c8cf4
movsx edx, word [ebx]
inc dword [esp + 0x10]
add dword [esp + 0x20], 0x40
cmp dword [esp + 0x10], edx
jl 0x4c8a2b
mov esi, dword [esp + 0x24]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x40], 0
jne 0x4c8d05
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x1e], 0
jne 0x4c8d05
mov eax, dword [esp + 0x28]
and eax, 0x4000000
je 0x4c8c4a
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x4c8c4a
and dword [ecx], 0
test byte [ebp + 0x18], 4
je 0x4c8c61
test eax, eax
je 0x4c8c61
lea eax, [esi + 0x20]
and dword [eax], 0xff7fffff
mov byte [esi + 6], 1
mov eax, dword [ebp + 8]
or esi, 0xffffffff
call fcn.004b7d4f
mov edi, dword [esp + 0x24]
and dword [esp + 0x10], 0
xor eax, eax
add edi, 0x20
cmp ax, word [ebx]
jge 0x4c8f0d
mov eax, dword [ebp + 8]
cmp byte [eax + 0x1bc], 2
jne 0x4c8d9e
movzx eax, byte [edi + 0x28]
mov esi, dword [esp + 0x18]
imul eax, eax, 0x38
lea eax, [eax + ebx + 8]
push dword [eax + 4]
mov dword [esp + 0x38], eax
push str.TABLE__s
call fcn.00499ea4
pop ecx
pop ecx
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x4c8cd2
push ecx
push eax
push str._s_AS__s
push eax
mov eax, esi
call fcn.00499eb5
add esp, 0x10
mov ecx, dword [edi]
test ecx, 0xf0000
je 0x4c8d1c
mov ecx, dword [edi + 8]
push dword [ecx]
push eax
push str._s_WITH_INDEX__s
push eax
mov eax, esi
call fcn.00499eb5
add esp, 0x10
jmp 0x4c8d69
push dword [esi]
mov edi, dword [ebp + 8]
push str.cannot_use_index:__s
call fcn.0049a6c7
pop ecx
pop ecx
push dword [esp + 0x18]
mov esi, dword [esp + 0x28]
call fcn.004c8813
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ecx, 0x10000000
je 0x4c8d2c
push eax
push str._s_VIA_MULTI_INDEX_UNION
jmp 0x4c8d3a
test ecx, 0x3000
je 0x4c8d47
push eax
push str._s_USING_PRIMARY_KEY
push eax
mov eax, esi
call fcn.00499eb5
add esp, 0xc
jmp 0x4c8d69
test ecx, 0x8000000
je 0x4c8d69
mov ecx, dword [edi + 8]
push dword [ecx + 0x18]
push dword [ecx + 0x14]
push eax
push str._s_VIRTUAL_TABLE_INDEX__d:_s
push eax
mov eax, esi
call fcn.00499eb5
add esp, 0x14
test dword [edi], 0x1000000
je 0x4c8d82
push eax
push str._s_ORDER_BY
push eax
mov eax, esi
call fcn.00499eb5
add esp, 0xc
push 0xffffffffffffffff
push eax
movzx eax, byte [edi + 0x28]
push 0
push eax
push dword [esp + 0x20]
push 0x73
push dword [esp + 0x48]
call fcn.004a718d
add esp, 0x1c
movzx eax, byte [edi + 0x28]
mov ecx, dword [esp + 0x18]
imul eax, eax, 0x38
lea eax, [eax + ebx + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x44]
mov dword [esp + 0x14], eax
call fcn.004be812
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
test byte [eax + 0x22], 2
jne 0x4c8ef9
cmp dword [eax + 0x1c], 0
jne 0x4c8ef9
mov eax, dword [edi]
test eax, 0x8000000
je 0x4c8e14
mov eax, dword [esp + 0x14]
push 0xfffffffffffffff6
push dword [esp + 0x1c]
call fcn.004c52a0
mov esi, dword [esp + 0x34]
pop ecx
push eax
push 0
push 0
push dword [esi + 0x18]
push 0x20
push dword [esp + 0x48]
call fcn.004a718d
add esp, 0x1c
jmp 0x4c8eb8
test eax, 0x800000
jne 0x4c8e96
test byte [ebp + 0x18], 0x10
jne 0x4c8e96
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x2c]
xor eax, eax
cmp byte [ecx + 6], al
sete al
dec eax
and eax, 0xfffffffd
add eax, 0xd
push eax
push dword [esp + 0x18]
push dword [esp + 0x28]
push dword [esi + 0x18]
push dword [ebp + 8]
call fcn.004ba4b1
mov eax, dword [esp + 0x38]
add esp, 0x14
cmp byte [eax + 6], 0
jne 0x4c8eb8
mov eax, dword [esp + 0x14]
cmp dword [eax + 0xc], 0x40
jge 0x4c8eb8
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x2c]
and dword [esp + 0x28], 0
jmp 0x4c8e7a
shrd eax, ecx, 1
shr ecx, 1
inc dword [esp + 0x28]
mov edx, eax
or edx, ecx
jne 0x4c8e70
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx + 0xc]
push 0xfffffffffffffff2
push dword [esp + 0x2c]
dec eax
push ecx
call fcn.004a7504
jmp 0x4c8eb5
mov eax, dword [esp + 0x14]
push dword [eax + 4]
mov ebx, dword [eax + 0x18]
mov esi, dword [ebp + 8]
push 0
push dword [esp + 0x28]
call fcn.004b4bbf
mov ebx, dword [ebp + 0xc]
mov esi, dword [esp + 0x38]
add esp, 0xc
test dword [edi], 0xf0000
mov eax, dword [esi + 0x18]
mov dword [edi + 0x10], eax
je 0x4c8eed
mov esi, dword [edi + 8]
push esi
push dword [ebp + 8]
call fcn.004b7fe2
push 0xfffffffffffffff0
push eax
push dword [esp + 0x30]
push dword [esi + 0x14]
push dword [edi + 0x14]
push 0xd
push dword [esp + 0x50]
call fcn.004a718d
add esp, 0x24
mov esi, dword [esp + 0x20]
mov eax, dword [ebp + 8]
call fcn.004b7d4f
movsx eax, word [ebx]
inc dword [esp + 0x10]
add edi, 0x40
cmp dword [esp + 0x10], eax
jl 0x4c8c83
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 0xc]
mov esi, dword [esp + 0x24]
and dword [esp + 0x10], 0
mov dword [esi + 0xc], eax
or edx, 0xffffffff
xor ecx, ecx
cmp cx, word [ebx]
mov eax, edx
jge 0x4c8f57
lea edi, [esi + 0x40]
mov ecx, dword [esp + 0x10]
push edx
push eax
push dword [ebp + 0x18]
mov eax, esi
call fcn.004c7d75
mov ecx, dword [edi]
mov dword [esi + 0x10], ecx
movsx ecx, word [ebx]
add esp, 0xc
inc dword [esp + 0x10]
add edi, 0x40
cmp dword [esp + 0x10], ecx
jl 0x4c8f2f
mov eax, esi
jmp 0x4c8d15