Function at 0x479884
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 0x4798bb
push 0x40
push str.at_most__d_tables_in_a_join
call fcn.0044b6d4
pop ecx
jmp 0x479d26
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.00449f94
mov esi, eax
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x1e], 0
pop ecx
mov dword [esp + 0x24], esi
jne 0x479d19
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.004581cd
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.0048ab30
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x160]
add esp, 0xc
push eax
mov eax, edi
call fcn.00476de6
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], 0x463821
call fcn.00460063
push 0x43
push dword [ebp + 0x10]
push edi
call fcn.00476f15
add esp, 0x14
cmp dword [ebp + 0x10], 0
je 0x4799a1
cmp word [ebx], 0
je 0x47998e
push dword [ebp + 0x10]
push 3
pop eax
call fcn.0046221d
pop ecx
test eax, eax
je 0x4799a1
push 8
push dword [esi + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00463ba5
add esp, 0x10
and dword [esp + 0x10], 0
xor eax, eax
cmp ax, word [ebx]
jge 0x4799ff
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 0x4799ed
test byte [eax + 0x22], 0x10
je 0x4799ed
mov ecx, dword [esp + 0x10]
xor eax, eax
inc eax
xor edx, edx
call fcn.004a33d0
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 0x4799b4
push ebx
call fcn.004772bf
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x1e], 0
pop ecx
jne 0x479d19
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 0x479c2e
and dword [esp + 0x3c], 0
fld qword [0x4bc168]
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 0x479b94
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 0x479aab
test eax, eax
jne 0x479b94
mov edi, dword [esp + 0x34]
push dword [esi + 0x18]
lea eax, [edi + 0x160]
call fcn.00476f54
and eax, dword [esp + 0x44]
and edx, dword [esp + 0x48]
pop ecx
or eax, edx
jne 0x479ae1
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x1c], eax
jne 0x479b77
inc dword [esp + 0x14]
jmp 0x479b77
cmp dword [esp + 0x10], 0
jne 0x479af3
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x479af3
mov eax, dword [eax]
jmp 0x479af5
xor eax, eax
mov ecx, dword [esi + 0xc]
test byte [ecx + 0x22], 0x10
lea ecx, [esp + 0x78]
je 0x479b1f
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.0047838e
add esp, 0x20
jmp 0x479b36
push ecx
push eax
push dword [esp + 0x4c]
push dword [esp + 0x4c]
push esi
push edi
push dword [ebp + 8]
call fcn.004784d3
add esp, 0x1c
cmp dword [esp + 0x38], 0
je 0x479b4f
fld qword [esp + 0x68]
fcomp qword [esp + 0x88]
fnstsw ax
test ah, 0x41
jne 0x479b70
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 0x479b94
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 0x479a8e
mov eax, dword [esp + 0x58]
test eax, 0x1000000
je 0x479ba5
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 0x479bce
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x44]
mov dword [ecx + 0x14], edx
inc dword [eax + 0x44]
jmp 0x479bd2
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.00476f54
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 0x479c14
test edi, edi
je 0x479d08
movsx edx, word [ebx]
inc dword [esp + 0x10]
add dword [esp + 0x20], 0x40
cmp dword [esp + 0x10], edx
jl 0x479a3f
mov esi, dword [esp + 0x24]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x40], 0
jne 0x479d19
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x1e], 0
jne 0x479d19
mov eax, dword [esp + 0x28]
and eax, 0x4000000
je 0x479c5e
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x479c5e
and dword [ecx], 0
test byte [ebp + 0x18], 4
je 0x479c75
test eax, eax
je 0x479c75
lea eax, [esi + 0x20]
and dword [eax], 0xff7fffff
mov byte [esi + 6], 1
mov eax, dword [ebp + 8]
or esi, 0xffffffff
call fcn.00468d61
mov edi, dword [esp + 0x24]
and dword [esp + 0x10], 0
xor eax, eax
add edi, 0x20
cmp ax, word [ebx]
jge 0x479f21
mov eax, dword [ebp + 8]
cmp byte [eax + 0x1bc], 2
jne 0x479db2
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.0044aeb1
pop ecx
pop ecx
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x479ce6
push ecx
push eax
push str._s_AS__s
push eax
mov eax, esi
call fcn.0044aec2
add esp, 0x10
mov ecx, dword [edi]
test ecx, 0xf0000
je 0x479d30
mov ecx, dword [edi + 8]
push dword [ecx]
push eax
push str._s_WITH_INDEX__s
push eax
mov eax, esi
call fcn.0044aec2
add esp, 0x10
jmp 0x479d7d
push dword [esi]
mov edi, dword [ebp + 8]
push str.cannot_use_index:__s
call fcn.0044b6d4
pop ecx
pop ecx
push dword [esp + 0x18]
mov esi, dword [esp + 0x28]
call fcn.00479827
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ecx, 0x10000000
je 0x479d40
push eax
push str._s_VIA_MULTI_INDEX_UNION
jmp 0x479d4e
test ecx, 0x3000
je 0x479d5b
push eax
push str._s_USING_PRIMARY_KEY
push eax
mov eax, esi
call fcn.0044aec2
add esp, 0xc
jmp 0x479d7d
test ecx, 0x8000000
je 0x479d7d
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.0044aec2
add esp, 0x14
test dword [edi], 0x1000000
je 0x479d96
push eax
push str._s_ORDER_BY
push eax
mov eax, esi
call fcn.0044aec2
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.0045819d
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.0046f826
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
test byte [eax + 0x22], 2
jne 0x479f0d
cmp dword [eax + 0x1c], 0
jne 0x479f0d
mov eax, dword [edi]
test eax, 0x8000000
je 0x479e28
mov eax, dword [esp + 0x14]
push 0xfffffffffffffff6
push dword [esp + 0x1c]
call fcn.004762b4
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.0045819d
add esp, 0x1c
jmp 0x479ecc
test eax, 0x800000
jne 0x479eaa
test byte [ebp + 0x18], 0x10
jne 0x479eaa
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.0046b4c5
mov eax, dword [esp + 0x38]
add esp, 0x14
cmp byte [eax + 6], 0
jne 0x479ecc
mov eax, dword [esp + 0x14]
cmp dword [eax + 0xc], 0x40
jge 0x479ecc
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x2c]
and dword [esp + 0x28], 0
jmp 0x479e8e
shrd eax, ecx, 1
shr ecx, 1
inc dword [esp + 0x28]
mov edx, eax
or edx, ecx
jne 0x479e84
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx + 0xc]
push 0xfffffffffffffff2
push dword [esp + 0x2c]
dec eax
push ecx
call fcn.00458514
jmp 0x479ec9
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.00465bd1
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 0x479f01
mov esi, dword [edi + 8]
push esi
push dword [ebp + 8]
call fcn.00468ff4
push 0xfffffffffffffff0
push eax
push dword [esp + 0x30]
push dword [esi + 0x14]
push dword [edi + 0x14]
push 0xd
push dword [esp + 0x50]
call fcn.0045819d
add esp, 0x24
mov esi, dword [esp + 0x20]
mov eax, dword [ebp + 8]
call fcn.00468d61
movsx eax, word [ebx]
inc dword [esp + 0x10]
add edi, 0x40
cmp dword [esp + 0x10], eax
jl 0x479c97
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 0x479f6b
lea edi, [esi + 0x40]
mov ecx, dword [esp + 0x10]
push edx
push eax
push dword [ebp + 0x18]
mov eax, esi
call fcn.00478d89
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 0x479f43
mov eax, esi
jmp 0x479d29