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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
mov eax, dword [0x511080]
xor eax, esp
mov dword [esp + 0x98], eax
push ebx
mov ebx, edx
mov edx, ecx
mov ecx, dword [ebp + 8]
push esi
push edi
mov eax, dword [edx + 0x78]
xor edi, edi
test eax, eax
mov dword [esp + 0x1c], edx
mov esi, edx
cmovne esi, eax
cmp byte [esi + 0xd3], 2
jne 0x4a8c48
movzx eax, byte [ecx + 0x3c]
mov edi, dword [ecx + 0x50]
lea eax, [eax + eax*8]
lea eax, [eax + 1]
lea eax, [ebx + eax*8]
mov ebx, dword [edi + 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [edx + 8]
mov edx, dword [edx]
mov dword [esp + 0x18], eax
test ebx, 0x2000
jne 0x4a8cbf
mov cx, word [ebp + 0xc]
test cl, 0x20
jne 0x4a8cbf
mov eax, ebx
and eax, 0x30
mov dword [esp + 0x10], eax
jne 0x4a89be
mov esi, ebx
and esi, 0x400
jne 0x4a89b5
cmp word [edi + 0x18], si
ja 0x4a89be
test cl, 3
jne 0x4a89be
xor ecx, ecx
jmp 0x4a89cb
mov esi, ebx
mov ecx, 1
and esi, 0x400
push dword [esp + 0xc]
lea eax, [esp + 0x3c]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
test ecx, ecx
mov edx, str.SCAN
mov dword [esp + 0x18], ecx
mov eax, str.SEARCH
mov dword [esp + 0x2c], 0x64
cmove eax, edx
mov dword [esp + 0x30], 0x3b9aca00
push eax
lea eax, [esp + 0x28]
mov dword [esp + 0x38], 0
push str._s__S
push eax
mov word [esp + 0x44], 0x100
call fcn.0041bb40
add esp, 0x10
test ebx, 0x500
jne 0x4a8af7
mov eax, dword [esp + 0xc]
mov ecx, dword [edi + 0x20]
mov dword [esp + 0x10], ecx
mov eax, dword [eax + 0x10]
test byte [eax + 0x1c], 0x80
je 0x4a8a61
mov eax, dword [ecx + 0x38]
and al, 3
cmp al, 2
jne 0x4a8a61
xor eax, eax
mov esi, str.PRIMARY_KEY
cmp dword [esp + 0x14], eax
cmove esi, eax
test esi, esi
je 0x4a8b8d
jmp 0x4a8a8f
test ebx, 0x20000
je 0x4a8a70
mov esi, str.AUTOMATIC_PARTIAL_COVERING_INDEX
jmp 0x4a8a8f
test ebx, 0x4000
je 0x4a8a7f
mov esi, str.AUTOMATIC_COVERING_INDEX
jmp 0x4a8a8f
test bl, 0x40
mov esi, str.COVERING_INDEX__s
mov eax, str.INDEX__s
cmove esi, eax
mov ecx, dword [esp + 0x30]
add ecx, 7
cmp ecx, dword [esp + 0x28]
jb 0x4a8ab1
push 7
mov edx, str._USING
lea ecx, [esp + 0x24]
call fcn.0041b320
add esp, 4
jmp 0x4a8ad3
mov eax, dword [str._USING]
mov dword [esp + 0x30], ecx
add ecx, dword [esp + 0x24]
mov dword [ecx - 7], eax
mov ax, word [0x50b62c]
mov word [ecx - 3], ax
mov al, byte [0x50b62e]
mov byte [ecx - 1], al
mov eax, dword [esp + 0x10]
push dword [eax]
lea eax, [esp + 0x24]
push esi
push eax
call fcn.0041bb40
add esp, 0xc
lea ecx, [esp + 0x20]
mov edx, edi
call fcn.004a8780
jmp 0x4a8b8d
test bl, 0xf
setne cl
bt ebx, 8
setb al
test al, cl
je 0x4a8b71
push str.rowid
lea eax, [esp + 0x24]
push str._USING_INTEGER_PRIMARY_KEY___s
push eax
call fcn.0041bb40
add esp, 0xc
test bl, 5
je 0x4a8b2b
mov eax, 0x3d
jmp 0x4a8b5c
cmp dword [esp + 0x10], 0x30
jne 0x4a8b50
push str.rowid
lea eax, [esp + 0x24]
push str.___AND__s
push eax
call fcn.0041bb40
add esp, 0xc
mov eax, 0x3c
jmp 0x4a8b5c
movzx eax, bl
shr eax, 4
and eax, 2
or eax, 0x3c
push eax
lea eax, [esp + 0x24]
push 0x50b65c
push eax
call fcn.0041bb40
add esp, 0xc
jmp 0x4a8b8d
test esi, esi
je 0x4a8b8d
push dword [edi + 0x24]
lea eax, [esp + 0x24]
push dword [edi + 0x18]
push str._VIRTUAL_TABLE_INDEX__d:_s
push eax
call fcn.0041bb40
add esp, 0x10
mov eax, dword [esp + 0xc]
test byte [eax + 0x24], 8
je 0x4a8ba9
lea eax, [esp + 0x20]
push str._LEFT_JOIN
push eax
call fcn.0041bb40
add esp, 8
mov esi, dword [esp + 0x24]
test esi, esi
je 0x4a8bd8
mov eax, dword [esp + 0x30]
mov byte [eax + esi], 0
cmp dword [esp + 0x2c], 0
jbe 0x4a8bd4
test byte [esp + 0x35], 4
jne 0x4a8bd4
lea ecx, [esp + 0x20]
call fcn.0041b410
mov esi, eax
jmp 0x4a8bd8
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov edi, dword [ebx + 0x6c]
mov edx, dword [edx + 0xe0]
cmp dword [ebx + 0x70], edi
jg 0x4a8c05
push 0
push edx
push edi
mov edx, 0xb9
mov ecx, ebx
call fcn.00440850
add esp, 0xc
mov edi, eax
jmp 0x4a8c30
lea eax, [edi + 1]
mov dword [ebx + 0x6c], eax
lea ecx, [edi + edi*4]
mov eax, dword [ebx + 0x68]
mov dword [eax + ecx*4], 0xb9
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 ecx, dword [ebx]
mov eax, edi
cmp byte [ecx + 0x57], 0
je 0x4a8c5f
push esi
mov edx, 0xfffffffa
call fcn.00441340
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.004d2eed
mov esp, ebp
pop ebp
ret
test edi, edi
jns 0x4a8c67
mov eax, dword [ebx + 0x6c]
dec eax
lea ecx, [eax + eax*4]
mov eax, dword [ebx + 0x68]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
je 0x4a8c9d
push 0xfffffffffffffffa
push esi
mov edx, eax
mov ecx, ebx
call fcn.004414b0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.004d2eed
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4a8c48
mov dword [eax + 0x10], esi
mov byte [eax + 1], 0xfa
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.004d2eed
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xa4]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004d2eed
mov esp, ebp
pop ebp
ret